:root {
    --primary-bg: #0f111a;
    --card-bg: #161a26;
    --accent-color: #00d2ff;
    --gold: #ffc107;
    --success: #00c853;
    --danger: #ff5252;
    --text-primary: #ffffff;
    --text-muted: #8b949e;
    --glass: rgba(255, 255, 255, 0.03);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--primary-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 500px; /* Mobile width optimized */
    margin: 0 auto;
    padding: 15px;
    padding-bottom: 100px; /* Space for fixed footer */
}

/* Typography */
h1, h2, h3 { color: var(--text-primary); margin-bottom: 15px; font-weight: 700; }
.text-accent { color: var(--accent-color); }
.text-muted { color: var(--text-muted); font-size: 0.85rem; }

/* Global Match Card Style */
.match-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s;
}

.match-card:active {
    transform: scale(0.98);
}

/* Form Elements */
input, select {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 15px;
    border-radius: 10px;
    border: 1px solid #2d333b;
    background: #0d1117;
    color: #fff;
    font-size: 1rem;
    outline: none;
}

input:focus { border-color: var(--accent-color); }

.btn {
    display: block;
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: none;
    font-weight: bold;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    font-size: 1rem;
    transition: 0.3s;
}

.btn-join {
    background: linear-gradient(45deg, #00d2ff, #3a7bd5);
    color: #fff;
}

/* Improved Fixed Footer */
.main-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(22, 26, 38, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 1000;
}

.footer-container {
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 8px 0;
}

.nav-item {
    text-decoration: none;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    transition: 0.3s;
    width: 20%;
}

.nav-item i {
    font-size: 1.2rem;
}

.nav-item.active {
    color: var(--accent-color);
}

.nav-item.active i {
    transform: translateY(-2px);
    text-shadow: 0 0 10px var(--accent-color);
}

/* Wallet/Balance Card */
.wallet-card {
    background: linear-gradient(135deg, #1e2631 0%, #0f111a 100%);
    padding: 30px 20px;
    text-align: center;
    border-radius: 20px;
    margin-bottom: 20px;
    border: 1px solid var(--accent-color);
}

/* Progress Bar for Slots */
.progress-bar {
    height: 8px;
    background: #2d333b;
    border-radius: 10px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-fill {
    height: 100%;
    background: var(--accent-color);
    box-shadow: 0 0 10px var(--accent-color);
}

/* Alert Messages */
.alert-msg {
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 15px;
    text-align: center;
    font-weight: bold;
}
/* Header & Popup Styling */
.main-header {
    background: var(--card-bg);
    padding: 10px 15px;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 500px;
    margin: 0 auto;
}

.header-icon {
    font-size: 1.3rem;
    color: var(--text-primary);
    cursor: pointer;
    position: relative;
}

.notification-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    background: var(--danger);
    border-radius: 50%;
    border: 2px solid var(--card-bg);
}

.logo-text {
    font-size: 1.1rem;
    color: var(--accent-color);
    margin: 0;
    text-transform: uppercase;
}

.header-meta {
    display: flex;
    align-items: center;
    gap: 15px;
}

.wallet-badge {
    background: rgba(0, 210, 255, 0.1);
    padding: 5px 12px;
    border-radius: 20px;
    border: 1px solid var(--accent-color);
    font-size: 0.85rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Side Popup Styling */
.side-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    visibility: hidden;
    z-index: 2000;
}

.side-popup.active {
    visibility: visible;
}

.popup-overlay {
    background: rgba(0, 0, 0, 0.7);
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: 0.3s;
}

.side-popup.active .popup-overlay {
    opacity: 1;
}

.popup-content {
    position: absolute;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100%;
    background: var(--card-bg);
    transition: 0.3s;
    padding: 20px;
    box-shadow: 5px 0 15px rgba(0,0,0,0.5);
}

.side-popup.active .popup-content {
    left: 0;
}

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

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-info i { font-size: 2.5rem; color: var(--accent-color); }
.user-info h4 { margin: 0; font-size: 1rem; }
.user-info small { color: var(--text-muted); }

.popup-menu a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 0;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: 0.2s;
}

.popup-menu a:hover { color: var(--accent-color); }
.popup-menu a i { width: 20px; text-align: center; color: var(--text-muted); }
.badge-role {
    font-size: 0.65rem;
    background: var(--accent-color);
    color: #000;
    padding: 2px 8px;
    border-radius: 5px;
    font-weight: bold;
    display: inline-block;
}



.menu-divider {
    border: 0.1px solid rgba(255,255,255,0.05);
    margin: 10px 0;
}
.menu-label {
    font-weight: 800;
    font-size: 0.65rem;
    padding-left: 5px;
    margin-top: 10px;
    display: block;
    text-shadow: 0 0 5px rgba(0,0,0,0.5);
}