:root {
  --bg-color: #0F0429;
  --bg-sidebar: rgba(18, 11, 26, 0.6);
  --bg-card: rgba(255, 255, 255, 0.05);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --primary: #00FFA3;
  --primary-hover: #00E08B;
  --accent-gold: #fbbf24;
  --border-color: rgba(255, 255, 255, 0.15);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
}

body {
  background-color: var(--bg-color);
  background-image: radial-gradient(circle at top right, rgba(74, 0, 224, 0.3), transparent 50%),
                    radial-gradient(circle at bottom left, rgba(142, 45, 226, 0.3), transparent 50%);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
}

/* Layout */
.app-layout {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 260px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  z-index: 10;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 2rem;
  text-decoration: none;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #6366f1, #c084fc);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.2rem;
  color: white;
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(to right, #e2e8f0, #c084fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 1px;
}

/* Profile Block (Sidebar) */
.profile-block {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: block;
}

.profile-block:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(192, 132, 252, 0.4);
  transform: translateY(-2px);
}

.profile-top {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.8rem;
}

.profile-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4f46e5, #c084fc);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: white;
  border: 2px solid rgba(192, 132, 252, 0.3);
  object-fit: cover;
}

.profile-info {
  flex: 1;
}

.balance-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(251, 191, 36, 0.15);
  border: 1px solid rgba(251, 191, 36, 0.3);
  padding: 0.3rem 0.6rem;
  border-radius: 20px;
  font-weight: 700;
  color: var(--accent-gold);
  font-size: 0.95rem;
}

.coin-icon {
  width: 18px;
  height: 18px;
  background: radial-gradient(circle, #fbbf24, #d97706);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(251, 191, 36, 0.6);
  border: 1px solid #fef3c7;
}

.auth-btn {
  display: block;
  text-align: center;
  background: linear-gradient(90deg, #6366f1, #c084fc);
  color: white;
  padding: 0.8rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.3s;
}

.auth-btn:hover {
  opacity: 0.9;
}

/* Sidebar Nav */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem 1rem;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.3s;
}

.nav-item:hover, .nav-item.active {
  background: rgba(192, 132, 252, 0.15);
  color: white;
}

.nav-item.active {
  border-left: 3px solid var(--primary);
}

/* Main Content */
.main-content {
  flex: 1;
  padding: 2rem;
  overflow-y: auto;
  position: relative;
}

/* Topbar / Header (without nickname) */
.topbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-bottom: 2rem;
}

.banner {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.8), rgba(192, 132, 252, 0.8));
  border-radius: 16px;
  padding: 3rem 2rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
  margin-bottom: 2rem;
}

.banner::after {
  content: '';
  position: absolute;
  top: -50%; right: -10%;
  width: 300px; height: 300px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  filter: blur(40px);
}

.banner h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.banner p {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.9);
  max-width: 600px;
}

/* Stats Widgets */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  backdrop-filter: blur(10px);
  transition: transform 0.3s;
}

.stat-card:hover {
  transform: translateY(-3px);
  border-color: rgba(192, 132, 252, 0.3);
}

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: white;
  margin-bottom: 0.3rem;
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Projects & News Grid */
.content-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
}

.section-title {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: white;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.projects-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.project-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.2rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  transition: all 0.3s;
}

.project-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--primary);
}

.project-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: rgba(192, 132, 252, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.news-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.news-card {
  background: var(--bg-card);
  border-left: 3px solid var(--primary);
  padding: 1rem;
  border-radius: 8px;
}

.news-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.news-title {
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

/* Buttons */
.btn {
  background: linear-gradient(90deg, #6366f1, #c084fc);
  color: white;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  display: inline-block;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(192, 132, 252, 0.4);
}

/* Forms & Auth */
.auth-container {
  max-width: 400px;
  margin: 4rem auto;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 2.5rem;
  border-radius: 16px;
  backdrop-filter: blur(12px);
}

.form-group {
  margin-bottom: 1.2rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.form-group input {
  width: 100%;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  color: white;
  padding: 0.8rem 1rem;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.3s;
}

.form-group input:focus {
  border-color: var(--primary);
}

/* Profile Page */
.profile-header {
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.8));
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2.5rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-bottom: 2rem;
}

.profile-avatar-large {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 3px solid var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: bold;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 20px rgba(192, 132, 252, 0.3);
  object-fit: cover;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  flex: 1;
}

.stat-box {
  background: rgba(0, 0, 0, 0.2);
  padding: 1rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  text-align: center;
}

.stat-box-title {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
  text-transform: uppercase;
}

.stat-box-val {
  font-size: 1.5rem;
  font-weight: 800;
  color: white;
}

.val-gold {
  color: var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
}

@media (max-width: 900px) {
  .app-layout { flex-direction: column; }
  .sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--border-color); padding: 1rem; }
  .content-grid { grid-template-columns: 1fr; }
  .profile-stats { grid-template-columns: 1fr 1fr; }
}
