/* ================ VARIÁVEIS CSS ================ */
:root {
    --primary: #4361ee;
    --primary-dark: #3a56d4;
    --primary-light: #4cc9f0;
    --secondary: #3f37c9;
    --accent: #f72585;
    --success: #4cc9f0;
    --warning: #f8961e;
    --danger: #f72585;
    --dark: #121212;
    --darker: #0a0a0a;
    --light: #f8f9fa;
    --lighter: #ffffff;
    --gray: #6c757d;
    --gray-dark: #495057;
    --gray-light: #e9ecef;
    
    --sombra-leve: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --sombra-media: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --sombra-forte: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --sombra-neon: 0 0 20px rgba(67, 97, 238, 0.3);
    
    --gradient-primary: linear-gradient(135deg, #4361ee 0%, #3a56d4 100%);
    --gradient-dark: linear-gradient(135deg, #121212 0%, #1a1a1a 100%);
    --gradient-glass: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
}

[data-theme="dark"] {
    --lighter: #1a1a1a;
    --light: #2d2d2d;
    --dark: #f8f9fa;
    --darker: #ffffff;
    --gray: #a0a0a0;
}

/* ================ BASE STYLES ================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--gradient-dark);
    color: var(--dark);
    min-height: 100vh;
    overflow-x: hidden;
    transition: all 0.3s ease;
}

.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

/* ================ NAVBAR ================ */
.navbar {
    background: var(--gradient-glass);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-img {
    height: 40px;
    width: auto;
    border-radius: 10px;
}

.page-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.highlight {
    color: var(--primary);
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-toggle {
    background: rgba(255,255,255,0.1);
    border: none;
    color: var(--gray);
    cursor: pointer;
    padding: 0.75rem;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    background: var(--primary);
    color: white;
}

/* ================ CONTAINER ================ */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* ================ HERO SECTION ================ */
.hero-section {
    text-align: center;
    padding: 3rem 0;
    position: relative;
}

.premium-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--gradient-primary);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    margin-bottom: 2rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.2rem;
    color: var(--gray);
    max-width: 600px;
    margin: 0 auto 3rem;
    line-height: 1.6;
}

/* ================ TABS ================ */
.calculator-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.tab-btn {
    background: var(--gradient-glass);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--gray);
    padding: 1rem 2rem;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    font-size: 1rem;
}

.tab-btn:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
    color: var(--primary);
}

.tab-btn.active {
    background: var(--gradient-primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--sombra-neon);
}

/* ================ TAB CONTENT ================ */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ================ CALCULATORS GRID ================ */
.calculators-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.calculator-card {
    background: var(--gradient-glass);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.calculator-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s ease;
}

.calculator-card:hover::before {
    left: 100%;
}

.calculator-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--sombra-forte);
    border-color: rgba(67, 97, 238, 0.3);
}

/* ================ CARD HEADER ================ */
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.card-header h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--dark);
}

.info-icon {
    position: relative;
    color: var(--gray);
    cursor: pointer;
    transition: all 0.3s ease;
}

.info-icon:hover {
    color: var(--primary);
}

.info-icon:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--dark);
    color: var(--lighter);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.8rem;
    white-space: nowrap;
    z-index: 1000;
    box-shadow: var(--sombra-media);
}

/* ================ CALCULATOR FORM ================ */
.calculator-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-group label {
    font-weight: 600;
    color: var(--dark);
    font-size: 0.9rem;
}

.input-group input,
.input-group select {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    color: var(--dark);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(67, 97, 238, 0.2);
}

.input-group input::placeholder {
    color: var(--gray);
}

/* ================ CALCULATE BUTTON ================ */
.calculate-btn {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--sombra-neon);
}

.calculate-btn:active {
    transform: translateY(0);
}

/* ================ RESULT SECTION ================ */
.result-section {
    background: rgba(255,255,255,0.05);
    border-radius: 15px;
    padding: 1.5rem;
    border: 1px solid rgba(255,255,255,0.1);
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.result-item:last-child {
    border-bottom: none;
}

.result-item span {
    color: var(--gray);
    font-weight: 500;
}

.result-item strong {
    color: var(--primary);
    font-size: 1.1rem;
    font-weight: 700;
}

/* ================ NOTIFICATION ================ */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--gradient-primary);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: var(--sombra-forte);
    transform: translateX(400px);
    transition: transform 0.3s ease;
    z-index: 10000;
}

.notification.show {
    transform: translateX(0);
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.notification-icon {
    font-size: 1.2rem;
}

/* ================ RESPONSIVE DESIGN ================ */
@media (max-width: 1024px) {
    .calculators-grid {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 1rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 1rem;
    }
    
    .page-title {
        font-size: 1.5rem;
    }
    
    .calculator-tabs {
        flex-direction: column;
        align-items: stretch;
    }
    
    .tab-btn {
        justify-content: center;
    }
    
    .calculator-card {
        padding: 1.5rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .calculators-grid {
        grid-template-columns: 1fr;
    }
    
    .calculator-card {
        padding: 1rem;
    }
    
    .card-header h3 {
        font-size: 1.1rem;
    }
    
    .result-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .result-item strong {
        font-size: 1rem;
    }
}