/* Content Top Bar - Full Width Auth Bar */

/* Override any container styles */
body > .content-top-bar {
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    width: calc(100vw - 280px) !important;
}

/* Top bar that fills entire area after sidebar */
.content-top-bar {
    position: fixed !important;
    top: 0 !important;
    left: 280px !important; /* Start after sidebar */
    right: 0 !important;
    width: calc(100vw - 280px) !important; /* Full viewport width minus sidebar */
    height: 65px !important; /* Increased height */
    background: rgba(26, 29, 41, 0.98) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(10px) !important;
    z-index: 100 !important;
    box-sizing: border-box !important;
    max-width: none !important; /* Override any container max-width */
    margin: 0 !important; /* No margins */
}

.top-bar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 50px; /* Increased horizontal padding */
    width: 100%;
    box-sizing: border-box;
}

/* Left Section - Breadcrumb */
.top-bar-left {
    flex: 1;
}

.page-breadcrumb {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px; /* Slightly larger breadcrumb */
    font-weight: 500;
}

/* Right Section - Auth */
.top-bar-right {
    display: flex;
    align-items: center;
}

/* Auth Buttons */
.auth-buttons {
    display: flex;
    gap: 10px;
}

.auth-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px; /* Increased padding */
    border: none;
    border-radius: 10px; /* Slightly larger radius */
    font-size: 15px; /* Slightly larger text */
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.auth-btn svg {
    width: 18px;
    height: 18px; /* Slightly larger icons */
}

.login-btn {
    background: transparent;
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.login-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.3);
    color: #ffffff;
}

.register-btn {
    background: linear-gradient(135deg, #f7931a, #ff6b00);
    color: #ffffff;
    border: none;
}

.register-btn:hover {
    background: linear-gradient(135deg, #ff6b00, #f7931a);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(247, 147, 26, 0.3);
}

/* User Menu (Logged In State) */
.user-menu {
    position: relative;
    display: flex;
    align-items: center;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px; /* Increased padding */
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.user-info:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.user-avatar {
    width: 32px;
    height: 32px; /* Larger avatar */
    border-radius: 50%;
    background: linear-gradient(135deg, #f7931a, #ff6b00);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 13px; /* Slightly larger initial text */
    font-weight: 600;
}

.user-name {
    color: rgba(255, 255, 255, 0.9);
    font-size: 15px; /* Larger username */
    font-weight: 500;
}

.user-info svg {
    color: rgba(255, 255, 255, 0.5);
}

/* User Dropdown */
.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: #1a1d29;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 8px;
    min-width: 200px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.user-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
    font-size: 14px;
}

.user-dropdown a:hover {
    background: rgba(247, 147, 26, 0.1);
    color: #f7931a;
}

.user-dropdown a svg {
    width: 16px;
    height: 16px;
}

.user-dropdown hr,
.user-dropdown .dropdown-divider {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin: 8px 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

/* Content spacing - FINAL OVERRIDE for all containers */
body.with-sidebar .container {
    padding: 95px 40px 30px 40px !important; /* Unified padding for all pages */
    margin-top: 0 !important;
    max-width: 1400px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box !important;
}

/* Special containers need different top padding since they don't use main-content wrapper */
body.with-sidebar .news-container,
body.with-sidebar .lotto-container,
body.with-sidebar .support-container,
body.with-sidebar .guide-container,
body.with-sidebar .faq-container,
body.with-sidebar .terms-container,
body.with-sidebar .privacy-container,
body.with-sidebar .disclaimer-container,
body.with-sidebar .legal-container {
    padding: 95px 40px 30px 40px !important; /* Same as .container */
    margin-top: 0 !important;
    max-width: 1400px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box !important;
}

/* Ensure all header elements have consistent spacing - matching chart page exactly */
body.with-sidebar .page-header {
    text-align: center !important;
    margin-top: 0 !important;
    margin-bottom: 40px !important;
    padding: 30px !important;
    position: relative !important;
    max-width: 1400px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Headers without main-content wrapper need extra top margin to match */
body.with-sidebar .news-header,
body.with-sidebar .lotto-header {
    text-align: center !important;
    margin-top: 30px !important; /* Extra top margin to compensate for missing main-content padding */
    margin-bottom: 40px !important;
    padding: 30px !important;
    position: relative !important;
    max-width: 1400px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Other headers with main-content wrapper */
body.with-sidebar .support-header,
body.with-sidebar .guide-header,
body.with-sidebar .faq-header,
body.with-sidebar .trading-header {
    text-align: center !important;
    margin-top: 0 !important;
    margin-bottom: 40px !important;
    padding: 30px !important;
    position: relative !important;
    max-width: 1400px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Chart section box padding fix */
body.with-sidebar .chart-section {
    padding-top: 20px !important; /* Reduce top padding (was 30px) */
    padding-bottom: 25px !important;
    padding-left: 30px !important;
    padding-right: 30px !important;
}

/* Chart section title spacing fix */
body.with-sidebar .chart-section .chart-header {
    margin-top: 0 !important; /* Reset top margin */
    margin-bottom: 15px !important; /* Reduce bottom margin */
}

body.with-sidebar .chart-section .chart-title {
    margin-bottom: 5px !important; /* Reduce title bottom margin */
}

/* Header spacing handled by container padding */

/* Mobile Responsive */
@media (max-width: 968px) {
    .content-top-bar {
        left: 0;
        width: 100vw;
    }
}

@media (max-width: 640px) {
    .content-top-bar {
        left: 0;
        width: 100vw;
    }

    .top-bar-container {
        padding: 0 15px;
    }

    .top-bar-left {
        display: none;
    }

    .auth-btn {
        padding: 6px 12px;
        font-size: 13px;
    }

    .auth-btn span {
        display: none;
    }

    .user-name {
        display: none;
    }

    .user-dropdown {
        right: -50px;
    }
}