/* =========================================
   🎨 STYLE.CSS - FINAL COMPLETE VERSION
   ========================================= */

:root {
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --text-color: #e0e0e0;
    --accent-color: #bb86fc;
    --border-color: #333;
    --success-color: #4caf50;
    --danger-color: #cf6679;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0; padding: 0;
    display: flex; justify-content: center; align-items: center;
    min-height: 100vh; font-size: 14px;
}

.hidden { display: none !important; }

/* --- Navbar Compact --- */
.navbar {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 15px; background: var(--card-bg);
    position: fixed; top: 0; left: 0; right: 0; height: 50px;
    z-index: 50; box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
.nav-left { display: flex; align-items: center; gap: 10px; }
.nav-actions { display: flex; gap: 10px; align-items: center; }
.app-title { font-size: 1rem; font-weight: bold; color: var(--text-color); }
.icon-btn { background: none; border: none; cursor: pointer; padding: 5px; display: flex; align-items: center; }
.profile-pic-small { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; border: 2px solid var(--accent-color); cursor: pointer; }

/* --- Sidebar & Mobile UX --- */
.sidebar {
    position: fixed; top: 0; left: -260px; width: 220px; height: 100%;
    background: #1a1a1a; z-index: 100; transition: left 0.3s ease;
    padding: 15px; box-shadow: 2px 0 10px rgba(0,0,0,0.5); display: flex; flex-direction: column;
}
.sidebar.active { left: 0; }
.sidebar-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; border-bottom: 1px solid #333; padding-bottom: 10px; }
.sidebar-menu { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.sidebar-menu li { padding: 8px 10px; border-radius: 6px; cursor: pointer; transition: 0.2s; font-size: 0.9rem; }
.sidebar-menu li:hover { background: rgba(255,255,255,0.05); }

/* Mobile UX */
#close-sidebar { font-size: 2.5rem; padding: 5px 15px; color: #ff6b6b; background: none; border: none; cursor: pointer; line-height: 0.8; }
.overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0,0,0,0.6); z-index: 90; backdrop-filter: blur(2px); }

/* --- Layout & Cards --- */
.main-container { width: 100%; max-width: 600px; padding: 15px; box-sizing: border-box; }
.content-wrapper { margin-top: 60px; width: 100%; }
.card-container { background: var(--card-bg); padding: 30px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); width: 100%; max-width: 350px; text-align: center; margin: 20px; }

/* --- Calendar --- */
.calendar-header-card { background: var(--card-bg); padding: 10px; border-radius: 10px; margin-bottom: 10px; text-align: center; }
.streak-info-center { margin-bottom: 10px; font-size: 1rem; color: #ff9800; }
.calendar-nav { display: flex; justify-content: space-between; align-items: center; background: rgba(255, 255, 255, 0.05); padding: 5px 10px; border-radius: 50px; width: 100%; max-width: 250px; margin: 0 auto; }
#current-month-year { font-size: 1rem; margin: 0; white-space: nowrap; }
.nav-btn { background: var(--border-color); color: var(--text-color); border: none; width: 30px; height: 30px; border-radius: 50%; cursor: pointer; font-size: 1rem; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.weekday { text-align: center; font-weight: bold; color: #666; margin-bottom: 5px; font-size: 0.8rem; }
.days-container { display: contents; }
.day { aspect-ratio: 1 / 1; background: var(--card-bg); border-radius: 6px; border: 2px solid transparent; cursor: pointer; position: relative; overflow: hidden; transition: transform 0.1s; }
.day:hover { transform: scale(1.05); z-index: 10; border-color: #555; }
.day.current-day { border-color: white; }
.day-number { position: absolute; top: 3px; left: 3px; font-size: 0.65rem; background: rgba(0,0,0,0.6); padding: 1px 4px; border-radius: 4px; z-index: 2; }
.day-img { width: 100%; height: 100%; object-fit: cover; position: absolute; top: 0; left: 0; }
.day-icon { height: 100%; display: flex; justify-content: center; align-items: center; font-size: 1.2rem; }

/* Burning Effect */
@keyframes burn { 0% { box-shadow: 0 0 5px #ff9800, 0 0 10px #ff5722; border-color: #ff9800; } 50% { box-shadow: 0 0 15px #ffeb3b, 0 0 20px #ff9800; border-color: #ffeb3b; } 100% { box-shadow: 0 0 5px #ff9800, 0 0 10px #ff5722; border-color: #ff9800; } }
.day.burning { animation: burn 1.5s infinite alternate; border: 2px solid #ff9800 !important; z-index: 5; }
.day.burning::after { content: '🔥'; position: absolute; top: 1px; right: 1px; font-size: 0.7rem; z-index: 10; text-shadow: 0 0 2px black; }

/* --- Forms & Modals --- */
.password-wrapper { position: relative; width: 100%; }
.eye-btn { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; }
.auth-input, textarea { width: 100%; padding: 10px; margin: 8px 0; background: #2a2a2a; border: 1px solid #444; color: var(--text-color); border-radius: 6px; box-sizing: border-box; font-size: 0.9rem; }
.auth-buttons { display: flex; gap: 8px; margin-top: 15px; }
.primary-btn { background: var(--accent-color); color: black; border: none; padding: 10px; border-radius: 6px; cursor: pointer; font-weight: bold; flex: 1; font-size: 0.9rem; text-decoration: none; display: inline-block;}
.secondary-btn { background: #444; color: white; border: none; padding: 10px; border-radius: 6px; cursor: pointer; font-weight: bold; flex: 1; font-size: 0.9rem; }
.danger-btn { background: var(--danger-color); color: white; border: none; padding: 10px; border-radius: 6px; width: 100%; cursor: pointer; font-size: 0.9rem; margin-top: 10px; }
.link-text { color: #888; text-decoration: underline; font-size: 0.8rem; cursor: pointer; }
.error-msg { color: var(--danger-color); margin-top: 10px; min-height: 20px; font-size: 0.8rem; }

.modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.85); display: flex; justify-content: center; align-items: center; z-index: 200; }
.modal-content { background: var(--card-bg); padding: 25px; border-radius: 12px; width: 90%; max-width: 350px; position: relative; text-align: center; max-height: 90vh; overflow-y: auto; color: var(--text-color); }
.close-btn { position: absolute; top: 10px; right: 15px; font-size: 1.2rem; cursor: pointer; color: #888; }
.file-label { display: inline-block; padding: 8px 15px; background: var(--accent-color); color: black; border-radius: 6px; cursor: pointer; margin-bottom: 10px; width: 100%; box-sizing: border-box; font-size: 0.9rem; }
input[type="file"] { display: none; }
#image-preview-container img { max-width: 100%; max-height: 200px; border-radius: 6px; margin-top: 10px; }
.actions { display: flex; gap: 10px; margin-top: 10px; }
.profile-pic-large { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; border: 3px solid var(--accent-color); margin-bottom: 10px; }
.profile-edit-section { display: flex; flex-direction: column; align-items: center; }

/* --- Donate Tabs --- */
.donate-tabs { display: flex; justify-content: center; gap: 5px; margin-bottom: 20px; background: rgba(255,255,255,0.05); padding: 5px; border-radius: 8px; }
.tab-btn { flex: 1; background: none; border: none; color: #888; padding: 8px 5px; cursor: pointer; font-size: 0.85rem; border-radius: 6px; transition: 0.3s; }
.tab-btn.active { background: var(--accent-color); color: black; font-weight: bold; box-shadow: 0 2px 10px rgba(187, 134, 252, 0.3); }
.donate-section { animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }

.qr-container { width: 180px; height: 180px; margin: 0 auto 15px auto; border: 3px solid var(--accent-color); border-radius: 12px; overflow: hidden; background: white; display: flex; align-items: center; justify-content: center; }
.qr-img { width: 100%; height: 100%; object-fit: contain; }
.donate-info-text { color: var(--text-color); margin-bottom: 10px; font-size: 0.9rem; }
.copy-box { display: flex; align-items: center; justify-content: space-between; background: #2a2a2a; padding: 8px 12px; border-radius: 8px; border: 1px solid #444; }
.code-text { font-family: monospace; font-size: 1.1rem; letter-spacing: 1px; color: #fff; }
.copy-btn { background: none; border: none; color: var(--accent-color); cursor: pointer; padding: 5px; display: flex; align-items: center; }
.copy-btn:hover { color: white; }

/* --- Leaderboard Styling --- */
.leaderboard-container {
    max-height: 300px; overflow-y: auto; overflow-x: hidden; display: flex; flex-direction: column; margin-bottom: 10px; border-radius: 12px; background: rgba(0, 0, 0, 0.2); padding: 10px;
}
.rank-item { display: flex; align-items: center; padding: 12px 15px; margin-bottom: 8px; background: #2a2a2a; border-radius: 10px; border: 1px solid #444; transition: transform 0.2s; }
.rank-item:hover { transform: scale(1.02); }

/* Tiers */
.rank-item.rank-1 { background: linear-gradient(135deg, #FFD700, #2a2a2a); border: 2px solid #FFD700; box-shadow: 0 0 15px rgba(255, 215, 0, 0.4); transform: scale(1.05); }
.rank-1 .rank-number { color: #FFD700; font-size: 1.8rem; text-shadow: 0 0 5px black; }
.rank-item.rank-2 { background: linear-gradient(135deg, #C0C0C0, #2a2a2a); border: 2px solid #C0C0C0; }
.rank-2 .rank-number { color: #C0C0C0; font-size: 1.5rem; }
.rank-item.rank-3 { background: linear-gradient(135deg, #CD7F32, #2a2a2a); border: 2px solid #CD7F32; }
.rank-3 .rank-number { color: #CD7F32; font-size: 1.5rem; }
.rank-item.rank-top-10 { background: rgba(255, 215, 0, 0.15); border-left: 4px solid #FFD700; }
.rank-top-10 .rank-number { color: #FFD700; font-weight: bold; }
.rank-item.rank-top-50 { border-left: 4px solid #4fc3f7; }
.rank-top-50 .rank-number { color: #4fc3f7; }
.rank-item.rank-normal { border-left: 4px solid #666; opacity: 0.8; }
.rank-normal .rank-number { color: #aaa; font-size: 0.9rem; }

.rank-number { width: 35px; text-align: center; margin-right: 15px; }
.rank-avatar { width: 40px; height: 40px; border-radius: 50%; margin-right: 15px; object-fit: cover; border: 2px solid rgba(255,255,255,0.1); }
.rank-info { flex-grow: 1; text-align: left; }
.rank-name { font-weight: bold; font-size: 1rem; display: block; color: var(--text-color); }
.rank-streak { font-size: 0.85rem; color: #ff9800; font-weight: bold; }
.my-rank-bar { background: var(--accent-color); color: black; padding: 10px; border-radius: 8px; font-weight: bold; display: flex; justify-content: space-between; align-items: center; margin-top: 15px; }

/* Rules */
.rules-toggle-btn { background: none; border: 1px solid #444; color: #888; padding: 5px 12px; border-radius: 20px; font-size: 0.8rem; cursor: pointer; margin-bottom: 15px; }
.rules-toggle-btn:hover { border-color: var(--accent-color); color: var(--accent-color); }
.rules-box { background: rgba(255, 255, 255, 0.05); border-radius: 8px; padding: 15px; margin-bottom: 15px; border: 1px solid #444; animation: fadeIn 0.3s ease; }

.privacy-content { max-height: 60vh; overflow-y: auto; padding-right: 10px; font-size: 0.95rem; line-height: 1.6; color: var(--text-color); }
.lang-toggle-btn { background: rgba(255,255,255,0.1); border: 1px solid var(--border-color); color: var(--text-color); padding: 5px 10px; border-radius: 20px; cursor: pointer; font-size: 0.8rem; }
.lang-toggle-btn:hover { background: var(--accent-color); color: white; border-color: var(--accent-color); }

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #444; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-color); }
* { scrollbar-width: thin; scrollbar-color: #444 transparent; }