:root {
    /* Premium Color Palette */
    --primary-dark: #0f172a;
    /* Slate 900 - Deepest background */
    --primary-deep: #1e293b;
    /* Slate 800 - Secondary dark */
    --primary-blue: #2563eb;
    /* Vibrant blue for actions */
    --primary-blue-dark: #1d4ed8;

    --accent-gold: #b45309;
    /* Refined gold/amber */
    --accent-gold-light: #f59e0b;

    --text-main: #1e293b;
    /* Almost black for readability */
    --text-secondary: #475569;
    /* Muted text */
    --text-light: #94a3b8;

    --bg-body: #f8fafc;
    /* Very clean slate white */
    --bg-card: #ffffff;
    --bg-surface: #f1f5f9;

    --border-light: #e2e8f0;
    --border-medium: #cbd5e1;

    /* Shadows - Soft & Diffused */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    --shadow-xl: 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.06);

    /* Border Radius */
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 500ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Fonts */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography Enhancements */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--primary-dark);
    line-height: 1.2;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

/* ===== HERO SECTION ===== */
.hero-section {
    position: relative;
    height: 90vh;
    min-height: 600px;
    background-color: var(--primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: white;
}

/* Animated Gradient Background */
.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 15% 50%, rgba(37, 99, 235, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 85% 30%, rgba(212, 175, 55, 0.1) 0%, transparent 40%);
    z-index: 1;
    animation: pulseGlow 10s ease-in-out infinite alternate;
}

@keyframes pulseGlow {
    0% {
        opacity: 0.5;
        transform: scale(1);
    }

    100% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.3), rgba(15, 23, 42, 0.6));
    z-index: 2;
    backdrop-filter: blur(1px);
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    width: 100%;
    max-width: 1000px;
    padding: 0 2rem;
}

.hero-text-wrapper {
    margin-bottom: 3rem;
}

.hero-label {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.2rem;
    text-transform: uppercase;
    color: var(--accent-gold-light);
    margin-bottom: 1.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid rgba(252, 211, 77, 0.3);
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(5px);
    opacity: 0;
    animation: slideDownFade 0.8s ease forwards 0.2s;
}

@keyframes slideDownFade {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-slider-text {
    position: relative;
    height: 180px;
    display: flex;
    justify-content: center;
}

.hero-slide-text {
    position: absolute;
    width: 100%;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    transition: all 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
}

.hero-slide-text.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.hero-title {
    font-size: clamp(3rem, 6vw, 4.5rem);
    font-weight: 700;
    color: white;
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.hero-desc {
    font-size: clamp(1.125rem, 2vw, 1.35rem);
    color: rgba(255, 255, 255, 0.9);
    font-weight: 300;
    max-width: 700px;
    margin: 0 auto;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Slider Controls */
.slider-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
}

.slider-arrow {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition-base);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-arrow:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.3);
}

.slider-dots {
    display: flex;
    gap: 0.75rem;
}

.slider-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: var(--transition-base);
}

.slider-dot.active {
    background: var(--accent-gold-light);
    transform: scale(1.5);
    box-shadow: 0 0 10px rgba(252, 211, 77, 0.5);
}

/* Scroll Indicator */
.scroll-down {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    transition: var(--transition-base);
    animation: float 3s ease-in-out infinite;
    z-index: 10;
}

.scroll-down:hover {
    color: white;
}

@keyframes float {

    0%,
    100% {
        transform: translate(-50%, 0);
    }

    50% {
        transform: translate(-50%, -10px);
    }
}

/* ===== MAIN HEADER ===== */
.main-header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    position: relative;
    z-index: 1;
}

.logo-wrapper {
    text-align: center;
}

.logo {
    font-size: 2rem;
    color: var(--primary-dark);
    margin-bottom: 0px;
    letter-spacing: -0.02em;
}

.tagline {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 400;
    letter-spacing: 0.02em;
}

/* ===== MAIN CONTENT ===== */
.main-content {
    padding: 3rem 0 6rem;
}

/* Category Tabs - Modern Pill Style */
.category-tabs {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 0 auto 3rem;
    padding: 0.5rem;
    background: white;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-md);
    width: fit-content;
    border: 1px solid var(--border-light);
}

.tab-button {
    padding: 0.75rem 2rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9375rem;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition-base);
}

.tab-button:hover {
    color: var(--primary-dark);
    background-color: var(--bg-surface);
}

.tab-button.active {
    background-color: var(--primary-dark);
    color: white;
    box-shadow: var(--shadow-md);
}

/* Calculator Card */
.calculator-wrapper {
    max-width: 850px;
    margin: 0 auto;
}

.calculator-section {
    display: none;
    animation: fadeInScale 0.4s ease-out;
}

.calculator-section.active {
    display: block;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.98);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.calculator-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    border: 1px solid var(--border-light);
}

.card-header {
    padding: 2.5rem 2rem 1.5rem;
    text-align: center;
    position: relative;
}

/* Accent line at top of card */
.calculator-card::before {
    content: '';
    display: block;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-blue), var(--accent-gold-light));
    width: 100%;
}

.card-header h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.card-header p {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Form Styling */
.calculator-form {
    padding: 1rem 3rem 3rem;
}

.form-group {
    margin-bottom: 2rem;
}

label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--primary-navy);
    letter-spacing: 0.01em;
}

/* Input Styles */
input[type="text"],
input[type="number"],
select {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    font-size: 1rem;
    color: var(--text-main);
    background: var(--bg-body);
    transition: var(--transition-fast);
    box-shadow: var(--shadow-inner);
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus {
    outline: none;
    border-color: var(--primary-blue);
    background: white;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.input-group {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1rem;
}

/* Radio Buttons - Custom */
.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.radio-label {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 0.75rem 1.25rem;
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
    background: white;
}

.radio-label:hover {
    background: var(--bg-surface);
    border-color: var(--primary-blue);
}

/* Hide default radio, style container based on state */
.radio-label input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}



/* Actually, simpler way specifically for the checked style on the label wrapper: */
.radio-label:has(input:checked) {
    background: rgba(37, 99, 235, 0.05);
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}

.radio-custom {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-medium);
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
}

.radio-label input:checked~.radio-custom {
    border-color: var(--primary-blue);
    background: var(--primary-blue);
}

.radio-label input:checked~.radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
}

/* Buttons */
.btn-primary {
    width: 100%;
    padding: 1.125rem;
    background: var(--primary-dark);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: var(--transition-base);
    box-shadow: var(--shadow-lg);
    margin-top: 1rem;
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    background: var(--primary-deep);
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    width: 100%;
    padding: 1rem;
    background: white;
    border: 2px dashed var(--border-medium);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-base);
    margin-bottom: 1rem;
}

.btn-secondary:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
    background: rgba(37, 99, 235, 0.03);
}

/* Tier Items */
.tier-item {
    background: var(--bg-body);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    border: 1px solid var(--border-light);
}

.tier-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--primary-navy);
}

.remove-tier {
    color: #ef4444;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
}

.remove-tier:hover {
    background: #fef2f2;
}

/* ===== RESULT SECTION ===== */
.result-container {
    margin-top: 3rem;
    animation: slideUp 0.6s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border-light);
}

.result-header {
    background: var(--primary-dark);
    padding: 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Abstract pattern in header */
.result-header::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 60%);
    animation: rotateSlow 20s linear infinite;
}

@keyframes rotateSlow {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.result-header h3 {
    color: white;
    font-size: 1.75rem;
    position: relative;
    z-index: 10;
    margin: 0;
}

.result-content {
    padding: 2.5rem;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--border-light);
}

.result-item:last-of-type {
    border-bottom: none;
}

.result-label {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
}

.result-value {
    color: var(--primary-dark);
    font-weight: 700;
    font-size: 1.1rem;
    text-align: right;
}

/* Highlighted Result */
.result-item.highlight {
    background: linear-gradient(to right, rgba(37, 99, 235, 0.05), rgba(37, 99, 235, 0.1));
    margin: 1.5rem -1rem;
    /* Negative margin to make it bleed slightly */
    padding: 1.5rem 2rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-bottom: 1px solid rgba(37, 99, 235, 0.2);
}

.result-item.highlight .result-label {
    color: var(--primary-blue-dark);
    font-size: 1.1rem;
}

.result-item.highlight .result-value {
    color: var(--primary-blue);
    font-size: 1.5rem;
    font-family: var(--font-heading);
}

.result-actions {
    display: flex;
    gap: 1rem;
    padding: 0 2.5rem 2.5rem;
}

.btn-outline {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem;
    background: white;
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-base);
}

.btn-outline:hover {
    border-color: var(--primary-dark);
    color: var(--primary-dark);
    background: var(--bg-surface);
}

.disclaimer {
    margin: 0 2.5rem 2.5rem;
    padding: 1rem;
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    color: #92400e;
    line-height: 1.5;
}

/* ===== FOOTER ===== */
.main-footer {
    background: var(--primary-dark);
    color: var(--text-light);
    padding: 4rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-brand h3 {
    color: white;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.footer-info p {
    font-size: 0.875rem;
    opacity: 0.7;
}

.powered-by {
    margin-top: 0.5rem;
    font-size: 0.8rem !important;
    /* Slightly smaller */
}

.powered-by a {
    color: inherit;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.powered-by a:hover {
    color: var(--accent-gold-light);
}

/* ===== UTILITIES & RESPONSIVE ===== */
hr {
    border: none;
    border-top: 1px solid var(--border-light);
    margin: 1.5rem 0;
}

@media (max-width: 768px) {
    .hero-section {
        height: auto;
        padding: 6rem 0;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .main-content {
        padding-bottom: 6rem;
        /* Prevent content from being hidden behind text nav */
    }

    .category-tabs {
        position: fixed;
        bottom: 1.25rem;
        left: 50%;
        transform: translateX(-50%);
        width: 90%;
        max-width: 450px;
        margin: 0;
        padding: 0.35rem 0.5rem;
        background: var(--primary-dark);
        border: 1px solid rgba(255, 255, 255, 0.12);
        border-radius: 16px;
        /* Reduced from 999px */
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
        z-index: 1000;
        display: flex;
        justify-content: space-between;
        align-items: center;
        overflow-x: auto;
        gap: 0;
        /* Remove gap to use dividers */
        -webkit-overflow-scrolling: touch;
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    .category-tabs::-webkit-scrollbar {
        display: none;
    }

    .tab-button {
        background: transparent;
        color: rgba(255, 255, 255, 0.7);
        flex: 1;
        min-width: auto;
        padding: 0.75rem 0.5rem;
        font-size: 0.8rem;
        font-weight: 500;
        box-shadow: none;
        border: none;
        border-radius: 12px;
        /* Reduced from 999px */
        white-space: nowrap;
        text-align: center;
        position: relative;
        transition: all 0.3s ease;
    }

    /* Separator Line */
    .tab-button:not(:last-child)::after {
        content: '';
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        height: 12px;
        width: 1px;
        background: rgba(255, 255, 255, 0.15);
        transition: opacity 0.2s ease;
    }

    /* Hide separator near active item for clean look */
    .tab-button.active::after,
    .tab-button:has(+ .active)::after {
        opacity: 0;
    }

    .tab-button.active {
        background: var(--bg-body);
        color: var(--primary-dark);
        font-weight: 700;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    }

    .calculator-form {
        padding: 1.5rem;
    }

    .input-group,
    .result-actions {
        grid-template-columns: 1fr;
        flex-direction: column;
    }

    .card-header {
        padding: 2rem 1.5rem;
    }
}