/* ----- MODERN RESET & VARIABLES ----- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --header-bg: #050B14;
    --footer-bg: #050B14;
    --bg-deep: #050B14;
    --bg-card: #050B14;
    --accent: #D4AF37;
    --accent-glow: rgba(212, 175, 55, 0.3);
    --glass-bg: rgba(5, 11, 20, 0.95);
    --glass-border: rgba(212, 175, 55, 0.4);
    --card-shadow: 0 25px 60px rgba(0, 0, 0, 0.9), inset 0 0 1px rgba(212, 175, 55, 0.3);
    --border-light: rgba(212, 175, 55, 0.25);
    --text-white: #FFFAFA;
    --text-muted: rgba(255, 250, 250, 0.75);
    --header-text: #FFFAFA;

    --shadow-heavy: 0 30px 70px -15px rgba(0, 0, 0, 0.95);
    --radius-md: 32px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --input-bg: #050B14;
    --input-border: rgba(212, 175, 55, 0.5);
    --card-border: rgba(212, 175, 55, 0.4);
    --input-focus: rgba(212, 175, 55, 0.6);
    --logo-main: #D4AF37;
    --header-accent: #D4AF37;

    --body-bg-img: radial-gradient(circle at 50% 50%, #0A192F 0%, #050B14 100%);
    --bg-result-card: rgba(255, 255, 255, 0.03);
    --result-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

body.light-theme {
    --header-bg: #FEF5D4;
    --footer-bg: #FEF5D4;
    --bg-deep: #FDF1C6;
    --bg-card: rgba(254, 245, 212, 0.9);
    --accent: #3E2723;
    --text-white: #3E2723;
    --text-muted: #5D4037;
    --border-light: rgba(62, 39, 35, 0.1);
    --shadow-heavy: 0 20px 25px -5px rgba(62, 39, 35, 0.08), 0 10px 10px -5px rgba(62, 39, 35, 0.04);
    --input-bg: #FFFFFF;
    --input-border: rgba(62, 39, 35, 0.2);
    --card-border: rgba(62, 39, 35, 0.1);
    --input-focus: rgba(62, 39, 35, 0.3);
    --logo-main: #3E2723;
    --header-text: #3E2723;
    --glass-bg: rgba(254, 245, 212, 0.85);
    --card-shadow: 0 20px 40px rgba(62, 39, 35, 0.08), inset 0 0 40px rgba(255, 255, 255, 0.5);
    --body-bg-img: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23000' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4v-4H4v4H0v2h4v4h2v-4h4v-2H6zM36 4v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    --bg-result-card: rgba(62, 39, 35, 0.04);
    --result-shadow: 0 10px 15px -3px rgba(62, 39, 35, 0.1);
}

html {
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    background-color: var(--bg-deep);
    transition: background-color 0.3s ease;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-deep);
    background-image: var(--body-bg-img);
    background-attachment: fixed;
    background-size: cover;
    color: var(--text-white);
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    min-height: 100dvh;
    width: 100%;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;

    position: relative;
}

body::before,
body::after {
    content: "";
    position: fixed;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.15) 0%, transparent 70%);
    z-index: -1;
    pointer-events: none;
    filter: blur(80px);
}

body::before {
    top: -100px;
    left: -100px;
    animation: orb-float 20s infinite alternate;
}

body::after {
    bottom: -100px;
    right: -100px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.1) 0%, transparent 70%);
    animation: orb-float 25s infinite alternate-reverse;
    will-change: transform, opacity;
}

@keyframes orb-float {
    0% {
        transform: translate3d(0, 0, 0) scale(1) rotate(0deg);
    }

    50% {
        transform: translate3d(5vw, 5vh, 0) scale(1.3) rotate(180deg);
    }

    100% {
        transform: translate3d(-5vw, 10vh, 0) scale(1.1) rotate(360deg);
    }
}

input,
button,
select,
textarea {
    font-family: 'Inter', sans-serif;
}

button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    filter: grayscale(0.8);
    pointer-events: none;
}

/* ----- HEADER ----- */
.global-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: calc(75px + env(safe-area-inset-top, 0px));
    background-color: var(--header-bg);
    color: var(--header-text);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: env(safe-area-inset-top, 0px) 20px 0 20px;
    z-index: 1000;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-light);
}

.header-inner {
    width: 100%;
    max-width: 1280px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.site-slogan {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 4px;
    font-weight: 500;
    opacity: 0.9;
    line-height: 1.4;
    white-space: normal;
    max-width: 500px;
    overflow: visible;
    letter-spacing: 0.2px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}.app-title {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    transition: var(--transition);
}

.app-logo {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.app-title:hover .app-logo {
    transform: rotate(5deg) scale(1.1);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.3);
}

.header-left {
    display: flex;
    align-items: center;
    min-width: 0;
    flex: 1;
}

.logo-text-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.1;
}

.input-field.readonly-field {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    cursor: not-allowed;
    border-color: rgba(255, 255, 255, 0.1);
}

.logo-main {
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    font-weight: 800;
    color: #D4AF37;
    background: linear-gradient(135deg, #D4AF37 0%, #FFF5CC 25%, #D4AF37 50%, #B8860B 75%, #D4AF37 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
    text-transform: uppercase;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

body.light-theme .logo-main {
    background: linear-gradient(135deg, #434343 0%, #000000 50%, #434343 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-title-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.logo-sub {
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #FFFAFA;
    background: none;
    -webkit-text-fill-color: initial;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    opacity: 0.8;
}

body.light-theme .logo-sub {
    background: linear-gradient(135deg, #434343 0%, #000000 50%, #434343 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.app-title:hover {
    transform: scale(1.02);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.action-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    background-color: rgba(10, 30, 60, 0.5);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    position: relative;
    overflow: hidden;
}

.action-btn:hover,
.action-btn.active {
    background-color: #1A3A6A;
    border-color: #D4AF37;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(212, 175, 55, 0.3);
}

.primary-btn {
    position: relative;
    overflow: hidden;
}

.primary-btn::after {
    content: "";
    position: absolute;
    top: -50%;
    left: -60%;
    width: 20%;
    height: 200%;
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(30deg);
    transition: none;
    animation: shimmer-btn 4s infinite;
}

@keyframes shimmer-btn {
    0% {
        left: -60%;
    }

    20% {
        left: 120%;
    }

    100% {
        left: 120%;
    }
}

.secondary-btn:active,
.primary-btn:active {
    transform: scale(0.96);
}

/* Button Ripple Effect */
.ripple {
    position: absolute;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: scale(0);
    animation: ripple-animation 0.6s linear;
    pointer-events: none;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

body.light-theme .action-btn {
    background: #E5E7EB;
    border-color: #9CA3AF;
    color: #000000;
}

body.light-theme .action-btn:hover {
    background: #D1D5DB;
}

.theme-toggle-wrapper {
    display: inline-flex;
    align-items: center;
    width: 36px;
    height: 36px;
    justify-content: center;
    border-radius: 50%;
    background: rgba(10, 30, 60, 0.7);
    border: 1px solid #3A5690;
    transition: var(--transition);
    cursor: pointer;
    color: #6AB0FF;
    font-size: 1.1rem;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}



body.light-theme .theme-toggle-wrapper {
    background: #E5E7EB;
    border-color: #9CA3AF;
    color: #000000;
}



.theme-toggle-wrapper:hover {
    border-color: var(--header-accent);
    background-color: rgba(10, 30, 80, 0.8);
    transform: translateY(-2px);
}



body.light-theme .theme-toggle-wrapper:hover {
    background-color: #D1D5DB;
    border-color: #000000;
}

/* ----- BOTTOM NAV ----- */
.bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 65px;
    background: var(--header-bg);
    justify-content: space-around;
    align-items: center;
    padding-bottom: env(safe-area-inset-bottom);
    z-index: 2000;
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.4);
    border-top: 1px solid var(--border-light);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
}

.bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.7rem;
    gap: 5px;
    transition: var(--transition);
    padding: 8px 0;
}

.bottom-nav-item i {
    font-size: 1.1rem;
    color: var(--accent);
}

.bottom-nav-item.active {
    color: var(--accent);
}

body.light-theme .bottom-nav-item i {
    color: #000000;
}

body.light-theme .bottom-nav-item.active i {
    color: #000000;
    font-weight: 800;
}

/* ----- FOOTER ----- */
.global-footer {
    background-color: var(--header-bg);
    color: var(--text-white);
    padding: 10px 20px 8px;
    text-align: center;
    border-top: 1px solid var(--border-light);
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.1);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    margin-top: auto;
    flex-shrink: 0;
    line-height: 1.6;
    box-sizing: border-box;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 18px 24px;
    margin: 0 auto 8px;
    flex-wrap: wrap;
    max-width: 1200px;
}

.footer-links a {
    color: var(--text-white);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.85rem;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    border-bottom: 1px solid transparent;
    padding-bottom: 2px;
}

.footer-links a i {
    color: var(--header-accent);
    font-size: 1rem;
    transition: transform 0.2s;
}

body.light-theme .footer-links a i {
    color: #000000;
}

.footer-links a:hover,
.footer-links a.active {
    color: var(--accent);
    text-shadow: 0 0 8px rgba(212, 175, 55, 0.3);
    border-bottom-color: var(--accent);
}

.golden-line-box-btn {
    border: 1px solid var(--accent) !important;
    padding: 6px 14px !important;
    border-radius: 12px !important;
    background: rgba(212, 175, 55, 0.05) !important;
    transition: var(--transition) !important;
}

.golden-line-box-btn:hover {
    background: rgba(212, 175, 55, 0.15) !important;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.2);
    transform: translateY(-2px);
}

.footer-links a:hover i {
    transform: translateY(-2px);
}

.footer-copyright {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    font-size: 0.75rem;
    opacity: 0.8;
    border-top: 1px dashed rgba(212, 175, 55, 0.2);
    padding-top: 10px;
    color: var(--text-muted);
}

.footer-brand-small {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-right: 12px;
    padding-right: 12px;
    border-right: 1px solid rgba(212, 175, 55, 0.3);
}

.footer-logo-small {
    width: 20px;
    height: 20px;
    border-radius: 4px;
}


/* ----- COMMON UI COMPONENTS ----- */
.app-container {
    max-width: 1280px;
    width: 100%;
    background: rgba(5, 11, 20, 0.4);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-radius: 32px;
    padding: 30px 40px 15px 40px;
    margin: 110px auto 10px auto;
    position: relative;
    border: 1px solid var(--border-light);
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.8);
}

.app-container h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 2.2rem;
    margin-bottom: 12px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    color: var(--text-white);
    position: relative;
    z-index: 1;
}

.app-container h1 span {
    background: linear-gradient(135deg, #D4AF37 0%, #FFD700 25%, #D4AF37 50%, #B8860B 75%, #D4AF37 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.app-container h1 i {
    color: #D4AF37;
    filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.4));
}

.form-group {
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
    text-align: left;
}

textarea.input-field {
    min-height: 120px;
    resize: vertical;
}





/* ----- WEB VIEW (Desktop) ----- */
@media (min-width: 992px) and (orientation: landscape) {
    .bottom-nav {
        display: none !important;
    }
}

@media (max-width: 991px), (orientation: portrait) {

    .tab-btn {
        flex: 1;
        flex-direction: column;
        flex-shrink: 1 !important;
        gap: 3px !important;
        padding: 8px 2px !important;
        font-size: clamp(9px, 2.8vw, 11px) !important;
        min-width: 0;
        text-align: center;
    }

    .tab-btn i {
        font-size: 16px;
        margin-right: 0 !important;
    }

    .tab-btn span {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: clip;
        width: auto;
        font-size: clamp(9px, 2.5vw, 10px);
        font-weight: 700;
        letter-spacing: -0.2px;
        display: block;
    }

    .bottom-nav {
        display: flex !important;
    }

    .header-right {
        display: flex !important;
    }

    .tab-btn {
        display: flex !important;
    }

    .app-container {
        margin-top: calc(85px + env(safe-area-inset-top, 0px));
        margin-bottom: 0;
        width: 100%;
        padding: 0 10px 10px 10px;
        background: transparent;
        box-shadow: none;
        border: none;
    }

    .global-footer {
        padding-bottom: calc(75px + env(safe-area-inset-bottom, 0px));
    }

    .bottom-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-decoration: none;
        color: var(--text-muted);
        font-size: 0.85rem;
        font-weight: 700;
        gap: 2px;
        flex: 1;
        transition: var(--transition);
        text-align: center;
    }

    .bottom-nav-item i {
        font-size: 18px;
        color: var(--header-accent);
        margin-bottom: 2px;
    }

    .bottom-nav-item.active {
        color: var(--accent);
    }

    .bottom-nav-item.active i {
        color: var(--accent);
        filter: drop-shadow(0 0 5px var(--accent-glow));
    }

    .bottom-nav-item.active span {
        color: var(--accent);
        font-weight: 700;
    }
}


.tabs-outer {
    margin-top: calc(clamp(80px, 12vh, 90px) + env(safe-area-inset-top, 0px));
    display: flex;
    justify-content: center;
    padding: 0 40px;
    z-index: 900;
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
}

/* Reduce distance smoothly between Tabs and Calculator Panels on desktop */
@media (min-width: 601px) {
    .tabs-outer + .app-container {
        margin-top: 10px !important;
    }
}

.tabs-container {
    display: flex;
    background: rgba(5, 11, 20, 0.8);
    padding: 5px;
    border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    gap: 6px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    width: auto;
    backdrop-filter: blur(15px);
}

.tab-btn {
    background: transparent;
    border: 1.5px solid transparent;
    padding: 8px 22px;
    border-radius: 100px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 1;
    white-space: nowrap;
    overflow: hidden;
    position: relative;
}

.tab-btn.active {
    color: var(--accent);
    background: rgba(212, 175, 55, 0.02);
    border-color: var(--accent);
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.1);
}

.tab-btn i {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
    transition: inherit;
}

.tab-btn.active i {
    color: var(--accent);
}

.tab-btn.active i {
    color: var(--accent);
    filter: drop-shadow(0 0 5px var(--accent-glow));
}

body.light-theme .tabs-container {
    background: #36454F;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

body.light-theme .tab-btn {
    color: rgba(255, 255, 255, 0.85);
}

body.light-theme .tab-btn i {
    color: rgba(255, 255, 255, 0.85);
}

body.light-theme .tab-btn.active {
    background: #2C3539;
    box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.5);
    color: #FFFAFA;
    border-color: transparent;
}

body.light-theme .tab-btn.active i {
    color: #FFFAFA;
    filter: none;
}

/* Calculator Grid */
.calculator-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

@media (min-width: 768px) {
    .calculator-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.input-section,
.result-section {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.calculator-panel {
    display: none;
}

.calculator-panel.active-panel {
    display: block;
    border: 2px solid var(--accent);
    box-shadow:
        0 0 0 1px rgba(212, 175, 55, 0.15),
        0 0 30px rgba(212, 175, 55, 0.25),
        0 0 80px rgba(212, 175, 55, 0.12),
        0 30px 80px rgba(0, 0, 0, 0.8),
        inset 0 0 60px rgba(212, 175, 55, 0.04);
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.input-with-select {
    display: flex;
    gap: 10px;
}


.calculator-panel {
    position: relative;
    z-index: 2;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 25px 20px;
    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.9),
        inset 0 0 1px rgba(212, 175, 55, 0.2);
    margin-bottom: 10px;
    border: 1px solid var(--card-border);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    animation: panelAppear 1s cubic-bezier(0.23, 1, 0.32, 1);
    transition: var(--transition);
}

@keyframes panelAppear {
    from {
        opacity: 0;
        transform: scale(0.98) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}


.calculator-panel:hover {
    border-color: var(--accent);
    box-shadow:
        0 0 25px rgba(212, 175, 55, 0.2),
        0 25px 60px rgba(0, 0, 0, 0.85),
        inset 0 0 1px rgba(212, 175, 55, 0.3);
    transform: translateY(-2px);
}

.panel-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-weight: 700;
    font-size: 18px;
    color: var(--text-white);
    background: linear-gradient(to right, var(--accent-glow), transparent);
    padding: 10px 16px;
    border-radius: 12px;
    border-left: 5px solid var(--accent);
}

.panel-header i {
    color: var(--accent);
    font-size: 20px;
}

/* Input Styles */
.input-row {
    display: flex;
    gap: 10px;
}

.input-row .input-group {
    flex: 1;
    margin-bottom: 6px;
}

.input-group {
    margin-bottom: 4px;
}

.input-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-white);
    padding-left: 2px;
}

.input-label i {
    color: var(--accent);
    font-size: 14px;
    width: 18px;
    text-align: center;
}

.input-field {
    width: 100%;
    padding: 10px 16px;
    border: 1px solid var(--input-border);
    border-radius: 14px;
    font-size: 15px;
    font-weight: 600;
    background: var(--input-bg);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-white);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

.input-field:hover {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 15px var(--accent-glow);
}

.input-field:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow:
        0 0 0 4px var(--input-focus),
        0 8px 20px rgba(0, 0, 0, 0.4);
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.input-group:focus-within .input-label i {
    transform: scale(1.2);
    color: #FFF;
    filter: drop-shadow(0 0 8px var(--accent));
}

.double-row {
    display: flex;
    gap: 8px;
    align-items: center;
    width: 100%;
    margin-bottom: 6px;
}

.double-row.mb-6 {
    margin-bottom: 4px;
}

.double-row.comp-result-row {
    margin: 10px 0 4px;
}

.double-row .input-group {
    flex: 1;
    margin-bottom: 0;
}

.tenure-dropdown {
    width: 100%;
    padding: 10px 32px 10px 16px;
    border: 1px solid var(--input-border);
    border-radius: 14px;
    font-size: clamp(12px, 3.5vw, 14px);
    font-weight: 600;
    background-color: var(--input-bg);
    color: var(--text-white);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23D4AF37' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

.tenure-dropdown:hover {
    border-color: var(--accent);
    background-color: rgba(255, 255, 255, 0.05);
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 14px;
    box-shadow: 0 0 15px var(--accent-glow);
}

.tenure-dropdown:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow:
        0 0 0 4px var(--input-focus),
        0 8px 20px rgba(0, 0, 0, 0.4);
    background-color: rgba(255, 255, 255, 0.1);
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 14px;
    transform: translateY(-2px);
}

.tenure-dropdown option {
    background-color: #0A192F;
    color: #FFFAFA;
}

body.light-theme .tenure-dropdown {
    background-color: var(--input-bg);
    color: var(--text-white);
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2336454F' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
    border-color: var(--input-border);
}

body.light-theme .tenure-dropdown option {
    background-color: var(--input-bg);
    color: var(--text-white);
}

.results-layout {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin: 8px 0 6px;
}

.result-card {
    background: var(--bg-result-card);
    border-radius: 20px;
    padding: 12px 10px;
    text-align: center;
    border: 1px solid var(--border-light);
    box-shadow: var(--result-shadow);
    transition: var(--transition);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 80px;
}

.result-card:hover {
    background: rgba(255, 255, 255, 0.07);
    transform: translateY(-3px);
    border-color: var(--accent);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), 0 0 15px var(--accent-glow);
}

.result-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 2px;
}

.result-value {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--accent);
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
    letter-spacing: -0.5px;
}

.primary-btn {
    width: 100%;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 18px;
    font-size: 1.05rem;
    font-weight: 800;
    cursor: pointer;
    transition: var(--transition);
    background: linear-gradient(135deg, #D4AF37 0%, #FFD700 50%, #D4AF37 100%);
    color: #050B14;
    box-shadow: 0 15px 35px rgba(212, 175, 55, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.primary-btn:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 15px 30px rgba(255, 255, 255, 0.4);
}

.primary-btn:active {
    transform: translateY(1px) scale(0.98);
}



body.light-theme .primary-btn {
    background: #000000;
    color: #FFFAFA;
    border: 2px solid #000000;
}

body.light-theme .primary-btn:hover {
    background: #FFFAFA;
    color: #000000;
}



/* ----- FORM & INTERACTIVE COMPONENTS ----- */
.description {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px dashed var(--border-light);
    text-align: center;
}

.robot-check {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    padding: 16px 20px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    margin-bottom: 30px;
    transition: var(--transition);
}

.robot-check span {
    font-weight: 600;
    font-size: 15px;
    color: var(--text-white);
}

.robot-check i {
    color: #D4AF37;
}

body.light-theme .robot-check {
    background: rgba(0, 0, 0, 0.03);
}

.robot-check:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #D4AF37;
}

.robot-check input {
    display: none;
}

.custom-check {
    width: 22px;
    height: 22px;
    border: 2px solid var(--accent);
    border-radius: 6px;
    position: relative;
    transition: all 0.2s;
    background: rgba(255, 255, 255, 0.05);
}

.robot-check input:checked+.custom-check {
    background: var(--accent);
}

.robot-check input:checked+.custom-check::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: #050B14;
    font-size: 12px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

body.light-theme .robot-check input:checked+.custom-check::after {
    color: #FFFAFA;
}

/* ----- LEGAL & COMPLIANCE STYLES ----- */
.legal-container {
    max-width: 1200px;
    width: calc(100% - 40px);
    margin: 130px auto 20px auto;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-heavy);
    border: 1px solid var(--border-light);
    padding: 30px 20px;
    color: var(--text-white);
    text-align: left;
    position: relative;
    z-index: 1;
    transition: var(--transition);
}

@media (max-width: 768px) {
    .legal-container {
        padding: 24px 20px 20px 20px;
        margin-top: calc(90px + env(safe-area-inset-top, 0px));
        margin-bottom: 0;
    }

    .legal-container h1 {
        font-size: 1.8rem;
    }
}

.legal-container .primary-btn {
    display: inline-flex;
    width: auto;
    padding: 14px 36px;
    text-decoration: none;
    align-items: center;
    gap: 12px;
    margin-top: 15px;
    background: transparent;
    border: 2px solid #FFFFFF;
    color: #FFFFFF;
    font-weight: 700;
    border-radius: 14px;
    transition: var(--transition);
}

.legal-container .primary-btn:hover {
    background: linear-gradient(135deg, #FFFFFF 0%, #E0E0E0 50%, #FFFFFF 100%);
    color: #0A192F;
    box-shadow: 0 8px 20px rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

.legal-section {
    margin-bottom: 30px;
}

.legal-section h2 {
    color: var(--accent);
    margin-bottom: 12px;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.legal-section h2 i {
    color: var(--accent);
    font-size: 1.2rem;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.3));
}

.legal-section p,
.legal-section li {
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 10px;
}

.effective-date {
    display: block;
    margin-bottom: 30px;
    font-style: italic;
    color: var(--text-muted);
    text-align: center;
}

.legal-container h1 {
    font-size: 2.2rem;
    margin-bottom: 10px;
    text-align: center;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.legal-container h1 span {
    background: linear-gradient(135deg, #D4AF37 0%, #F1D592 30%, #D4AF37 50%, #B8860B 70%, #D4AF37 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.legal-container h1 i {
    color: #D4AF37;
    filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.4));
}

/* ----- RESPONSIVE DESIGN (Webbase, Tab Base, Mobile Base) ----- */
/* Webbase - Desktop (Large Screens) */
@media (min-width: 1401px) {
    .app-container {
        max-width: 1280px;
        margin: 0 auto 10px auto;
        padding: 20px 40px 15px 40px;
        position: relative;
        z-index: 1;
    }

    .results-layout {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px;
        margin-top: 0;
    }


    .tab-btn {
        padding: 14px 28px;
        font-size: 16px;
    }
}

/* Webbase - Laptop/Monitor (1025px - 1400px) */
@media (min-width: 1025px) and (max-width: 1400px) {
    .app-container {
        max-width: 1280px;
        padding: 35px 40px 15px 40px;
        margin-top: 135px;
        margin-bottom: 10px;
    }

    .results-layout {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px;
        margin-top: 0;
    }

    .tab-btn {
        padding: 12px 22px;
        font-size: 15px;
    }
}

/* Mobile Base - Standard (<=600px) */
@media (max-width: 600px) {
    .tabs-outer {
        display: none !important;
    }

    .global-header {
        padding: env(safe-area-inset-top, 0px) 10px 0 10px;
        height: calc(70px + env(safe-area-inset-top, 0px));
        min-height: calc(70px + env(safe-area-inset-top, 0px));
        display: flex;
        align-items: center;
    }

    .header-inner {
        gap: 2px;
        width: 100%;
        justify-content: space-between;
    }

    .header-left {
        justify-content: flex-start;
    }

    .app-logo {
        width: 48px;
        height: 48px;
    }

    .logo-main {
        font-size: 16px;
    }

    .logo-sub {
        font-size: 10px;
    }

    .site-slogan {
        display: block;
        font-size: 10px;
        margin-top: 2px;
        max-width: 240px;
        line-height: 1.3;
        margin-left: auto;
        margin-right: auto;
    }

    .action-btn {
        width: 34px;
        height: 34px;
    }

    .input-row {
        flex-direction: column;
        gap: 0;
    }

    .double-row {
        flex-direction: row;
        gap: 8px;
        align-items: flex-start;
        margin-bottom: 6px;
    }

    /* Fix horizontal overflow by stacking columns vertically in complex input rows on mobile */
    #eligibilityPanel .double-row,
    #emirestPanel .double-row,
    .comparison-column .double-row {
        flex-direction: column;
        gap: 6px;
    }

    #eligibilityPanel .double-row .input-group,
    #emirestPanel .double-row .input-group,
    .comparison-column .double-row .input-group {
        width: 100%;
    }

    .double-row .input-label {
        font-size: 11px;
        white-space: normal;
        line-height: 1.1;
        gap: 4px;
        min-height: 20px;
    }

    .double-row .input-label i {
        font-size: 12px;
        width: 15px;
    }

    /* Compact inputs for mobile screens to maximize horizontal spacing */
    .input-field {
        padding: 8px 12px;
        font-size: 14px;
        border-radius: 10px;
    }

    .tenure-dropdown {
        padding: 8px 26px 8px 10px;
        border-radius: 10px;
        font-size: 13px;
    }

    .input-with-select {
        gap: 6px;
    }

    .comparison-column {
        padding: 12px 10px;
        border-radius: 16px;
    }

    .results-layout {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 6px;
    }

    .result-card {
        padding: 10px 8px;
        min-height: 70px;
        border-radius: 14px;
    }

    .result-label {
        font-size: 10px;
        margin-bottom: 2px;
    }

    .result-value {
        font-size: clamp(14px, 4vw, 1.1rem);
    }

    .action-button-row {
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        gap: 10px;
        padding-bottom: 5px;
        scrollbar-width: none;
    }

    .action-button-row::-webkit-scrollbar {
        display: none;
    }

    .action-button-row .secondary-btn {
        flex-shrink: 0;
        min-width: 100px;
        padding: 10px 15px;
    }

    /* Mobile Specific Tab Layout - FORCE ONE ROW */
    .tabs-container {
        padding: 5px;
        gap: 8px;
        border-radius: 100px;
        flex-wrap: nowrap;
        justify-content: flex-start;
    }

    .tabs-outer {
        overflow-x: auto;
        justify-content: flex-start;
        padding: 0 20px;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .tabs-outer::-webkit-scrollbar {
        display: none;
    }

    .tab-btn {
        padding: 8px 12px;
        flex-direction: column;
        gap: 4px;
        font-size: 10px;
        border-radius: 100px;
        flex: 0 0 auto;
        min-width: 70px;
        justify-content: center;
        height: auto;
    }

    .calculator-panel {
        padding: 18px 12px;
        border-radius: 20px;
        margin-bottom: 8px;
        width: 100%;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
        border-width: 1px;
    }

    .panel-header {
        font-size: 16px;
        padding: 10px 15px;
        margin-bottom: 12px;
        justify-content: center;
        text-align: center;
        border-left: none;
        border-bottom: 2px solid var(--accent);
        border-radius: 0 0 15px 15px;
        background: linear-gradient(to bottom, var(--accent-glow), transparent);
        width: fit-content;
        margin-left: auto;
        margin-right: auto;
    }

    .tab-btn i {
        font-size: 18px;
    }

    .tab-btn span {
        font-size: clamp(8px, 2.3vw, 10px);
        font-weight: 700;
        white-space: nowrap;
        overflow: hidden;
    }

    .promo-actions {
        gap: 6px;
        margin-top: 6px;
    }

    .footer-action-btn {
        min-width: 80px;
        padding: 6px 10px;
        font-size: 11px;
        gap: 4px;
        border-radius: 10px;
    }
}

/* Mobile Base - Small Phones (<=380px) */
    @media (max-width: 380px) {
        .global-header {
            padding: calc(4px + env(safe-area-inset-top, 0px)) 12px 0 12px;
            height: calc(65px + env(safe-area-inset-top, 0px));
            min-height: calc(65px + env(safe-area-inset-top, 0px));
        }

        .app-logo {
            width: 45px;
            height: 45px;
        }

        .logo-main {
            font-size: 16px;
        }

        .logo-sub {
            font-size: 10px;
        }

        .site-slogan {
            display: block;
            font-size: 9px;
            max-width: 180px;
        }


        .app-container {
            margin-top: calc(75px + env(safe-area-inset-top, 0px) + 15px);
            width: 100%;
            padding: 0 5px 10px 5px;
            background: transparent;
            box-shadow: none;
            border: none;
            margin-bottom: 0;
        }

        .action-btn {
            width: 30px;
            height: 30px;
        }

        .result-value {
            font-size: clamp(13px, 4vw, 15px);
        }

        .footer-links a {
            font-size: 0.8rem;
        }
    }

    /* Toast Notification */
    #toast {
        position: fixed;
        bottom: 30px;
        left: 50%;
        transform: translateX(-50%) translateY(100px);
        background: rgba(10, 25, 47, 0.95);
        backdrop-filter: blur(10px);
        color: var(--accent);
        padding: 12px 25px;
        border-radius: 50px;
        border: 1px solid var(--accent);
        font-size: 14px;
        font-weight: 700;
        z-index: 10000;
        transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
        opacity: 0;
        visibility: hidden;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 15px var(--accent-glow);
        display: flex;
        align-items: center;
        gap: 10px;
        pointer-events: none;
    }

    #toast.show {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
        visibility: visible;
    }

    body.light-theme #toast {
        background: rgba(255, 255, 255, 0.95);
        color: #0F172A;
        border-color: #E2E8F0;
    }

    /* --- CUSTOM SCROLLBAR --- */
    ::-webkit-scrollbar {
        width: 8px;
    }

    ::-webkit-scrollbar-track {
        background: var(--bg-deep);
    }

    ::-webkit-scrollbar-thumb {
        background: linear-gradient(to bottom, var(--accent), #B8860B);
        border-radius: 10px;
    }

    ::-webkit-scrollbar-thumb:hover {
        background: #FFD700;
    }

    /* --- UPGRADE: MISSING ANIMATIONS --- */
    @keyframes pulse-animation {
        0% {
            transform: scale(1);
            box-shadow: var(--card-shadow);
        }

        50% {
            transform: scale(1.02);
            box-shadow: 0 0 20px var(--accent-glow);
        }

        100% {
            transform: scale(1);
            box-shadow: var(--card-shadow);
        }
    }

    .pulse-animation {
        animation: pulse-animation 0.6s ease-in-out;
    }

    .fade-out {
        opacity: 0;
        transform: scale(0.9);
        transition: opacity 0.3s ease, transform 0.3s ease;
    }

    .copy-success {
        background: #4CAF50 !important;
        color: white !important;
        border-color: #4CAF50 !important;
        box-shadow: 0 0 10px rgba(76, 175, 80, 0.5) !important;
    }

    /* --- GOLDEN BOX STYLE --- */
    .golden-box {
        background: linear-gradient(135deg, rgba(212, 175, 55, 0.1), rgba(184, 134, 11, 0.2));
        border: 2px solid #D4AF37;
        border-radius: 24px;
        padding: 30px;
        margin: 25px 0;
        box-shadow: 0 15px 45px rgba(0, 0, 0, 0.4), inset 0 0 20px rgba(212, 175, 55, 0.1);
        position: relative;
        overflow: hidden;
        transition: var(--transition);
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
    }

    .golden-box::before {
        content: "";
        position: absolute;
        top: -50%;
        left: -50%;
        width: 200%;
        height: 200%;
        background: radial-gradient(circle, rgba(212, 175, 55, 0.15) 0%, transparent 70%);
        pointer-events: none;
        z-index: 0;
        animation: rotate-gold 10s linear infinite;
    }

    @keyframes rotate-gold {
        from {
            transform: rotate(0deg);
        }

        to {
            transform: rotate(360deg);
        }
    }

    .golden-box:hover {
        transform: translateY(-5px);
        box-shadow: 0 20px 50px rgba(212, 175, 55, 0.2), 0 0 30px rgba(212, 175, 55, 0.1);
        border-color: #FFD700;
    }

    .golden-box h2,
    .golden-box h3 {
        color: #FFD700 !important;
        background: linear-gradient(135deg, #FFD700, #D4AF37);
        -webkit-background-clip: text !important;
        background-clip: text !important;
        -webkit-text-fill-color: transparent !important;
        text-shadow: none !important;
        filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
    }

    .golden-box p,
    .golden-box li,
    .golden-box strong {
        position: relative;
        z-index: 1;
    }

    body.light-theme .golden-box {
        background: linear-gradient(135deg, rgba(212, 175, 55, 0.05), rgba(212, 175, 55, 0.15));
        border-color: #D4AF37;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    }

    /* ===== COMPARISON PANEL ===== */

    /* Individual loan input card */
    .comparison-column {
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid var(--border-light);
        border-radius: 20px;
        padding: 15px;
        display: flex;
        flex-direction: column;
        gap: 8px;
        position: relative;
    }

    .column-header {
        font-size: 0.85rem;
        font-weight: 800;
        color: var(--accent);
        text-transform: uppercase;
        text-align: center;
        border-bottom: 1px solid var(--border-light);
        padding-bottom: 6px;
        margin-bottom: 2px;
    }


    /* Best option card — hidden until comparison runs */
    .best-option-card {
        background: var(--bg-result-card);
        border: 1px solid var(--accent);
        border-radius: 24px;
        padding: 20px;
        text-align: center;
        box-shadow: var(--result-shadow);
        transition: var(--transition);
        backdrop-filter: blur(40px);
        -webkit-backdrop-filter: blur(40px);
        display: none;
        animation: fadeIn 0.5s ease;
        position: relative;
        overflow: hidden;
    }

    .best-option-card.show {
        display: block;
        background: linear-gradient(135deg, rgba(212, 175, 55, 0.12), rgba(0, 0, 0, 0.3));
        border-width: 2px;
    }

    .best-option-title {
        font-size: 12px;
        font-weight: 700;
        color: var(--text-muted);
        text-transform: uppercase;
        letter-spacing: 0.4px;
        margin-bottom: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }

    .best-option-title i {
        color: var(--accent);
        font-size: 14px;
    }

    .best-option-text {
        font-size: 1rem;
        font-weight: 800;
        color: var(--accent);
        line-height: 1.5;
        text-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
        letter-spacing: -0.3px;
        font-family: 'Outfit', sans-serif;
    }

    /* Better choice highlight */
    .comparison-column.better-choice {
        border-color: #FFD700;
        box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
        background: rgba(212, 175, 55, 0.05);
    }

    .comparison-column.better-choice::before {
        content: "BETTER CHOICE";
        position: absolute;
        top: -12px;
        left: 50%;
        transform: translateX(-50%);
        background: var(--accent);
        color: #050B14;
        font-size: 10px;
        font-weight: 900;
        padding: 2px 10px;
        border-radius: 10px;
        z-index: 10;
    }

    /* Comparison result group label (Option 1 / Option 2) */
    .comp-group-label {
        font-size: 0.72rem;
        font-weight: 800;
        color: var(--accent);
        text-transform: uppercase;
        letter-spacing: 1.5px;
        padding: 6px 4px 4px;
        border-left: 3px solid var(--accent);
        padding-left: 10px;
        margin-top: 8px;
        margin-bottom: 4px;
    }

    /* 3-column grid for 3 result cards per option */
    .comp-results-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px;
    }

    .comp-results-grid .result-card {
        min-height: 80px;
        padding: 14px 8px;
    }

    .comp-results-grid .result-value {
        font-size: clamp(0.85rem, 2vw, 1.1rem);
    }

    /* Result group highlight when that option wins */
    .comp-results-grid.better-result .result-card {
        border-color: #FFD700;
        box-shadow: 0 0 15px rgba(212, 175, 55, 0.35);
        background: rgba(212, 175, 55, 0.07);
    }

    .comp-results-grid.better-result .result-value {
        color: #FFD700;
        text-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
    }

    /* --- PROMO ACTIONS (Golden Box Style) --- */
    .promo-actions {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 8px;
        margin-top: 8px;
        flex-wrap: wrap;
        width: 100%;
    }

    .footer-action-btn {
        background: rgba(212, 175, 55, 0.05);
        border: 1.5px solid var(--accent);
        color: var(--accent);
        padding: 8px 16px;
        border-radius: 12px;
        font-size: 12px;
        font-weight: 800;
        cursor: pointer;
        transition: var(--transition);
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        text-transform: uppercase;
        letter-spacing: 0.8px;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
        min-width: 110px;
        -webkit-backdrop-filter: blur(5px);
        backdrop-filter: blur(5px);
        position: relative;
        overflow: hidden;
    }

    .footer-action-btn::after {
        content: "";
        position: absolute;
        top: -50%;
        left: -60%;
        width: 20%;
        height: 200%;
        background: rgba(255, 255, 255, 0.1);
        transform: rotate(30deg);
        transition: none;
        animation: shimmer-btn 5s infinite;
    }

    .footer-action-btn:hover {
        background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(212, 175, 55, 0.05));
        border-color: #FFD700;
        color: #FFFFFF;
        transform: translateY(-3px);
        box-shadow: 0 15px 30px rgba(212, 175, 55, 0.3), 0 0 15px rgba(212, 175, 55, 0.1);
    }

    .footer-action-btn:active {
        transform: translateY(1px) scale(0.96);
    }
    body.light-theme .footer-action-btn {
        background: #FFFFFF;
        border-color: #E2E8F0;
        color: #475569;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    }

    body.light-theme .footer-action-btn:hover {
        background: #F8FAFC;
        border-color: #D4AF37;
        color: #0F172A;
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    }