/* style.css - Perfect Mobile & Desktop View */
:root {
    --bg-deep: #02040a;
    --neon-blue: #00f2ff;
    --electric-blue: #0051ff;
    --glass-black: rgba(10, 15, 25, 0.95);
    --text-main: #ffffff;
    --danger: #ff003c;
    --success: #00ff9d;
    --card-bg: #111;
}

* { box-sizing: border-box; margin: 0; padding: 0; outline: none; -webkit-tap-highlight-color: transparent; }

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background-color: var(--bg-deep);
    background-image: radial-gradient(circle at 50% 30%, #0d1b38 0%, #000000 90%);
    background-attachment: fixed;
    color: var(--text-main);
    display: flex; flex-direction: column;
    height: 100vh; /* স্ক্রিনের সমান উচ্চতা */
    overflow: hidden; /* বডি স্ক্রল বন্ধ, শুধু কন্টেন্ট স্ক্রল হবে */
}

/* --- HEADER --- */
header {
    background: #000;
    border-bottom: 2px solid var(--neon-blue);
    padding: 10px 0;
    flex-shrink: 0; /* হেডার ছোট হবে না */
    z-index: 1000;
}
.nav-container {
    padding: 0 15px; display: flex; justify-content: space-between; align-items: center;
}
.logo { font-size: 18px; font-weight: bold; color: #fff; text-decoration: none; text-transform: uppercase; }
.logo span { color: var(--neon-blue); }
.nav-menu a { color: #ccc; text-decoration: none; margin-left: 10px; font-size: 12px; font-weight: bold; text-transform: uppercase; }

/* --- MAIN LAYOUT (SCROLLABLE AREA) --- */
.main-wrapper {
    flex: 1; /* বাকি জায়গা নিবে */
    overflow-y: auto; /* শুধু এই অংশ স্ক্রল হবে */
    padding: 15px;
    width: 100%;
    display: flex; flex-direction: column; align-items: center;
}

.container {
    width: 100%; max-width: 500px; /* মোবাইলে ফুল, পিসিতে ছোট */
    margin-bottom: 20px;
}

/* --- ADMIN LIST ITEM (Most Important Fix) --- */
.list-item {
    background: #0f1219;
    padding: 12px;
    margin-bottom: 8px;
    border-radius: 6px;
    border: 1px solid #222;
    display: flex;              /* ফ্লেক্সবক্স ব্যবহার */
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    border-left: 3px solid transparent;
}
.list-item:hover { background: #1a1a1a; border-left-color: var(--neon-blue); }

/* বাম পাশের অংশ (নাম ও ইউআইডি) */
.list-left {
    flex: 1;                /* যতটুকু জায়গা পায় নিবে */
    min-width: 0;           /* টেক্সট র‍্যাপ ফিক্স */
}
.list-left h4 {
    margin: 0; color: #fff; 
    font-size: 14px;        /* ফন্ট সাইজ কমানো হয়েছে */
    white-space: nowrap;    /* এক লাইনে থাকবে */
    overflow: hidden;       /* বেশি হলে লুকাবে */
    text-overflow: ellipsis; /* ... দেখাবে */
}
.list-left span { font-size: 11px; color: #666; }

/* ডান পাশের অংশ (ডগট্যাগ) */
.list-right {
    text-align: right;
    flex-shrink: 0;         /* এটা চ্যাপ্টা হবে না */
}
.list-right .weekly { color: var(--neon-blue); font-size: 13px; font-weight: bold; display: block; }
.list-right .total { color: var(--success); font-size: 11px; }

/* --- FORMS & INPUTS --- */
.input-group { margin-bottom: 10px; }
label { display: block; color: var(--neon-blue); font-size: 11px; font-weight: bold; margin-bottom: 3px; text-transform: uppercase;}
input, select {
    width: 100%; padding: 10px; background: #000; border: 1px solid #333;
    color: #fff; border-radius: 4px; font-size: 14px;
}
input:focus { border-color: var(--neon-blue); }

.btn {
    width: 100%; padding: 12px; background: var(--neon-blue);
    color: #000; border: none; border-radius: 4px;
    font-size: 14px; font-weight: bold; text-transform: uppercase; cursor: pointer;
}

/* --- ADMIN MENU GRID --- */
.grid-menu { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-bottom: 15px; }
.menu-btn { background: #111; border: 1px solid #333; padding: 12px; text-align: center; border-radius: 5px; cursor: pointer; color: #aaa; font-size: 12px; }
.menu-btn.active { border-color: var(--neon-blue); background: #1a1a1a; color: #fff; }
.menu-btn i { font-size: 18px; margin-bottom: 5px; display: block; color: var(--neon-blue); }

/* --- MODAL (POPUP) --- */
.modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.9); z-index: 2000; justify-content: center; align-items: center; }
.modal-content { 
    background: #0b1120; width: 90%; max-width: 350px; /* মোবাইলে সাইজ ঠিক রাখা হয়েছে */
    padding: 20px; border: 1px solid var(--neon-blue); border-radius: 8px; 
    max-height: 90vh; overflow-y: auto; /* ছোট স্ক্রিনে স্ক্রল হবে */
}

/* --- FOOTER --- */
footer {
    background: #000; border-top: 1px solid #333; padding: 15px 0; text-align: center; flex-shrink: 0;
}
.social-icons a { 
    display: inline-flex; justify-content: center; align-items: center; width: 35px; height: 35px; 
    border-radius: 50%; background: #111; color: #fff; margin: 0 5px; font-size: 16px; 
    text-decoration: none; border: 1px solid #333; 
}
.copyright { color: #444; font-size: 10px; margin-top: 10px; }

/* --- SECTIONS --- */
.section { display: none; }
.show { display: block; }

/* বড় স্ক্রিনের জন্য ফিক্স */
@media (min-width: 800px) {
    .container { max-width: 800px; } /* এডমিন প্যানেল চওড়া */
    .grid-menu { gap: 15px; }
    .menu-btn { font-size: 14px; padding: 20px; }
}

/* --- LEADERBOARD SPECIFIC STYLES --- */

/* Tab Buttons */
.tab-container {
    display: flex; justify-content: center; gap: 10px; margin-bottom: 20px;
    background: #000; padding: 5px; border-radius: 50px; border: 1px solid #333;
}
.tab-btn {
    flex: 1; padding: 12px; border: none; background: transparent;
    color: #888; font-weight: bold; cursor: pointer; border-radius: 50px;
    transition: 0.3s; text-transform: uppercase; font-size: 13px;
}
.tab-btn.active {
    background: var(--neon-blue); color: #000; box-shadow: 0 0 15px rgba(0, 242, 255, 0.4);
}

/* Leaderboard List */
.lb-item {
    display: flex; align-items: center; justify-content: space-between;
    background: rgba(255,255,255,0.03); padding: 15px; margin-bottom: 8px;
    border-radius: 8px; border-left: 3px solid transparent; transition: 0.2s;
}
.lb-item:hover { background: rgba(255,255,255,0.08); }

/* Rank Numbers */
.rank-num {
    width: 30px; height: 30px; display: flex; justify-content: center; align-items: center;
    font-weight: bold; font-size: 14px; border-radius: 50%; color: #fff; background: #222;
    margin-right: 15px; flex-shrink: 0;
}

/* Top 3 Special Styles */
.rank-1 { background: transparent; border: 2px solid #FFD700; color: #FFD700; box-shadow: 0 0 10px #FFD700; } /* Gold */
.rank-2 { background: transparent; border: 2px solid #C0C0C0; color: #C0C0C0; box-shadow: 0 0 10px #C0C0C0; } /* Silver */
.rank-3 { background: transparent; border: 2px solid #CD7F32; color: #CD7F32; box-shadow: 0 0 10px #CD7F32; } /* Bronze */

.lb-info { flex: 1; text-align: left; }
.lb-info h4 { margin: 0; font-size: 15px; color: #fff; }
.lb-info span { font-size: 11px; color: #666; }

.lb-score { text-align: right; font-weight: bold; font-size: 16px; color: var(--neon-blue); }
.lb-score small { display: block; font-size: 9px; color: #aaa; text-transform: uppercase; }

/* Hide Scrollbar but allow scroll */
.scroll-box { max-height: 65vh; overflow-y: auto; padding-right: 5px; }
.scroll-box::-webkit-scrollbar { width: 5px; }
.scroll-box::-webkit-scrollbar-thumb { background: #333; border-radius: 10px; }