/* Tools Page Styles */

.tools-main {
    padding: 40px 20px;
    min-height: calc(100vh - 300px);
    background-color: #f8f9fa;
}

/* Tools Header */
.tools-header {
    text-align: center;
    margin-bottom: 40px;
}

.tools-header h1 {
    font-size: 42px;
    color: #2c3e50;
    margin-bottom: 15px;
}

.tools-header p {
    font-size: 18px;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

/* Tab Navigation */
.tools-tabs {
    max-width: 1200px;
    margin: 0 auto;
}

.tab-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

.tab-btn {
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 600;
    border: 2px solid #3498db;
    background-color: #fff;
    color: #3498db;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    background-color: #ebf5fb;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.tab-btn.active {
    background-color: #3498db;
    color: #fff;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Tool Container */
.tool-container {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.tool-container h2 {
    font-size: 28px;
    color: #2c3e50;
    margin-bottom: 15px;
}

.tool-description {
    font-size: 16px;
    color: #666;
    margin-bottom: 30px;
}

/* Color Palette Generator */
.palette-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.btn-primary {
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    background-color: #3498db;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}

.btn-secondary {
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    background-color: #fff;
    color: #3498db;
    border: 2px solid #3498db;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background-color: #ebf5fb;
}

.palette-display {
    min-height: 200px;
    margin-bottom: 30px;
}

.palette-loading {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 18px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.palette-colors {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.palette-color {
    flex: 1;
    min-width: 150px;
    height: 200px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}

.palette-color:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.palette-color.locked::after {
    content: '🔒';
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 20px;
}

.color-info {
    width: 100%;
    padding: 15px;
    background-color: rgba(255,255,255,0.95);
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.palette-info {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.palette-info h3 {
    font-size: 20px;
    color: #2c3e50;
    margin-bottom: 15px;
}

.color-codes {
    display: grid;
    gap: 15px;
}

.code-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.code-group label {
    font-weight: 600;
    color: #555;
}

.code-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: monospace;
    font-size: 14px;
    resize: vertical;
    min-height: 60px;
}

.btn-copy {
    align-self: flex-start;
    padding: 8px 16px;
    font-size: 14px;
    background-color: #27ae60;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-copy:hover {
    background-color: #229954;
}

.palette-tips {
    background-color: #fff3cd;
    padding: 20px;
    border-left: 4px solid #ffc107;
    border-radius: 8px;
}

.palette-tips h3 {
    font-size: 20px;
    color: #856404;
    margin-bottom: 15px;
}

.palette-tips ul {
    list-style: none;
    padding: 0;
}

.palette-tips li {
    margin-bottom: 10px;
    color: #856404;
    line-height: 1.6;
}

.palette-tips li strong {
    color: #664d03;
}

/* Unit Converter */
.converter-sections {
    display: grid;
    gap: 30px;
    margin-bottom: 30px;
}

.converter-group {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
}

.converter-group h3 {
    font-size: 20px;
    color: #2c3e50;
    margin-bottom: 15px;
}

.converter-row {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.converter-input-group {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.converter-input-group input {
    padding: 12px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 6px;
    transition: border-color 0.3s ease;
}

.converter-input-group input:focus {
    outline: none;
    border-color: #3498db;
}

.converter-input-group select {
    padding: 10px;
    font-size: 14px;
    border: 2px solid #ddd;
    border-radius: 6px;
    background-color: #fff;
    cursor: pointer;
}

.converter-arrow {
    font-size: 24px;
    color: #3498db;
    font-weight: bold;
}

.btn-convert {
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    background-color: #3498db;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-convert:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

.converter-tips {
    background-color: #e8f4f8;
    padding: 20px;
    border-left: 4px solid #3498db;
    border-radius: 8px;
}

.converter-tips h3 {
    font-size: 20px;
    color: #2c3e50;
    margin-bottom: 15px;
}

.quick-reference {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.reference-item {
    padding: 15px;
    background-color: #fff;
    border-radius: 6px;
    color: #555;
    line-height: 1.6;
}

.reference-item strong {
    color: #2c3e50;
}

/* Budget Calculator */
.budget-calculator {
    margin-bottom: 30px;
}

.materials-list {
    margin-bottom: 30px;
}

.materials-list h3 {
    font-size: 20px;
    color: #2c3e50;
    margin-bottom: 15px;
}

.material-item {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 10px;
    margin-bottom: 10px;
    align-items: center;
}

.material-item input {
    padding: 10px;
    font-size: 14px;
    border: 2px solid #ddd;
    border-radius: 6px;
}

.material-item input:focus {
    outline: none;
    border-color: #3498db;
}

.btn-remove {
    padding: 8px 12px;
    font-size: 16px;
    background-color: #e74c3c;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-remove:hover {
    background-color: #c0392b;
}

.btn-add-material {
    padding: 10px 20px;
    font-size: 14px;
    background-color: #27ae60;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 10px;
    transition: all 0.3s ease;
}

.btn-add-material:hover {
    background-color: #229954;
}

.budget-settings {
    margin-bottom: 30px;
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
}

.budget-settings h3 {
    font-size: 20px;
    color: #2c3e50;
    margin-bottom: 15px;
}

.setting-group {
    margin-bottom: 15px;
}

.setting-group label {
    display: block;
    font-weight: 600;
    color: #555;
    margin-bottom: 8px;
}

.setting-group input {
    width: 100%;
    max-width: 300px;
    padding: 10px;
    font-size: 14px;
    border: 2px solid #ddd;
    border-radius: 6px;
}

.btn-calculate {
    padding: 15px 30px;
    font-size: 18px;
    font-weight: 600;
    background-color: #27ae60;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    margin-bottom: 30px;
    transition: all 0.3s ease;
}

.btn-calculate:hover {
    background-color: #229954;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

.budget-results {
    background-color: #e8f8f5;
    padding: 25px;
    border-radius: 8px;
    border-left: 4px solid #27ae60;
}

.budget-results h3 {
    font-size: 20px;
    color: #2c3e50;
    margin-bottom: 20px;
}

.result-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #ddd;
    font-size: 16px;
    color: #555;
}

.result-item:last-child {
    border-bottom: none;
}

.result-item.total {
    font-weight: 600;
    font-size: 18px;
    color: #2c3e50;
}

.result-item.suggested {
    background-color: #fff;
    padding: 15px;
    border-radius: 6px;
    margin-top: 10px;
    font-weight: 600;
    font-size: 20px;
    color: #27ae60;
}

.result-item.profit {
    font-weight: 600;
    color: #229954;
}

.budget-tips {
    background-color: #d4edda;
    padding: 20px;
    border-left: 4px solid #27ae60;
    border-radius: 8px;
}

.budget-tips h3 {
    font-size: 20px;
    color: #155724;
    margin-bottom: 15px;
}

.budget-tips ul {
    list-style: none;
    padding: 0;
}

.budget-tips li {
    margin-bottom: 10px;
    color: #155724;
    line-height: 1.6;
}

.budget-tips li strong {
    color: #0f3d1a;
}

/* Responsive Design */
@media (max-width: 768px) {
    .tools-header h1 {
        font-size: 32px;
    }

    .tools-header p {
        font-size: 16px;
    }

    .tab-buttons {
        flex-direction: column;
    }

    .tab-btn {
        width: 100%;
    }

    .tool-container {
        padding: 20px;
    }

    .palette-colors {
        flex-direction: column;
    }

    .palette-color {
        height: 150px;
    }

    .converter-row {
        flex-direction: column;
    }

    .converter-arrow {
        transform: rotate(90deg);
    }

    .material-item {
        grid-template-columns: 1fr;
    }
}
