/* ================================
   STEP Trading Platform - Unified Green Design
   ================================ */

/* Color Variables - Green Theme */
:root {
    --color-primary: #00C58E;
    --color-primary-dark: #0F7A5E;
    --color-primary-light: #1ED18D;
    --color-success: #00c853;
    --color-danger: #ff1744;
    --color-warning: #ffc107;
    --color-dark: #1A1A1A;
    --color-dark-alt: #282828;
    --color-gray: #5A5A5A;
    --color-light-gray: #E2E2E2;
    --color-white: #FFFFFF;
    --color-light-bg: #F5F5F5;
}

/* ===== UNIFIED HEADER ===== */
.main-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--color-white);
    border-bottom: 3px solid var(--color-primary);
    box-shadow: 0 4px 20px rgba(0, 197, 142, 0.15);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
}

.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    gap: 40px;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.logo img {
    height: 50px;
    width: auto;
}

.logo-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.logo-title {
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--color-primary);
    letter-spacing: 0.5px;
}

.logo-tagline {
    font-size: 0.75rem;
    color: var(--color-gray);
    font-weight: 500;
}

/* Navigation Links */
.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1;
    justify-content: center;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    color: var(--color-dark);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link i {
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: var(--color-primary);
    background: rgba(0, 197, 142, 0.08);
    transform: translateY(-2px);
}

.nav-link:hover i {
    transform: scale(1.15);
}

.nav-link.active {
    background: var(--color-primary);
    color: var(--color-white);
    box-shadow: 0 4px 15px rgba(0, 197, 142, 0.3);
}

.nav-link.active i {
    color: var(--color-white);
}

/* Navigation Actions */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Theme Toggle */
.theme-toggle {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, rgba(0, 197, 142, 0.1) 0%, rgba(15, 122, 94, 0.1) 100%);
    border: 2px solid rgba(0, 197, 142, 0.3);
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
}

.theme-toggle:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 197, 142, 0.3);
}

.theme-icon-dark,
.theme-icon-light {
    font-size: 1.2rem;
    transition: all 0.3s ease;
    position: absolute;
}

.theme-icon-dark {
    color: var(--color-primary);
    opacity: 1;
}

.theme-icon-light {
    color: var(--color-warning);
    opacity: 0;
}

.theme-toggle:hover .theme-icon-dark,
.theme-toggle:hover .theme-icon-light {
    color: var(--color-white);
}

/* Language Toggle */
.lang-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: rgba(0, 197, 142, 0.1);
    border: 2px solid rgba(0, 197, 142, 0.3);
    border-radius: 12px;
    color: var(--color-primary);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
    justify-content: center;
}

.lang-toggle:hover {
    background: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 197, 142, 0.3);
}

.lang-toggle i {
    font-size: 1.2rem;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    width: 45px;
    height: 45px;
    background: rgba(0, 197, 142, 0.1);
    border: 2px solid rgba(0, 197, 142, 0.3);
    border-radius: 10px;
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.hamburger-line {
    width: 22px;
    height: 2px;
    background: var(--color-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* ===== PAGE HEADER ===== */
.page-header {
    background: linear-gradient(135deg, var(--color-primary), var(--color-dark));
    color: var(--color-white);
    padding: 4rem 0;
    text-align: center;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.page-header h1 i {
    font-size: 2.2rem;
    color: var(--color-white);
    opacity: 0.95;
}

.page-header p {
    font-size: 1.25rem;
    opacity: 0.9;
}

/* ===== TRADING PLATFORM ===== */
.trading-platform {
    background: var(--color-dark);
    min-height: calc(100vh - 80px);
}

.platform-container {
    width: 100%;
    height: calc(100vh - 80px);
    display: flex;
    flex-direction: column;
}

/* Platform Header */
.platform-header {
    background: linear-gradient(135deg, var(--color-dark-alt) 0%, var(--color-dark) 100%);
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid rgba(0, 197, 142, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.account-info {
    display: flex;
    gap: 30px;
}

.balance-card,
.profit-card,
.equity-card {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.balance-card .label,
.profit-card .label,
.equity-card .label {
    font-size: 0.85rem;
    color: var(--color-gray);
    font-weight: 500;
}

.balance {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-primary);
    font-family: 'Courier New', monospace;
}

.profit {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'Courier New', monospace;
}

.profit.positive {
    color: var(--color-success);
}

.profit.negative {
    color: var(--color-danger);
}

.equity {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-white);
    font-family: 'Courier New', monospace;
}

.reset-btn {
    background: rgba(0, 197, 142, 0.1);
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.reset-btn:hover {
    background: var(--color-primary);
    color: var(--color-white);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 197, 142, 0.3);
}

/* Trading Workspace */
.trading-workspace {
    display: grid;
    grid-template-columns: 300px 1fr 350px;
    gap: 0;
    flex: 1;
    overflow: hidden;
}

/* Markets Sidebar */
.markets-sidebar {
    background: var(--color-dark-alt);
    border-right: 1px solid rgba(0, 197, 142, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(0, 197, 142, 0.1);
}

.sidebar-header h3 {
    color: var(--color-primary);
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.market-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tab-btn {
    background: rgba(0, 197, 142, 0.1);
    border: 1px solid rgba(0, 197, 142, 0.3);
    color: var(--color-white);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    background: rgba(0, 197, 142, 0.2);
    border-color: var(--color-primary);
}

.tab-btn.active {
    background: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
}

.search-box {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(0, 197, 142, 0.1);
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-box i {
    color: var(--color-gray);
}

.search-box input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 197, 142, 0.2);
    color: var(--color-white);
    padding: 10px;
    border-radius: 6px;
    font-size: 0.9rem;
}

.search-box input:focus {
    outline: none;
    border-color: var(--color-primary);
}

.markets-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.market-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 12px 15px;
    margin-bottom: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.market-item:hover {
    background: rgba(0, 197, 142, 0.1);
    border-color: rgba(0, 197, 142, 0.3);
    transform: translateX(-5px);
}

.market-item.active {
    background: rgba(0, 197, 142, 0.15);
    border-color: var(--color-primary);
}

.market-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.market-symbol {
    font-weight: 700;
    color: var(--color-white);
    font-size: 1rem;
}

.market-price {
    font-weight: 700;
    font-family: 'Courier New', monospace;
    color: var(--color-primary);
}

.market-item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.market-name {
    font-size: 0.8rem;
    color: var(--color-gray);
}

.market-change {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
}

.market-change.positive {
    background: rgba(0, 200, 83, 0.2);
    color: var(--color-success);
}

.market-change.negative {
    background: rgba(255, 23, 68, 0.2);
    color: var(--color-danger);
}

/* Chart Container */
.chart-container {
    background: var(--color-dark);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chart-header {
    background: var(--color-dark-alt);
    padding: 15px 20px;
    border-bottom: 1px solid rgba(0, 197, 142, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.symbol-info h2 {
    color: var(--color-primary);
    font-size: 1.5rem;
    margin-bottom: 3px;
}

.symbol-description {
    color: var(--color-gray);
    font-size: 0.9rem;
}

.price-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
}

.current-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-white);
    font-family: 'Courier New', monospace;
}

.price-change {
    font-size: 1rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 6px;
}

.price-change.positive {
    background: rgba(0, 200, 83, 0.2);
    color: var(--color-success);
}

.price-change.negative {
    background: rgba(255, 23, 68, 0.2);
    color: var(--color-danger);
}

.timeframe-selector {
    display: flex;
    gap: 5px;
}

.tf-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 197, 142, 0.2);
    color: var(--color-white);
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.tf-btn:hover {
    background: rgba(0, 197, 142, 0.2);
    border-color: var(--color-primary);
}

.tf-btn.active {
    background: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
}

.chart-canvas {
    flex: 1;
    padding: 20px;
    position: relative;
}

#priceChart {
    width: 100%;
    height: 100%;
}

.chart-controls {
    background: var(--color-dark-alt);
    padding: 15px 20px;
    border-top: 1px solid rgba(0, 197, 142, 0.1);
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.control-btn {
    background: rgba(0, 197, 142, 0.1);
    border: 1px solid rgba(0, 197, 142, 0.3);
    color: var(--color-white);
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.control-btn:hover {
    background: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
}

/* Trading Panel */
.trading-panel {
    background: var(--color-dark-alt);
    border-left: 1px solid rgba(0, 197, 142, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.panel-tabs {
    display: flex;
    background: var(--color-dark);
    border-bottom: 2px solid rgba(0, 197, 142, 0.1);
}

.panel-tab {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--color-gray);
    padding: 15px 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.panel-tab:hover {
    color: var(--color-primary);
    background: rgba(0, 197, 142, 0.05);
}

.panel-tab.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
    background: rgba(0, 197, 142, 0.1);
}

.panel-content {
    display: none;
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.panel-content.active {
    display: block;
}

/* Order Form */
.order-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.order-type-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.order-type-btn {
    padding: 15px;
    border: 2px solid;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.order-type-btn[data-type="buy"] {
    background: rgba(0, 200, 83, 0.1);
    border-color: var(--color-success);
    color: var(--color-success);
}

.order-type-btn[data-type="buy"]:hover,
.order-type-btn[data-type="buy"].active {
    background: var(--color-success);
    color: var(--color-white);
}

.order-type-btn[data-type="sell"] {
    background: rgba(255, 23, 68, 0.1);
    border-color: var(--color-danger);
    color: var(--color-danger);
}

.order-type-btn[data-type="sell"]:hover,
.order-type-btn[data-type="sell"].active {
    background: var(--color-danger);
    color: var(--color-white);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    color: var(--color-gray);
    font-size: 0.9rem;
    font-weight: 600;
}

.form-group input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 197, 142, 0.2);
    color: var(--color-white);
    padding: 12px;
    border-radius: 6px;
    font-size: 1rem;
    font-family: 'Courier New', monospace;
}

.form-group input:focus {
    outline: none;
    border-color: var(--color-primary);
}

.input-group {
    display: grid;
    grid-template-columns: 40px 1fr 40px;
    gap: 5px;
}

.qty-btn {
    background: rgba(0, 197, 142, 0.1);
    border: 1px solid rgba(0, 197, 142, 0.3);
    color: var(--color-primary);
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: 700;
    transition: all 0.3s ease;
}

.qty-btn:hover {
    background: var(--color-primary);
    color: var(--color-white);
}

.order-info {
    background: rgba(0, 197, 142, 0.05);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid rgba(0, 197, 142, 0.2);
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    color: var(--color-white);
    font-size: 0.9rem;
}

.info-row span:first-child {
    color: var(--color-gray);
}

.info-row span:last-child {
    font-weight: 700;
    font-family: 'Courier New', monospace;
}

.execute-btn {
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.execute-btn.buy-btn {
    background: var(--color-success);
    color: var(--color-white);
}

.execute-btn.buy-btn:hover {
    background: #00e676;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 200, 83, 0.3);
}

.execute-btn.sell-btn {
    background: var(--color-danger);
    color: var(--color-white);
}

.execute-btn.sell-btn:hover {
    background: #ff5252;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 23, 68, 0.3);
}

/* Positions List */
.positions-list,
.history-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.position-card,
.history-card {
    background: rgba(255, 255, 255, 0.03);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid rgba(0, 197, 142, 0.2);
}

.position-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.position-symbol {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--color-white);
}

.position-type {
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
}

.position-type.buy {
    background: rgba(0, 200, 83, 0.2);
    color: var(--color-success);
}

.position-type.sell {
    background: rgba(255, 23, 68, 0.2);
    color: var(--color-danger);
}

.position-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 12px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.detail-label {
    color: var(--color-gray);
    font-size: 0.8rem;
}

.detail-value {
    color: var(--color-white);
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

.position-pl {
    padding: 10px;
    background: rgba(0, 197, 142, 0.05);
    border-radius: 6px;
    text-align: center;
    margin-bottom: 12px;
}

.pl-label {
    color: var(--color-gray);
    font-size: 0.8rem;
    margin-bottom: 5px;
}

.pl-value {
    font-size: 1.3rem;
    font-weight: 700;
    font-family: 'Courier New', monospace;
}

.pl-value.positive {
    color: var(--color-success);
}

.pl-value.negative {
    color: var(--color-danger);
}

.close-position-btn {
    width: 100%;
    padding: 10px;
    background: rgba(255, 23, 68, 0.1);
    border: 1px solid var(--color-danger);
    color: var(--color-danger);
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.close-position-btn:hover {
    background: var(--color-danger);
    color: var(--color-white);
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--color-gray);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 1.1rem;
}

/* Educational Notice */
.educational-notice {
    background: linear-gradient(135deg, var(--color-dark-alt) 0%, var(--color-dark) 100%);
    padding: 30px 0;
    border-top: 2px solid rgba(0, 197, 142, 0.2);
}

.notice-content {
    display: flex;
    align-items: center;
    gap: 20px;
    background: rgba(0, 197, 142, 0.1);
    padding: 25px;
    border-radius: 12px;
    border: 1px solid rgba(0, 197, 142, 0.3);
    max-width: 1400px;
    margin: 0 auto;
}

.notice-content i {
    font-size: 3rem;
    color: var(--color-primary);
}

.notice-text h3 {
    color: var(--color-primary);
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.notice-text p {
    color: var(--color-white);
    line-height: 1.6;
}

/* Scrollbar */
.markets-list::-webkit-scrollbar,
.panel-content::-webkit-scrollbar {
    width: 8px;
}

.markets-list::-webkit-scrollbar-track,
.panel-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.markets-list::-webkit-scrollbar-thumb,
.panel-content::-webkit-scrollbar-thumb {
    background: rgba(0, 197, 142, 0.3);
    border-radius: 4px;
}

.markets-list::-webkit-scrollbar-thumb:hover,
.panel-content::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 197, 142, 0.5);
}

/* Responsive Design */
@media (max-width: 1400px) {
    .trading-workspace {
        grid-template-columns: 280px 1fr 320px;
    }
}

@media (max-width: 1200px) {
    .trading-workspace {
        grid-template-columns: 250px 1fr 300px;
    }
    
    .platform-header {
        flex-direction: column;
        gap: 15px;
    }
}

@media (max-width: 992px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--color-white);
        flex-direction: column;
        gap: 5px;
        padding: 20px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        border-top: 2px solid var(--color-primary);
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-link {
        width: 100%;
        justify-content: flex-start;
        padding: 12px 20px;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .trading-workspace {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr auto;
    }
    
    .markets-sidebar {
        max-height: 300px;
        border-right: none;
        border-bottom: 1px solid rgba(0, 197, 142, 0.1);
    }
    
    .trading-panel {
        border-left: none;
        border-top: 1px solid rgba(0, 197, 142, 0.1);
        max-height: 400px;
    }
}

@media (max-width: 768px) {
    .nav-content {
        padding: 12px 0;
    }
    
    .nav-container {
        padding: 0 20px;
    }
    
    .logo img {
        height: 40px;
    }
    
    .logo-title {
        font-size: 1.2rem;
    }
    
    .account-info {
        flex-direction: column;
        gap: 15px;
        width: 100%;
    }
    
    .chart-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .price-info {
        align-items: flex-start;
        width: 100%;
    }
    
    .timeframe-selector {
        width: 100%;
        justify-content: space-between;
    }
    
    .tf-btn {
        flex: 1;
        padding: 8px 10px;
        font-size: 0.85rem;
    }
    
    .lang-text {
        display: none;
    }
}

/* ===== DARK/LIGHT MODE ===== */
/* Dark Mode - Unified Black Theme */
body.dark-mode {
    background-color: #0d1117 !important;
    color: #c9d1d9 !important;
    transition: all 0.3s ease;
}

/* Root Variables Override for Dark Mode */
body.dark-mode {
    --color-primary: #00C58E;
    --color-primary-dark: #1ED18D;
    --color-primary-light: #00E59E;
    --color-dark: #0d1117;
    --color-dark-alt: #161b22;
    --color-white: #c9d1d9;
    --color-light-bg: #161b22;
    --color-gray: #8b949e;
    --color-light-gray: #30363d;
}

/* Theme Toggle Icon States */
.theme-icon-light {
    display: none;
}

body.dark-mode .theme-icon-dark {
    display: none;
}

body.dark-mode .theme-icon-light {
    display: block;
}

/* Dark Mode - Complete Page Override */
body.dark-mode {
    background: #0d1117 !important;
}

/* Header Dark Mode */
body.dark-mode .main-header {
    background: #161b22 !important;
    border-bottom: 3px solid var(--color-primary);
    box-shadow: 0 4px 20px rgba(0, 197, 142, 0.2);
}

body.dark-mode .nav-link {
    color: #c9d1d9 !important;
}

body.dark-mode .nav-link:hover {
    color: var(--color-primary) !important;
    background: rgba(0, 197, 142, 0.1) !important;
}

body.dark-mode .nav-link.active {
    background: var(--color-primary) !important;
    color: #ffffff !important;
}

body.dark-mode .logo-title {
    color: #c9d1d9 !important;
}

body.dark-mode .logo-tagline {
    color: #8b949e !important;
}

/* Page Header Dark Mode */
body.dark-mode .page-header {
    background: linear-gradient(135deg, #0d1117 0%, #161b22 100%) !important;
    color: #c9d1d9 !important;
}

body.dark-mode .page-header h1 {
    color: #c9d1d9 !important;
}

body.dark-mode .page-header p {
    color: #8b949e !important;
}

/* Sections Dark Mode */
body.dark-mode .features,
body.dark-mode .goals,
body.dark-mode .cta {
    background: #0d1117 !important;
    color: #c9d1d9 !important;
}

body.dark-mode .goals {
    background: #161b22 !important;
}

/* Cards Dark Mode */
body.dark-mode .feature-card,
body.dark-mode .goal-card {
    background: #161b22 !important;
    border: 1px solid #30363d !important;
    color: #c9d1d9 !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3) !important;
}

body.dark-mode .feature-card:hover,
body.dark-mode .goal-card:hover {
    background: #21262d !important;
    border-color: var(--color-primary) !important;
}

body.dark-mode .feature-card h3,
body.dark-mode .goal-card h3 {
    color: #c9d1d9 !important;
}

body.dark-mode .feature-card p,
body.dark-mode .goal-card p {
    color: #8b949e !important;
}

/* Section Headers Dark Mode */
body.dark-mode .section-header h2 {
    color: #c9d1d9 !important;
}

body.dark-mode .section-header p {
    color: #8b949e !important;
}

/* Buttons Dark Mode */
body.dark-mode .btn {
    background: var(--color-primary) !important;
    color: #ffffff !important;
    border: 1px solid var(--color-primary) !important;
}

body.dark-mode .btn:hover {
    background: var(--color-primary-dark) !important;
    border-color: var(--color-primary-dark) !important;
}

body.dark-mode .btn-secondary {
    background: #161b22 !important;
    color: #c9d1d9 !important;
    border: 1px solid #30363d !important;
}

body.dark-mode .btn-secondary:hover {
    background: #21262d !important;
    border-color: var(--color-primary) !important;
    color: var(--color-primary) !important;
}

/* Footer Dark Mode */
body.dark-mode .footer {
    background: #161b22 !important;
    color: #c9d1d9 !important;
    border-top: 1px solid #30363d;
}

body.dark-mode .footer-col h3 {
    color: var(--color-primary) !important;
}

body.dark-mode .footer a {
    color: #8b949e !important;
}

body.dark-mode .footer a:hover {
    color: var(--color-primary) !important;
}

body.dark-mode .social-links a {
    background: #21262d !important;
    color: #c9d1d9 !important;
    border: 1px solid #30363d !important;
}

body.dark-mode .social-links a:hover {
    background: var(--color-primary) !important;
    color: #ffffff !important;
}

/* CTA Section Dark Mode */
body.dark-mode .cta {
    background: linear-gradient(135deg, #161b22 0%, #0d1117 100%) !important;
}

body.dark-mode .cta h2 {
    color: #c9d1d9 !important;
}

body.dark-mode .cta p {
    color: #8b949e !important;
}

/* Demo Platform Dark Mode */
body.dark-mode .demo-platform {
    background: #0d1117 !important;
}

/* Order Info Box Dark Mode */
body.dark-mode .order-info {
    background: #21262d !important;
    border: 1px solid #30363d !important;
}

body.dark-mode .order-info .info-row span:first-child {
    color: #8b949e !important;
}

body.dark-mode .order-info .info-row span:last-child {
    color: #c9d1d9 !important;
}

/* Language Toggle Dark Mode */
body.dark-mode .lang-toggle {
    background: none !important;
    border: 2px solid #30363d !important;
    color: #c9d1d9 !important;
}

body.dark-mode .lang-toggle:hover {
    border-color: var(--color-primary) !important;
    color: var(--color-primary) !important;
}

/* Mobile Menu Dark Mode */
body.dark-mode .mobile-menu-toggle {
    color: #c9d1d9 !important;
}

body.dark-mode .hamburger-line {
    background: #c9d1d9 !important;
}

/* Container and Background Elements */
body.dark-mode .container {
    background: transparent !important;
}

/* Complete Page Background Override */
body.dark-mode {
    background: #0d1117 !important;
}

body.dark-mode .page-header {
    background: linear-gradient(135deg, #0d1117 0%, #161b22 100%) !important;
}

/* Section with inline white background fix */
body.dark-mode section[style*="background: #fff"],
body.dark-mode section[style*="background:#fff"],
body.dark-mode section[style*="background: white"],
body.dark-mode section[style*="background:white"] {
    background: #161b22 !important;
}

/* Force all sections to dark mode */
body.dark-mode section {
    background: #0d1117 !important;
}

body.dark-mode .goals {
    background: #161b22 !important;
}

/* Any remaining white backgrounds */
body.dark-mode *[style*="background: white"],
body.dark-mode *[style*="background:#fff"],
body.dark-mode *[style*="background: #fff"] {
    background: #161b22 !important;
}

/* Smooth transitions for all elements */
body.dark-mode * {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease !important;
}
