:root {
    --bg-dark: #0f0f13;
    --bg-card: #1a1a24;
    --primary-purple: #8a2be2;
    --primary-hover: #9b59b6;
    --text-main: #f0f0f0;
    --text-muted: #a0a0a0;
    --danger: #ff4757;
    --warning: #f39c12;
    --success: #2ecc71;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }
body { background-color: var(--bg-dark); color: var(--text-main); }

.navbar { display: flex; justify-content: space-between; align-items: center; padding: 20px 5%; background-color: var(--bg-card); border-bottom: 1px solid #2a2a35; }
.logo { font-size: 24px; font-weight: bold; }
.logo span { color: var(--primary-purple); }
.nav-links a { color: var(--text-main); text-decoration: none; font-weight: bold; }

.hero { text-align: center; padding: 80px 20px; }
.hero h1 { font-size: 2.5rem; margin-bottom: 15px; }
.hero p { color: var(--text-muted); margin-bottom: 30px; font-size: 1.1rem; }

.btn-primary, .btn-danger { padding: 10px 20px; border: none; border-radius: 5px; cursor: pointer; font-weight: bold; color: white; transition: 0.3s;}
.btn-primary { background-color: var(--primary-purple); }
.btn-primary:hover { background-color: var(--primary-hover); }
.btn-danger { background-color: var(--danger); }
.btn-primary:disabled { background-color: #555; cursor: not-allowed; }

/* Modal */
.modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); display: flex; justify-content: center; align-items: center; z-index: 1000; }
.hidden { display: none !important; }
.modal-content { background-color: var(--bg-card); padding: 30px; border-radius: 10px; width: 90%; max-width: 400px; position: relative; }
.close { position: absolute; top: 10px; right: 15px; font-size: 24px; cursor: pointer; color: var(--text-muted); }
#auth-form { display: flex; flex-direction: column; gap: 15px; margin-top: 20px; }
#auth-form input { padding: 12px; border-radius: 5px; border: 1px solid #333; background: var(--bg-dark); color: white; }
.msg-box { font-size: 0.9rem; text-align: center; font-weight: bold; margin-top: 5px; }
.toggle-auth { text-align: center; font-size: 0.9rem; margin-top: 10px; }
.toggle-auth a { color: var(--primary-purple); text-decoration: none; }

/* Dashboard */
.loading-screen { display: flex; justify-content: center; align-items: center; height: 100vh; font-size: 1.2rem; color: var(--primary-purple); }
.dashboard-container { display: flex; min-height: calc(100vh - 70px); flex-direction: row; }
.sidebar { width: 250px; background-color: var(--bg-card); padding: 20px 0; border-left: 1px solid #2a2a35; }
.sidebar ul { list-style: none; }
.sidebar ul li { padding: 15px 20px; cursor: pointer; color: var(--text-muted); transition: 0.3s; }
.sidebar ul li:hover, .sidebar ul li.active { background-color: rgba(138, 43, 226, 0.1); color: var(--primary-purple); border-right: 3px solid var(--primary-purple); }
.content { flex: 1; padding: 30px; }
.stats-grid { display: flex; gap: 20px; margin: 20px 0 30px 0; }
.stat-card { background-color: var(--bg-card); padding: 20px; border-radius: 10px; flex: 1; border: 1px solid #2a2a35; }
.stat-card h3 { color: var(--text-muted); font-size: 1rem; margin-bottom: 10px; }
.action-area { background-color: var(--bg-card); padding: 30px; border-radius: 10px; border: 1px solid #2a2a35; }
.action-area p { margin: 15px 0; color: var(--text-muted); }
.user-menu { display: flex; align-items: center; gap: 15px; }

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .dashboard-container { flex-direction: column; }
    .sidebar { width: 100%; border-left: none; border-bottom: 1px solid #2a2a35; padding: 10px 0; }
    .sidebar ul { display: flex; overflow-x: auto; white-space: nowrap; }
    .sidebar ul li { padding: 10px 15px; border-right: none !important; border-bottom: 3px solid transparent; }
    .sidebar ul li:hover, .sidebar ul li.active { border-bottom: 3px solid var(--primary-purple); }
    .stats-grid { flex-direction: column; }
    .hero h1 { font-size: 2rem; }
    .navbar { flex-direction: column; gap: 15px; padding: 15px; }
}
