:root {
    --dark-obsidian: #090d16;
    --dark-card: #121824;
    --brand-green: #10b981;
    --brand-green-hover: #059669;
    --brand-blue: #3b82f6;
    --brand-gold: #f59e0b;
    --glass-bg: rgba(18, 24, 36, 0.75);
    --glass-border: rgba(255, 255, 255, 0.08);
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --ticker-bg: #06090f;
    --input-bg: #0c111e;
}

/* Light Theme Mode override with premium aesthetics */
body.light-theme {
    --dark-obsidian: #f3f5f9;
    --dark-card: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.9);
    --glass-border: rgba(15, 23, 42, 0.08);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --ticker-bg: #eceff4;
    --input-bg: #f8fafc;
}

body {
    font-family: "Inter", sans-serif;
    background-color: var(--dark-obsidian);
    color: var(--text-primary);
    overflow-x: hidden;
    transition:
        background-color 0.4s ease,
        color 0.4s ease;
}

/* Global resets for elements in Light Theme */
body.light-theme .text-white,
body.light-theme h1,
body.light-theme h2,
body.light-theme h3,
body.light-theme h4,
body.light-theme h5,
body.light-theme h6 {
    color: var(--text-primary) !important;
}

body.light-theme .text-secondary {
    color: var(--text-secondary) !important;
}

body.light-theme .border-secondary,
body.light-theme .border-opacity-25,
body.light-theme .border-opacity-10 {
    border-color: var(--glass-border) !important;
}

body.light-theme .card,
body.light-theme .feature-card {
    background-color: #ffffff !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04) !important;
    border-color: rgba(15, 23, 42, 0.08) !important;
}

body.light-theme #programs,
body.light-theme #curator {
    background: rgba(241, 245, 249, 0.9) !important;
}

body.light-theme .bg-dark,
body.light-theme .bg-black {
    background-color: #ffffff !important;
    background: #ffffff !important;
    color: #0f172a !important;
    border-color: rgba(15, 23, 42, 0.08) !important;
}

body.light-theme .bg-black.bg-opacity-40,
body.light-theme .bg-black.bg-opacity-35 {
    background-color: #f1f5f9 !important;
    background: #f1f5f9 !important;
    color: #475569 !important;
}

body.light-theme .ticker-wrap,
body.light-theme .marquee-wrapper {
    background-color: #eceff4 !important;
    background: #eceff4 !important;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08) !important;
}

body.light-theme .ticker-item {
    color: #475569 !important;
}
body.light-theme .ticker-item .text-white {
    color: #0f172a !important;
}

body.light-theme .marquee-img {
    color: #0d1525 !important;
    filter: grayscale(1) brightness(0.12) !important;
    opacity: 0.7;
}

/* Navbar styling in Light Theme */
body.light-theme .nav-link,
body.light-theme .nav-link.text-light,
body.light-theme .navbar-brand {
    color: #475569 !important;
}

body.light-theme .nav-link.active,
body.light-theme .nav-link:hover,
body.light-theme .navbar-brand:hover {
    color: var(--brand-green) !important;
}

body.light-theme .navbar-toggler {
    border-color: rgba(15, 23, 42, 0.15) !important;
}
body.light-theme .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2815, 23, 42, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

@media (max-width: 991.98px) {
    body.light-theme .navbar-collapse {
        background-color: #ffffff !important;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
        padding: 1.5rem;
        border-radius: 12px;
        margin-top: 10px;
        border: 1px solid rgba(15, 23, 42, 0.08);
    }
}

/* Hero Terminal visual design in Light Theme */
body.light-theme .terminal-card {
    background-color: #ffffff !important;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.05) !important;
    border: 1px solid rgba(15, 23, 42, 0.08) !important;
}
body.light-theme .terminal-header {
    background-color: #f1f5f9 !important;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08) !important;
}
body.light-theme .chart-container {
    background-color: #f1f5f9 !important;
    border-color: rgba(15, 23, 42, 0.08) !important;
}

body.light-theme .input-group-text {
    background-color: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
}
body.light-theme .form-control {
    background-color: #ffffff !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
}

/* Accordion overrides in Light Theme */
body.light-theme .accordion-item-dark {
    background-color: #ffffff !important;
    border: 1px solid rgba(15, 23, 42, 0.08) !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.01) !important;
}
body.light-theme .accordion-button-dark {
    background-color: #ffffff !important;
    color: #0f172a !important;
}
body.light-theme .accordion-button-dark:not(.collapsed) {
    background-color: #f8fafc !important;
    color: var(--brand-green) !important;
}
body.light-theme .accordion-button-dark::after {
    filter: none !important; /* Standard dark arrow icon */
}
body.light-theme .accordion-body-dark {
    background-color: #f8fafc !important;
    color: #475569 !important;
}

/* Orderbook tables and other tables in Light Theme */
body.light-theme .table {
    color: #1e293b !important;
}
body.light-theme .table tr,
body.light-theme .table td,
body.light-theme .table th {
    background-color: #ffffff !important;
    color: #1e293b !important;
    border-color: #e2e8f0 !important;
}

/* Retain phone simulator elements inside mockup screens in light theme */
body.light-theme .mobile-mockup-frame {
    background-color: #090d16 !important;
    border-color: #cbd5e1 !important;
}
body.light-theme .mobile-screen-content {
    background-color: #090d16 !important;
    color: #f3f4f6 !important;
}
body.light-theme .mobile-screen-content h1,
body.light-theme .mobile-screen-content h2,
body.light-theme .mobile-screen-content h3,
body.light-theme .mobile-screen-content h4,
body.light-theme .mobile-screen-content h5,
body.light-theme .mobile-screen-content h6,
body.light-theme .mobile-screen-content .text-white {
    color: #ffffff !important;
}
body.light-theme .mobile-screen-content .text-secondary {
    color: #9ca3af !important;
}
body.light-theme .mobile-screen-content .bg-dark {
    background-color: #0f1522 !important;
    color: #f3f4f6 !important;
}
body.light-theme .mobile-screen-content .btn-success {
    background-color: var(--brand-green) !important;
    color: #000000 !important;
}

/* Aesthetic Grid lines on background when light-themed */
body.light-theme .ambient-grid {
    background-color: #f3f5f9 !important;
    background-image:
        linear-gradient(to right, rgba(0, 0, 0, 0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0, 0, 0, 0.03) 1px, transparent 1px) !important;
}

/* Button overrides for light theme border outline buttons */
body.light-theme .btn-outline-light {
    color: #0f172a !important;
    border-color: #cbd5e1 !important;
}
body.light-theme .btn-outline-light:hover {
    background-color: #f1f5f9 !important;
    border-color: #94a3b8 !important;
}

/* Standard dark footer styling override for light theme */
body.light-theme footer {
    background-color: #121824 !important;
    color: #94a3b8 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
}
body.light-theme footer a {
    color: #cbd5e1 !important;
}
body.light-theme footer .text-white {
    color: #f8fafc !important;
}

.font-display {
    font-family: "Space Grotesk", sans-serif;
}

.font-mono {
    font-family: "JetBrains Mono", monospace;
}

/* Ticker Tape animation */
.ticker-wrap {
    width: 100%;
    overflow: hidden;
    background: #06090f;
    border-bottom: 1px solid var(--glass-border);
    padding: 6px 0;
}
.ticker {
    display: flex;
    white-space: nowrap;
    animation: ticker-animation 35s linear infinite;
}
.ticker-item {
    display: inline-block;
    padding: 0 2rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #9ca3af;
}
@keyframes ticker-animation {
    0% {
        transform: translate3d(0, 0, 0);
    }
    100% {
        transform: translate3d(-50%, 0, 0);
    }
}

/* Navbar styling */
.navbar-glass {
    background-color: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

/* Premium gradients */
.gradient-text-green {
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.gradient-text-gold {
    background: linear-gradient(135deg, #f59e0b 0%, #fef08a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.gradient-btn {
    background: linear-gradient(135deg, var(--brand-green) 0%, #34d399 100%);
    border: none;
    color: #0c1220 !important;
    font-weight: 600;
    transition:
        transform 0.2s ease,
        opacity 0.2s ease;
}
.gradient-btn:hover {
    transform: translateY(-2px);
    opacity: 0.95;
}

/* Hero Terminal visual design */
.hero-section {
    position: relative;
    padding-top: 8rem;
    padding-bottom: 6rem;
    background:
        radial-gradient(
            circle at 10% 20%,
            rgba(16, 185, 129, 0.08) 0%,
            transparent 40%
        ),
        radial-gradient(
            circle at 90% 80%,
            rgba(59, 130, 246, 0.08) 0%,
            transparent 45%
        );
}

.terminal-card {
    background: #0f1522;
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}
.terminal-header {
    background: #0a0e16;
    padding: 10px 16px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.terminal-dots {
    display: flex;
    gap: 6px;
}
.terminal-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}
.dot-red {
    background-color: #ef4444;
}
.dot-yellow {
    background-color: #f59e0b;
}
.dot-green {
    background-color: #10b981;
}

/* Live active terminal charts */
.chart-container {
    position: relative;
    height: 180px;
    border-bottom: 1px solid var(--glass-border);
    background: #0a0e16;
}

/* Animated scanning grid background */
.ambient-grid {
    background-size: 20px 20px;
    background-image:
        linear-gradient(
            to right,
            rgba(255, 255, 255, 0.02) 1px,
            transparent 1px
        ),
        linear-gradient(
            to bottom,
            rgba(255, 255, 255, 0.02) 1px,
            transparent 1px
        );
}

/* Feature card custom */
.feature-card {
    background-color: var(--dark-card);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    transition: all 0.3s ease;
    height: 100%;
}
.feature-card:hover {
    transform: translateY(-5px);
    border-color: rgba(16, 185, 129, 0.3);
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.1);
}

/* Course highlight badging */
.badge-custom {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 8px;
    border-radius: 4px;
}

/* Placement Marquee auto scroll */
.marquee-wrapper {
    overflow: hidden;
    width: 100%;
    padding: 2rem 0;
    background: #0a0e16;
}
.marquee-content {
    display: flex;
    white-space: nowrap;
    animation: marquee-anim 20s linear infinite;
    align-items: center;
}
.marquee-img {
    height: 32px;
    margin: 0 3.5rem;
    filter: grayscale(1) brightness(2.5);
    opacity: 0.6;
    transition:
        opacity 0.2s,
        filter 0.2s;
}
.marquee-img:hover {
    filter: none;
    opacity: 1;
}
@keyframes marquee-anim {
    0% {
        transform: translate3d(0, 0, 0);
    }
    100% {
        transform: translate3d(-50%, 0, 0);
    }
}

/* Custom sliders for financial tool */
.range-input {
    accent-color: var(--brand-green);
}

/* Custom accordion dark look */
.accordion-item-dark {
    background: var(--dark-card);
    border: 1px solid var(--glass-border);
    border-radius: 8px !important;
    margin-bottom: 12px;
    overflow: hidden;
}
.accordion-button-dark {
    background: var(--dark-card) !important;
    color: #f3f4f6 !important;
    box-shadow: none !important;
    border: none !important;
    font-family: "Space Grotesk", sans-serif;
    font-weight: 600;
}
.accordion-button-dark:not(.collapsed) {
    color: var(--brand-green) !important;
    border-bottom: 1px solid var(--glass-border);
}
.accordion-button-dark::after {
    filter: invert(1);
}
.accordion-body-dark {
    background: #0f1522;
    color: #d1d5db;
    line-height: 1.6;
}

/* Dynamic orderbook log entries */
.orderbook-row {
    transition: background-color 0.4s ease;
}
.orderbook-row.bg-flash-buy {
    background-color: rgba(16, 185, 129, 0.2) !important;
}
.orderbook-row.bg-flash-sell {
    background-color: rgba(239, 68, 68, 0.2) !important;
}

/* Toast custom animation */
.custom-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1050;
    background-color: var(--dark-card);
    border: 1px solid var(--brand-green);
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: none;
    max-width: 320px;
    animation: fadeInUp 0.3s ease;
}
@keyframes fadeInUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Scroll Animation System */
.scroll-anim {
    opacity: 0;
    transform: translateY(30px);
    transition:
        opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.scroll-anim.active {
    opacity: 1;
    transform: translateY(0);
}

/* TradeShala Student Hub & Mockups */
.revolution-glow-container {
    background-color: #0c111d;
    border-radius: 24px;
    position: relative;
    overflow: hidden;
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.8);
}

.revolution-glow-container::before {
    content: "";
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(
        135deg,
        rgba(16, 185, 129, 0.4) 0%,
        rgba(168, 85, 247, 0.4) 100%
    );
    z-index: -1;
    border-radius: 26px;
    pointer-events: none;
}

body.light-theme .revolution-glow-container {
    background-color: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
}

.star-bullet-tag {
    background: rgba(16, 185, 129, 0.1);
    color: var(--brand-green);
    border: 1px solid rgba(16, 185, 129, 0.15);
    border-radius: 50px;
    padding: 4px 12px;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

body.light-theme .star-bullet-tag {
    background: rgba(16, 185, 129, 0.07);
    border-color: rgba(16, 185, 129, 0.12);
}

/* Phone Mockups */
.mock-phone-wrap {
    position: relative;
    perspective: 1000px;
}

.mobile-mockup-frame {
    width: 250px;
    height: 480px;
    background: #090d16;
    border: 10px solid #1e293b;
    border-radius: 36px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    display: inline-block;
    position: relative;
    overflow: hidden;
    margin: 10px;
}

.mobile-mockup-frame::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 18px;
    background: #1e293b;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    z-index: 20;
}

.mobile-screen-content {
    height: 100%;
    background: #090d16;
    padding: 24px 12px 12px 12px;
    color: #f3f4f6;
    font-size: 0.72rem;
    overflow-y: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

body.light-theme .mobile-mockup-frame {
    border-color: #e2e8f0;
}

.signal-badge-glow {
    animation: pulse-signal-glow 2s infinite alternate;
}

@keyframes pulse-signal-glow {
    0% {
        box-shadow: 0 0 4px rgba(16, 185, 129, 0.4);
    }
    100% {
        box-shadow: 0 0 12px rgba(16, 185, 129, 0.8);
    }
}

.theme-switch-btn {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: var(--brand-green);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
}

.theme-switch-btn:hover {
    background: var(--brand-green);
    color: #000;
    transform: rotate(45deg);
}

body.light-theme .theme-switch-btn {
    background: rgba(15, 23, 42, 0.05);
    border-color: rgba(15, 23, 42, 0.1);
    color: #0f172a;
}
