﻿:root {
    --primary-gradient: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #667eea 100%);
    --secondary-gradient: linear-gradient(135deg, #ff6b6b 0%, #ff8e53 50%, #ff6b9d 100%);
    --success-gradient: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    --warning-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --info-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --dark-gradient: linear-gradient(135deg, #2c3e50 0%, #34495e 50%, #2c3e50 100%);
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
}

body {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    min-height: 100vh;
}

.navbar-brand .logo-icon {
    width: 45px;
    height: 45px;
    background: var(--primary-gradient);
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    box-shadow: 0 4px 15px rgba(30, 60, 114, 0.3);
    transition: all 0.3s ease;
}

    .navbar-brand .logo-icon:hover {
        transform: scale(1.05) rotate(5deg);
        box-shadow: 0 6px 20px rgba(30, 60, 114, 0.4);
    }

.text-gradient {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #667eea 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.hero-section {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 30%, #667eea 70%, #764ba2 100%);
    padding: 60px 0 40px 0;
    position: relative;
    overflow: hidden;
    min-height: auto;
}

    .hero-section::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%), radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
        opacity: 0.8;
    }

    .hero-section h1 {
        position: relative;
        z-index: 1;
    }

.calculator-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-bottom: 2rem;
}

.calculator-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px 24px;
    color: white;
}

    .calculator-header h2 {
        margin: 0;
        font-size: 1.3rem;
        font-weight: 700;
        display: flex;
        align-items: center;
        gap: 12px;
    }

.calculator-body {
    padding: 32px 24px;
}

.input-group-custom {
    margin-bottom: 24px;
}

.input-label {
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.input-field {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--gray-200);
    border-radius: 10px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    outline: none;
}

    .input-field:focus {
        border-color: #667eea;
        box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    }

.btn-calculate {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(30, 60, 114, 0.3);
    width: 100%;
}

    .btn-calculate:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(30, 60, 114, 0.4);
    }

.btn-clear {
    background: var(--gray-200);
    color: var(--gray-700);
    border: none;
    padding: 14px 32px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

    .btn-clear:hover {
        background: var(--gray-300);
        transform: translateY(-2px);
    }

.result-container {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 12px;
    padding: 24px;
    margin-top: 24px;
    display: none;
}

    .result-container.show {
        display: block;
        animation: fadeIn 0.3s ease;
    }

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(102, 126, 234, 0.1);
}

    .result-item:last-child {
        border-bottom: none;
    }

.result-label {
    font-weight: 600;
    color: var(--gray-700);
    font-size: 1rem;
}

.result-value {
    font-size: 1.3rem;
    font-weight: 800;
    color: #667eea;
}

    .result-value.highlight {
        color: #11998e;
        font-size: 1.5rem;
    }

.formula-display {
    background: white;
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 10px;
    padding: 16px;
    margin-top: 16px;
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    text-align: center;
    color: var(--gray-700);
}

.info-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    height: 100%;
}

    .info-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    }

.info-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    font-size: 24px;
    color: white;
}

.example-card {
    background: linear-gradient(135deg, rgba(17, 153, 142, 0.05) 0%, rgba(56, 239, 125, 0.05) 100%);
    border: 2px solid rgba(17, 153, 142, 0.2);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
}

.example-title {
    font-weight: 700;
    color: #11998e;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.example-content {
    color: var(--gray-700);
    line-height: 1.8;
}

.footer {
    background: var(--dark-gradient);
    color: white;
    position: relative;
    overflow: hidden;
}

    .footer::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: radial-gradient(circle at 20% 20%, rgba(102, 126, 234, 0.1) 0%, transparent 50%), radial-gradient(circle at 80% 80%, rgba(118, 75, 162, 0.1) 0%, transparent 50%);
        opacity: 0.6;
    }

    .footer a {
        color: #cbd5e1;
        text-decoration: none;
        transition: all 0.3s ease;
        position: relative;
    }

        .footer a:hover {
            color: white;
            text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
        }

.history-container {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    margin-top: 24px;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.history-title {
    font-weight: 700;
    color: var(--gray-800);
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-clear-history {
    background: transparent;
    color: #f5576c;
    border: 1px solid #f5576c;
    padding: 6px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .btn-clear-history:hover {
        background: #f5576c;
        color: white;
    }

.history-list {
    max-height: 300px;
    overflow-y: auto;
}

.history-item {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(147, 51, 234, 0.05) 100%);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-left: 3px solid #3b82f6;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
    cursor: pointer;
}

    .history-item:hover {
        background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(147, 51, 234, 0.1) 100%);
        transform: translateX(5px);
        box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
    }

.history-formula {
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 4px;
}

.history-result {
    color: #11998e;
    font-size: 0.9rem;
    font-weight: 700;
}

.empty-history {
    text-align: center;
    color: var(--gray-400);
    padding: 40px 20px;
}

@media (max-width: 768px) {
    .hero-section {
        padding: 40px 0 30px 0;
    }

        .hero-section h1 {
            font-size: 1.8rem;
        }

    .calculator-body {
        padding: 24px 20px;
    }

    .result-value {
        font-size: 1.1rem;
    }

        .result-value.highlight {
            font-size: 1.3rem;
        }
}
