:root {
    /* Light Mode, Vibrant Theme Colors */
    --bg-color: #f0fdf4;
    --bg-gradient: linear-gradient(135deg, #e0f2fe 0%, #fdf4ff 50%, #f0fdf4 100%);
    --card-bg: rgba(255, 255, 255, 0.85);
    --card-border: rgba(255, 255, 255, 0.5);
    
    --primary-text: #1e293b;
    --secondary-text: #64748b;
    --accent-color: #8b5cf6; /* Vibrant Purple */
    --accent-hover: #7c3aed;
    --accent-gradient: linear-gradient(135deg, #8b5cf6 0%, #d946ef 100%);
    
    --input-bg: rgba(255, 255, 255, 0.9);
    --input-border: #cbd5e1;
    --input-focus: #8b5cf6;
    
    --success-bg: #dcfce7;
    --success-text: #166534;
    --warning-bg: #fef9c3;
    --warning-text: #854d0e;
    
    --shadow-soft: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
    --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.03);
    
    --border-radius: 16px;
    --border-radius-sm: 8px;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg-gradient);
    background-attachment: fixed;
    color: var(--primary-text);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Background Shapes for extra vibrancy */
.bg-shape {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.6;
    animation: float 20s infinite ease-in-out alternate;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: rgba(139, 92, 246, 0.4);
    top: -100px;
    left: -100px;
}

.shape-2 {
    width: 500px;
    height: 500px;
    background: rgba(217, 70, 239, 0.3);
    bottom: -150px;
    right: -100px;
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 50px) scale(1.1); }
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* Typography & Header */
.app-header {
    text-align: center;
    margin-bottom: 3rem;
}

.icon-wrap {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 64px;
    height: 64px;
    background: white;
    border-radius: 50%;
    box-shadow: var(--shadow-soft);
    margin-bottom: 1rem;
}

.icon {
    font-size: 2rem;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
    color: var(--primary-text);
}

.highlight {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.app-header p {
    color: var(--secondary-text);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Cards (Glassmorphism) */
.glass-panel {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
    margin-bottom: 2rem;
    padding: 2rem;
    transition: var(--transition);
}

.glass-panel:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.card-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.card-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.icon-small {
    font-size: 1.25rem;
}

/* Inputs Grid */
.inputs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.full-width {
    grid-column: 1 / -1;
}

label {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--primary-text);
}

.hint {
    font-size: 0.75rem;
    color: var(--secondary-text);
    font-weight: 400;
}

input[type="number"], select {
    width: 100%;
    padding: 0.875rem 1rem;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    color: var(--primary-text);
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-inner);
    transition: var(--transition);
    outline: none;
}

input[type="number"]:focus, select:focus {
    border-color: var(--input-focus);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

/* Remove Arrows from Number Inputs */
input[type=number]::-webkit-inner-spin-button, 
input[type=number]::-webkit-outer-spin-button { 
  -webkit-appearance: none; 
  margin: 0; 
}
input[type=number] {
    -moz-appearance: textfield;
}

/* Dynamic Displays */
.dynamic-displays {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.display-box {
    background: rgba(0,0,0,0.02);
    border-radius: var(--border-radius-sm);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    border: 1px dashed #cbd5e1;
}

.display-box .label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    color: var(--secondary-text);
}

.display-box .value {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--primary-text);
}

/* Button */
.btn-calculate {
    grid-column: 1 / -1;
    background: var(--accent-gradient);
    color: white;
    font-family: inherit;
    font-size: 1.125rem;
    font-weight: 600;
    padding: 1rem;
    border: none;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-top: 1rem;
    position: relative;
    overflow: hidden;
}

.btn-calculate::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-20deg);
    transition: all 0.7s ease;
}

@keyframes pulseScale {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2); }
    100% { transform: scale(1); }
}

.btn-calculate:hover {
    animation: pulseScale 1.5s infinite;
}

.btn-calculate:hover::after {
    left: 100%;
    transition: all 0.7s ease;
}

.btn-calculate:active {
    transform: translateY(0) scale(0.98);
}

/* Info Panel */
.info-panel {
    grid-column: 1 / -1;
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--warning-bg);
    border-radius: var(--border-radius-sm);
    color: var(--warning-text);
    font-size: 0.9rem;
}

.info-panel h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.info-panel ol {
    padding-left: 1.5rem;
}

.info-panel li {
    margin-bottom: 0.25rem;
}

/* Results Section */
.results-card {
    border-top: 4px solid var(--accent-color);
}

.hidden {
    display: none !important;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.result-box {
    padding: 2rem;
    border-radius: var(--border-radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.result-box .icon-bg {
    font-size: 3rem;
    opacity: 0.1;
    position: absolute;
    right: -10px;
    bottom: -10px;
    transform: rotate(-15deg);
}

.primary-result {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 10px 25px rgba(139, 92, 246, 0.2);
    animation: popIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.2s;
    opacity: 0;
    transform: scale(0.9);
}

@keyframes popIn {
    0% { transform: scale(0.9); opacity: 0; }
    70% { transform: scale(1.05); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

.secondary-result {
    background: var(--success-bg);
    color: var(--success-text);
    border: 1px solid rgba(22, 101, 52, 0.1);
}

.result-label {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    z-index: 1;
}

.primary-result .result-label {
    color: rgba(255, 255, 255, 0.9);
}

.result-value {
    font-size: 2.5rem;
    font-weight: 700;
    z-index: 1;
}

/* FAQ */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.faq-item {
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.faq-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.question {
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.q-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 24px;
    height: 24px;
    background: var(--accent-color);
    color: white;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: bold;
}

.answer {
    color: var(--secondary-text);
    padding-left: 2rem;
    font-size: 0.95rem;
}

/* Footer */
footer {
    text-align: center;
    margin-top: 3rem;
    padding-bottom: 2rem;
}

footer p {
    color: var(--secondary-text);
    font-size: 0.875rem;
}

/* Animation for Results */
@keyframes slideDownFade {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.results-card:not(.hidden) {
    animation: slideDownFade 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Responsive - Tablet (max-width: 768px) */
@media (max-width: 768px) {
    .container {
        padding: 1.5rem 1rem;
    }
    
    h1 {
        font-size: 2.25rem;
    }

    .glass-panel {
        padding: 1.5rem;
    }
    
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .chart-container {
        height: 300px;
    }
    
    .inputs-grid {
        grid-template-columns: 1fr;
    }
    
    .dynamic-displays {
        grid-template-columns: 1fr;
    }
}

/* Responsive - Mobile (max-width: 480px) */
@media (max-width: 480px) {
    h1 {
        font-size: 1.75rem;
    }

    .app-header {
        margin-bottom: 2rem;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-card {
        padding: 1.5rem;
        min-height: 180px;
    }

    .dashboard-card .card-icon-bg {
        font-size: 5rem;
        bottom: -10px;
        right: -10px;
    }
    
    .card-arrow {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
    
    .result-value {
        font-size: 2rem;
    }
    
    .result-box {
        padding: 1.5rem;
    }

    .btn-calculate {
        font-size: 1rem;
        padding: 0.875rem;
    }
}

/* Advanced Results */
.advanced-results {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.premium-details {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    transition: var(--transition);
}

.premium-details:hover {
    background: rgba(255, 255, 255, 0.8);
}

.premium-details summary {
    padding: 1rem 1.5rem;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--primary-text);
    outline: none;
}

.premium-details summary::-webkit-details-marker {
    display: none;
}

.premium-details summary::after {
    content: '+';
    font-size: 1.25rem;
    color: var(--accent-color);
    transition: transform 0.3s ease;
}

.premium-details[open] summary::after {
    transform: rotate(45deg);
}

.premium-details[open] summary {
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.chart-container {
    padding: 1.5rem;
    background: white;
    height: 400px;
    width: 100%;
}

.table-container {
    padding: 1.5rem;
    background: white;
    overflow-x: auto;
}

.schedule-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    text-align: right;
}

.schedule-table th, .schedule-table td {
    padding: 0.75rem;
    border-bottom: 1px solid #e2e8f0;
}

.schedule-table th {
    background: #f8fafc;
    font-weight: 600;
    color: var(--secondary-text);
    position: sticky;
    top: 0;
}

.schedule-table th:first-child, .schedule-table td:first-child {
    text-align: center;
    font-weight: 600;
}

.schedule-table tbody tr:hover {
    background: #f1f5f9;
}

/* Dashboard & Navigation Styles */
.top-nav {
    margin-bottom: 2rem;
}

.nav-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.25rem;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    border: 1px solid var(--card-border);
    border-radius: 50px;
    color: var(--primary-text);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.nav-btn:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    color: var(--accent-hover);
}

.dashboard-container {
    max-width: 1200px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.dashboard-card {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    padding: 2.5rem;
    border-top: 4px solid var(--accent-color);
    overflow: hidden;
    min-height: 220px;
    opacity: 0;
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.dashboard-card .card-icon-bg {
    font-size: 6rem;
    position: absolute;
    right: -10px;
    bottom: -20px;
    opacity: 0.05;
    transform: rotate(-15deg);
    transition: var(--transition);
}

.dashboard-card:hover .card-icon-bg {
    transform: rotate(0deg) scale(1.1);
    opacity: 0.1;
}

.card-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--primary-text);
}

.card-content p {
    color: var(--secondary-text);
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
    z-index: 1;
    position: relative;
}

.card-arrow {
    position: absolute;
    bottom: 2rem;
    right: 2.5rem;
    width: 40px;
    height: 40px;
    background: var(--accent-gradient);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: bold;
    opacity: 0;
    transform: translateX(-10px);
    transition: var(--transition);
}

.dashboard-card:hover .card-arrow {
    opacity: 1;
    transform: translateX(0);
}

.dashboard-card:nth-child(1) { animation-delay: 0.1s; }

.dashboard-card:nth-child(2) { border-top-color: #3b82f6; animation-delay: 0.2s; }
.dashboard-card:nth-child(2) .card-arrow { background: linear-gradient(135deg, #3b82f6 0%, #0ea5e9 100%); }

.dashboard-card:nth-child(3) { border-top-color: #10b981; animation-delay: 0.3s; }
.dashboard-card:nth-child(3) .card-arrow { background: linear-gradient(135deg, #10b981 0%, #059669 100%); }

.dashboard-card:nth-child(4) { border-top-color: #f59e0b; animation-delay: 0.4s; }
.dashboard-card:nth-child(4) .card-arrow { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); }

.dashboard-card:nth-child(5) { border-top-color: #14b8a6; animation-delay: 0.5s; }
.dashboard-card:nth-child(5) .card-arrow { background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%); }

.dashboard-card:nth-child(6) { border-top-color: #f43f5e; animation-delay: 0.6s; }
.dashboard-card:nth-child(6) .card-arrow { background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%); }

