/* ================================================= */
/* =====     FINAL CORRECTED STYLES.CSS      ===== */
/* ================================================= */

/* ===== GLOBAL STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    background-color: #2a2a2a;
    color: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #b85b1c;
}

/* ===== LAYOUT STRUCTURE ===== */
/* This is the only `.sidebar` rule. It is fixed to the viewport. */
.sidebar {
    width: 250px;
    height: 100vh;
    background-color: #1e1e1e;
    padding: 20px;
    position: fixed;
    left: 0;
    top: 0;
    overflow-y: auto;
    z-index: 2000;
    transition: transform 0.3s ease;
    transform: translateX(0);
}

/* Hide sidebar entirely on small screens; it can be toggled via a menu if needed */
@media (max-width: 900px) {
    .sidebar { display: none; }
    .top-fixed-area { left: 0 !important; }
    .page-content-wrapper { margin-left: 0 !important; }
}

/* The header is also fixed to the viewport, positioned next to the sidebar. */
.top-fixed-area {
    position: fixed;
    top: 0;
    left: 250px;
    right: 0;
    background-color: #2a2a2a;
    z-index: 1000;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
    border-bottom: 1px solid #333;
}

/* Added: Styles for .page-content-wrapper to contain main content */
.page-content-wrapper {
    margin-left: 250px; /* Match sidebar width */
    padding-top: 80px; /* Space for header (60px height + 20px buffer) */
    min-height: 100vh; /* Ensure it spans viewport height */
    background-color: #2a2a2a; /* Match body background */
}

/* Updated: Simplified .main-content styles since .page-content-wrapper handles offset */
.main-content {
    padding: 30px; /* Unified padding */
    max-width: 1200px; /* Constrain content width */
    margin: 0 auto; /* Center content */
}

/* ===== SIDEBAR CONTENT STYLES ===== */
.sidebar .logo-image {
    width: 50%;
    margin: 0 auto 20px;
    display: block;
}

.sidebar .logo {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 30px;
    color: #b85b1c;
    text-align: center;
}

.sidebar ul {
    list-style: none;
}

.sidebar ul li {
    margin: 15px 0;
}

.sidebar ul li a {
    color: #ffffff;
    font-size: 16px;
    display: block;
    padding: 10px;
    border-radius: 5px;
    transition: all 0.2s ease;
}

.sidebar ul li a:hover {
    background-color: #333;
}

.sidebar ul li a.active {
    background-color: #b85b1c;
    color: #fff;
}

.sidebar .dropdown {
    position: relative;
}

.sidebar .dropdown-menu {
    display: none;
    background-color: #1e1e1e;
    margin: 0;
    padding: 5px 0;
    border: 1px solid #333;
    z-index: 3000;
    width: 210px;
    min-height: 50px;
    position: absolute;
    left: 0;
    top: 100%;
}

.sidebar .dropdown-active .dropdown-menu {
    display: block;
}

.sidebar .dropdown-menu li {
    margin: 0;
    padding: 0;
}

.sidebar .dropdown-menu li a {
    padding: 8px 10px;
    font-size: 10px;
}

.sidebar .dropdown-menu li a:hover {
    background-color: #333;
}

/* ===== HEADER CONTENT STYLES ===== */
.news-section {
    flex-grow: 1;
    text-align: center;
    color: #fff;
    font-size: 14px;
    padding: 0 20px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wallet-connect {
    display: flex;
    align-items: center;
    position: relative;
}

.wallet-connect img {
    width: 40px;
    height: 40px;
    margin-right: 10px;
    transition: transform 0.2s ease;
    cursor: pointer;
}

.wallet-connect img:hover {
    transform: scale(1.1);
    filter: brightness(1.2);
}

.wallet-connect button {
    background-color: #b85b1c;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.2s ease;
}

.wallet-connect button:hover {
    background-color: #a34f19;
}

.wallet-status, .balance-box {
    display: none;
    margin-top: 10px;
    padding: 10px;
    background-color: #333;
    border-radius: 5px;
    color: #fff;
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.wallet-status { width: 300px; }
.balance-box { width: 250px; }

.balance-box p {
    margin: 5px 0;
    font-size: 14px;
}

.balance-box .balance-label {
    font-weight: bold;
    color: #b85b1c;
}

/* ===== HERO CONTENT STYLES ===== */
.hero {
    text-align: center;
    padding: 20px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
    color: #b85b1c;
}

.hero p {
    font-size: 18px;
    max-width: 800px;
    margin: 0 auto 15px;
    line-height: 1.6;
    color: #cccccc;
}

.banner {
    width: 100%;
    max-width: 1200px;
    height: auto;
    margin: 0 auto 25px;
    display: block;
    border-radius: 8px;
}

/* ===== CONTACT LINKS ===== */
.contact-links {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    gap: 15px;
    z-index: 1000;
}

.contact-links a img {
    width: 40px;
    height: 40px;
    transition: transform 0.2s ease;
}

.contact-links a img:hover {
    transform: scale(1.1);
    filter: brightness(1.2);
}

/* ===== MOBILE & UTILITY STYLES ===== */
.menu-toggle {
    display: none;
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-left: 8px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.hidden {
    display: none !important;
}

@media (max-width: 768px) {
    /* Redundant transform rules removed because sidebar is fully hidden earlier */
    .top-fixed-area {
        left: 0;
        width: 100vw;
    }
    .page-content-wrapper {
        margin-left: 0; /* No sidebar offset on mobile */
        padding-top: 70px; /* Match header spacing */
    }
    .main-content {
        width: 100%;
        padding: 20px; /* Slightly smaller padding for mobile */
    }
    .menu-toggle {
        display: block;
        position: fixed;
        top: 15px;
        left: 15px;
        background-color: #b85b1c;
        color: #fff;
        border: none;
        padding: 8px 15px;
        cursor: pointer;
        z-index: 4100;
        border-radius: 5px;
        font-size: 24px;
    }
    .hero h1 {
        font-size: 32px;
    }
    .hero p {
        font-size: 16px;
    }
}