/* Root variables and color scheme */
:root {
    --primary: #38B137;
    --primary-dark: #2a8c29;
    --secondary: #0a2e36;
    --dark: #111;
    --light: #f8f9fa;
    --link-hover: rgba(56, 177, 55, 0.8);
    --gray: #6c757d;
    --dark-bg: #0a0a0a;
    --card-bg: #1a1a1a;
    --gold: #FFD700;
    --gold-dark: #DAA520;
    --gold-light: rgba(255, 215, 0, 0.1);
}

/* Global overflow fixes - ENHANCED */
html {
    overflow-x: hidden;
    overflow-y: scroll;
    background: #080808;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    max-width: 100%;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--dark-bg);
    color: #e0e0e0;
    line-height: 1.6;
    overflow-x: hidden;
    max-width: 100vw;
    background: linear-gradient(135deg, #0a1a1f 0%, #0a0a0a 100%);
    position: relative;
    min-height: 100vh;
    padding-right: calc(100vw - 100%);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    overflow: hidden;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header styles */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(10, 10, 10, 0.95);
    z-index: 1000;
    padding: 15px 0;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    min-height: 70px;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    overflow: hidden;
}

.logo img {
    height: 40px;
    width: auto;
    display: block;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 30px;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: var(--primary);
}

.menu-btn {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
}

/* Mobile menu */
nav ul.show {
    display: flex !important;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(10, 10, 10, 0.95);
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

nav ul.show li {
    margin: 0;
}

body.no-scroll {
    overflow: hidden !important;
}

/* Footer */
footer {
    background: #080808;
    padding: 80px 0 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 0;
}

footer .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    overflow: hidden;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 50px;
}

.footer-logo {
    flex: 1;
    min-width: 300px;
}

.footer-logo img {
    height: 40px;
    margin-bottom: 20px;
}

.footer-logo p {
    color: #aaa;
    margin-bottom: 12px;
    max-width: 400px;
}

.footer-contact {
    margin-top: 20px;
    font-weight: 500;
    color: #aaa;
}

.footer-links {
    display: flex;
    gap: 60px;
    flex-wrap: wrap;
}

.footer-links > div {
    min-width: 180px;
}

.footer-links h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: #fff;
}

.footer-links ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-links ul li {
    margin-bottom: 12px;
}

.footer-links ul li a {
    color: #aaa;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links ul li a:hover {
    color: var(--primary);
}

.copyright {
    text-align: center;
    padding-top: 30px;
    padding-bottom: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #777;
    font-size: 0.9rem;
    margin-bottom: 0;
}

footer:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
}

.copyright:last-child {
    margin-bottom: 0;
}

footer::after {
    content: none;
}

section:last-of-type {
    margin-bottom: 0;
}

html {
    scroll-behavior: smooth;
}

a:focus,
button:focus,
input:focus,
select:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

::selection {
    background: var(--primary);
    color: #fff;
}

::-moz-selection {
    background: var(--primary);
    color: #fff;
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--dark-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

@media print {
    header,
    footer,
    .btn,
    .countdown-container {
        display: none;
    }
    
    body {
        background: #fff;
        color: #000;
    }
}

/* RESPONSIVE STYLES */
@media (max-width: 992px) {
    .timeline::before {
        left: 20px;
        transform: translateX(0);
    }
    
    .timeline-item {
        width: 100%;
        left: 0 !important;
        padding-right: 0 !important;
        padding-left: 60px !important;
        text-align: left !important;
    }
    
    .timeline-item:nth-child(odd) .timeline-content::before,
    .timeline-item:nth-child(even) .timeline-content::before {
        left: -50px;
        right: auto;
        top: 30px;
    }
}

@media (max-width: 768px) {
    .container,
    .header-container,
    .footer-content {
        max-width: 100%;
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .menu-btn {
        display: block;
    }
    
    nav ul {
        display: none;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 30px;
    }
    
    .timeline::before {
        left: 15px;
    }
    
    .timeline-item {
        padding-left: 50px !important;
    }
    
    .timeline-item:nth-child(odd) .timeline-content::before,
    .timeline-item:nth-child(even) .timeline-content::before {
        left: -45px;
        width: 16px;
        height: 16px;
        top: 35px;
    }
}

@media (max-width: 480px) {
    .timeline {
        padding-left: 5px;
    }
    
    .timeline::before {
        left: 12px;
    }
    
    .timeline-item {
        padding-left: 45px !important;
        margin-bottom: 30px;
    }
    
    .timeline-item:nth-child(odd) .timeline-content::before,
    .timeline-item:nth-child(even) .timeline-content::before {
        left: -41px;
        width: 14px;
        height: 14px;
        top: 35px;
        border-width: 3px;
    }
}

/* DASHBOARD SPECIFIC STYLES */
body.dashboard-page {
    padding-bottom: 0;
    margin-bottom: 0;
}

body.dashboard-page main {
    padding-top: 120px;
    margin-bottom: 0;
    padding-bottom: 0;
}

.dashboard-section {
    padding: 60px 0 60px;
    margin-bottom: 0;
}

.dashboard-header {
    text-align: center;
    margin-bottom: 40px;
    animation: fadeIn 0.6s ease-out;
}

.dashboard-header h2 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: #fff;
}

.dashboard-header p,
.dashboard-header .last-update {
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.95rem;
}

.status-indicator {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
}

.status-indicator .badge {
    padding: 10px 18px;
    border-radius: 999px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.status-online {
    background: rgba(56, 177, 55, 0.15) !important;
    color: var(--primary) !important;
    border-color: rgba(56, 177, 55, 0.4) !important;
}

.status-offline {
    background: rgba(220, 53, 69, 0.15) !important;
    color: #ff6b6b !important;
    border-color: rgba(220, 53, 69, 0.4) !important;
}

#time-filter-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    list-style: none;
    padding: 0;
}

#time-filter-tabs .nav-link {
    display: inline-block;
    padding: 10px 26px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.75);
    font-weight: 600;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
}

#time-filter-tabs .nav-link:hover {
    color: #fff;
    border-color: rgba(56, 177, 55, 0.4);
}

#time-filter-tabs .nav-link.active {
    background: var(--primary);
    color: #fff;
    border-color: transparent;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: linear-gradient(135deg, rgba(56, 177, 55, 0.1) 0%, rgba(10, 46, 54, 0.6) 100%);
    border-radius: 18px;
    padding: 25px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(6px);
    transition: transform 0.3s ease;
}

.stat-card .stat-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
    border-radius: 50%;
    background: rgba(56, 177, 55, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.8rem;
}

.stat-card h5 {
    font-size: 1.05rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 10px;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
}

.stat-card .stat-value.profit-positive {
    color: var(--primary);
}

.stat-card .stat-value.profit-negative {
    color: #ff6b6b;
}

.stat-card.drawdown {
    background: linear-gradient(135deg, rgba(255, 87, 108, 0.15) 0%, rgba(255, 143, 193, 0.05) 100%);
    border-color: rgba(255, 87, 108, 0.2);
}

.stat-card.drawdown .stat-icon {
    background: rgba(255, 87, 108, 0.15);
    color: #ff6b81;
}

.stat-card .stat-note {
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.85rem;
}

.chart-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.dashboard-card {
    background: rgba(18, 18, 18, 0.9);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(6px);
}

.dashboard-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 24px;
    background: rgba(56, 177, 55, 0.12);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.dashboard-card-header i {
    font-size: 1.5rem;
    color: var(--primary);
}

.dashboard-card-header h5 {
    margin: 0;
    font-size: 1.2rem;
    color: #fff;
    font-weight: 600;
}

.dashboard-card-body {
    padding: 25px;
}

.chart-container {
    position: relative;
    height: 360px;
}

.account-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.account-card .dashboard-card-header {
    background: rgba(17, 153, 142, 0.15);
}

.account-card .dashboard-card-header i {
    color: #38ef7d;
}

.account-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.account-detail {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.account-detail .label {
    display: block;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 6px;
}

.account-detail .value {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
}

.info-banner {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(56, 177, 55, 0.12);
    border: 1px solid rgba(56, 177, 55, 0.35);
    border-radius: 16px;
    padding: 18px 22px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0;
}

.info-banner i {
    font-size: 1.4rem;
    color: var(--primary);
}

@media (max-width: 992px) {
    body.dashboard-page main {
        padding-top: 110px;
    }
    
    .account-details {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    #time-filter-tabs {
        flex-direction: column;
        gap: 12px;
    }
    
    #time-filter-tabs .nav-link {
        text-align: center;
    }
    
    .chart-container {
        height: 300px;
    }
    
    .dashboard-card-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .status-indicator {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .dashboard-header h2 {
        font-size: 1.8rem;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .dashboard-card-body {
        padding: 20px;
    }
}