/* 1. RESET & CORE STYLES */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background-color: #020617; /* Midnight Black */
    color: #f8fafc;
    line-height: 1.5;
    padding-bottom: 160px; /* Room for Command Bar + Bottom Nav */
    overflow-x: hidden;
}

/* 2. FIXED HEADER */
.top-bar {
    position: fixed;
    top: 0;
    width: 100%;
    height: 65px;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    border-bottom: 1px solid #1e293b;
    z-index: 1000;
}

.logo {
    font-weight: 900;
    font-size: 1.2rem;
    color: #3b82f6;
    font-style: italic;
    letter-spacing: -1px;
}

.wallet-pill {
    background: #0f172a;
    border: 1px solid #334155;
    padding: 6px 14px;
    border-radius: 20px;
    color: #10b981;
    font-weight: 700;
    font-family: monospace;
}

/* 3. SOCIAL STREAM & CHAT */
.stream-container {
    padding: 80px 15px 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.chat-bubble {
    background: #1e293b;
    padding: 12px 16px;
    border-radius: 18px 18px 18px 4px;
    max-width: 85%;
    align-self: flex-start;
    border: 1px solid #334155;
}

.user-name { color: #3b82f6; font-weight: 800; font-size: 13px; margin-right: 5px; }
.msg-text { font-size: 14px; color: #e2e8f0; }

.system-msg {
    text-align: center;
    font-size: 11px;
    color: #64748b;
    margin: 10px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* 4. WAGER CARDS (Chat Injections) */
.card {
    background: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 16px;
    padding: 20px;
    transition: transform 0.2s ease;
}

.wager-injection {
    border-left: 4px solid #3b82f6;
    background: linear-gradient(to right, rgba(59, 130, 246, 0.1), #0f172a);
}

.wager-amount {
    font-size: 24px;
    font-weight: 900;
    color: #10b981;
}

.game-tag {
    background: #1e293b;
    color: #60a5fa;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

/* 5. FIXED COMMAND BAR (Chat Input) */
.chat-command-bar {
    position: fixed;
    bottom: 80px; 
    width: 100%;
    padding: 10px 15px;
    background: rgba(2, 6, 23, 0.95);
    backdrop-filter: blur(10px);
    z-index: 999;
    border-top: 1px solid #1e293b;
}

.input-wrapper {
    background: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 30px;
    display: flex;
    align-items: center;
    padding: 5px 10px;
}

.plus-btn {
    background: #3b82f6;
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    font-size: 22px;
    font-weight: bold;
    cursor: pointer;
}

#chat-input {
    flex: 1;
    background: transparent;
    border: none;
    color: white;
    padding: 10px;
    font-size: 16px; /* Prevents iOS zoom */
}

#chat-input:focus { outline: none; }

.send-btn {
    background: transparent;
    border: none;
    color: #3b82f6;
    padding: 5px;
}

/* 6. BOTTOM NAVIGATION */
.bottom-nav {
    position: fixed;
    bottom: 0;
    width: 100%;
    height: 80px;
    background: #020617;
    border-top: 1px solid #1e293b;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding-bottom: 20px;
    z-index: 1000;
}

.nav-item {
    text-decoration: none;
    color: #64748b;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.nav-item.active { color: #3b82f6; }

/* 7. GENERAL BUTTONS */
.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
}
/* Auth Page Styles */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
    padding: 20px;
}

.auth-card {
    background: rgba(30, 41, 59, 0.4);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(59, 130, 246, 0.2);
    padding: 40px 30px;
    border-radius: 24px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.auth-header { text-align: center; margin-bottom: 30px; }
.auth-header h1 { color: #3b82f6; font-style: italic; font-weight: 900; letter-spacing: -1px; margin-bottom: 5px; }
.auth-header p { color: #64748b; font-size: 14px; }

.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 11px; font-weight: 800; color: #3b82f6; margin-bottom: 8px; letter-spacing: 1px; }

.input-field {
    width: 100%;
    background: #0f172a !important;
    border: 1px solid #1e293b !important;
    padding: 16px !important;
    border-radius: 12px !important;
    color: white !important;
    font-size: 16px !important; /* Prevents iOS auto-zoom */
    transition: border-color 0.3s ease;
}

.input-field:focus {
    border-color: #3b82f6 !important;
    outline: none;
}

.auth-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 30px;
}

.btn-secondary {
    background: #1e293b;
    color: #f8fafc;
    border: 1px solid #334155;
    padding: 16px;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
}

.auth-error {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    padding: 12px;
    border-radius: 10px;
    text-align: center;
    font-size: 13px;
    margin-bottom: 20px;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.auth-footer {
    text-align: center;
    font-size: 10px;
    color: #475569;
    margin-top: 25px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
/* User ID Badge in Header */
.user-id-badge {
    font-size: 11px; font-weight: 800; color: #94a3b8;
    display: flex; align-items: center; gap: 6px;
}
.status-dot { width: 6px; height: 6px; background: #10b981; border-radius: 50%; box-shadow: 0 0 5px #10b981; }

/* Pinned Shelf Styling */
.pinned-wagers-container { padding: 80px 0 10px; background: #020617; }
.section-label { font-size: 10px; font-weight: 900; color: #3b82f6; padding: 0 20px 8px; letter-spacing: 1px; }
.wager-shelf {
    display: flex; overflow-x: auto; gap: 12px; padding: 0 20px 10px;
    scrollbar-width: none; /* Hide scrollbar Firefox */
}
.wager-shelf::-webkit-scrollbar { display: none; } /* Hide scrollbar Chrome */

.shelf-card {
    min-width: 160px; background: #0f172a; border: 1px solid #1e293b;
    border-radius: 12px; padding: 12px; flex-shrink: 0;
}
.shelf-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.shelf-header .amt { color: #10b981; font-weight: 900; font-size: 18px; }
.shelf-header .game { font-size: 9px; color: #64748b; font-weight: 800; }
.shelf-user { font-size: 12px; font-weight: 600; color: #f8fafc; margin-bottom: 10px; }
.btn-accept-sm { 
    width: 100%; background: #3b82f6; border: none; color: white; 
    padding: 6px; border-radius: 6px; font-weight: 800; font-size: 10px; 
}
.dispute-border {
    border: 1px solid #ef4444 !important;
    background: rgba(239, 68, 68, 0.05) !important;
}
/* Wallet Profile Styles */
.wallet-hero {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.6) 0%, rgba(15, 23, 42, 0.8) 100%);
    border: 1px solid rgba(59, 130, 246, 0.3);
    text-align: center;
}

.wallet-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    border-top: 1px solid #1e293b;
    padding-top: 20px;
}

.split-box .label {
    display: block;
    font-size: 10px;
    font-weight: 800;
    color: #64748b;
    margin-bottom: 4px;
}

.split-box .val {
    font-size: 18px;
    font-weight: 900;
    font-family: monospace;
}

/* Transaction List */
.transaction-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: rgba(30, 41, 59, 0.2);
    border-radius: 12px;
    margin-bottom: 8px;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.t-info { display: flex; flex-direction: column; }
.t-desc { font-size: 13px; font-weight: 600; color: #f8fafc; }
.t-date { font-size: 11px; color: #64748b; }

.t-amt { font-weight: 900; font-family: monospace; }
.t-amt.pos { color: #10b981; }
.t-amt.neg { color: #ef4444; }
.leaderboard-card {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important;
    border: 1px solid #f59e0b44 !important;
    min-width: 120px !important;
    position: relative;
    overflow: hidden;
}

.leaderboard-card .rank {
    position: absolute;
    right: -5px;
    top: -5px;
    font-size: 40px;
    font-weight: 900;
    color: rgba(245, 158, 11, 0.1);
    font-style: italic;
}

.leaderboard-card .stats {
    font-size: 10px;
    font-weight: 900;
    color: #f59e0b;
    letter-spacing: 1px;
}
/* Lock the Header and Pinned section to the top */
.top-bar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.pinned-wagers-container {
    position: fixed;
    top: 60px; /* Sits right below the top-bar */
    width: 100%;
    z-index: 999;
    background: #020617; /* Matches site background */
    border-bottom: 1px solid #1e293b;
    padding-bottom: 10px;
}

/* Push the chat down so it doesn't start behind the pinned section */
.stream-container {
    margin-top: 180px; /* Adjust this number based on the height of your shelf */
    padding-bottom: 100px; /* Room for the chat input bar */
}

/* Ensure the chat input stays at the very bottom */
.chat-command-bar {
    position: fixed;
    bottom: 65px; /* Sits above the nav bar */
    width: 100%;
    z-index: 1000;
}
.chat-header-sticky {
    position: fixed;
    top: 60px; /* Below the main blue top-bar */
    width: 100%;
    background: #0f172a;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #1e293b;
    z-index: 998;
}

/* Ensure the DM bubbles don't get hidden behind the header */
#dm-stream {
    padding-top: 130px !important; 
}
/* The Container that floats above the Nav */
.chat-command-bar {
    position: fixed;
    bottom: 80px; /* Sits exactly above the bottom nav */
    left: 0;
    width: 100%;
    padding: 10px 15px;
    background: rgba(15, 23, 42, 0.8); /* Translucent dark blue */
    backdrop-filter: blur(10px); /* The "Glassmorphism" effect */
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 1000;
}

/* The Pill-Shaped Wrapper */
.input-wrapper {
    display: flex;
    align-items: center;
    background: #1e293b; /* Slightly lighter than the background */
    border-radius: 25px; /* Makes it a pill */
    padding: 5px 5px 5px 15px;
    border: 1px solid #334155;
    transition: border 0.3s ease;
}

.input-wrapper:focus-within {
    border-color: #3b82f6; /* Glow blue when typing */
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.2);
}

/* The actual text input - removing the "Old Box" look */
#dm-input, #chat-input {
    flex: 1;
    background: transparent;
    border: none;
    color: white;
    font-size: 14px;
    outline: none; /* Removes the ugly blue browser outline */
    padding: 10px 0;
}

/* The Send Button */
.send-btn {
    background: #3b82f6;
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%; /* Perfect Circle */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    transition: transform 0.2s ease;
}

.send-btn:active {
    transform: scale(0.9); /* Squish effect when tapped */
}
.custom-file-upload {
    display: block;
    border: 2px dashed #334155;
    background: #0f172a;
    color: #3b82f6;
    padding: 12px;
    text-align: center;
    border-radius: 12px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 800;
    transition: all 0.3s ease;
}