:root {
  --bg-main: #0B0E14;
  --bg-sidebar: #12151D;
  --bg-card: rgba(22, 26, 36, 0.6);
  --bg-card-hover: rgba(30, 35, 48, 0.8);
  --border-color: rgba(255, 255, 255, 0.08);
  
  --text-primary: #ffffff;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  
  --accent-blue: #5865F2;
  --accent-blue-hover: #4752C4;
  --accent-green: #23A559;
  --accent-green-hover: #1E8F4C;
  --accent-red: #DA373C;
  --accent-gold: #F1C40F;
  --accent-purple: #9b59b6;
  
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 20px rgba(88, 101, 242, 0.2);
  
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

#app {
  display: flex;
  height: 100vh;
  width: 100vw;
}

/* Sidebar */
.sidebar {
  width: 280px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  z-index: 10;
}

.sidebar-header {
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border-color);
}

.brand-icon {
  font-size: 24px;
  background: linear-gradient(135deg, #F1C40F, #F39C12);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 4px rgba(241, 196, 15, 0.3));
}

.brand-text {
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.5px;
  color: var(--text-primary);
}

.sidebar-menu {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  overflow-y: auto;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 10px;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  transition: var(--transition);
  cursor: pointer;
}

.menu-item:hover {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  transform: translateX(4px);
}

.menu-item.active {
  background-color: rgba(88, 101, 242, 0.15);
  color: var(--accent-blue);
  box-shadow: inset 3px 0 0 var(--accent-blue);
}

.menu-icon {
  font-size: 18px;
  width: 24px;
  text-align: center;
}

/* Main Content */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-y: auto;
  background: radial-gradient(circle at top right, rgba(88, 101, 242, 0.05), transparent 400px);
}

.top-bar {
  height: 70px;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  background: rgba(11, 14, 20, 0.8);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 5;
}

.page-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 700;
}

.page-title i {
  color: var(--accent-gold);
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 20px;
  transition: var(--transition);
}

.user-profile:hover {
  background: rgba(255, 255, 255, 0.05);
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  position: relative;
}

.status-indicator {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  background-color: var(--accent-green);
  border: 2px solid var(--bg-main);
  border-radius: 50%;
}

/* Content Area */
.content-wrapper {
  padding: 40px;
  max-width: 1000px;
  margin: 0 auto;
  width: 100%;
}

.contest-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 32px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
  animation: slideUp 0.5s ease-out forwards;
}

.contest-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(to bottom, var(--accent-gold), var(--accent-blue));
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.card-header {
  margin-bottom: 24px;
}

.card-title {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 8px;
  background: linear-gradient(to right, #fff, #94A3B8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.card-subtitle {
  color: var(--text-secondary);
  font-size: 15px;
}

/* Features List */
.features-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.03);
  transition: var(--transition);
}

.feature-item:hover {
  background: rgba(255, 255, 255, 0.04);
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.08);
}

.feature-icon-wrapper {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.feature-icon-wrapper.green { background: rgba(35, 165, 89, 0.15); color: var(--accent-green); }
.feature-icon-wrapper.gold { background: rgba(241, 196, 15, 0.15); color: var(--accent-gold); }
.feature-icon-wrapper.blue { background: rgba(88, 101, 242, 0.15); color: var(--accent-blue); }
.feature-icon-wrapper.purple { background: rgba(155, 89, 182, 0.15); color: var(--accent-purple); }

.feature-content h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.feature-content p {
  color: var(--text-secondary);
  font-size: 14px;
}

/* Action Buttons */
.action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
}

.btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  color: white;
  transition: var(--transition);
  font-family: 'Inter', sans-serif;
}

.btn i {
  font-size: 16px;
}

.btn:active {
  transform: scale(0.96);
}

.btn-primary {
  background-color: var(--accent-green);
  box-shadow: 0 4px 15px rgba(35, 165, 89, 0.3);
}
.btn-primary:hover { background-color: var(--accent-green-hover); box-shadow: 0 6px 20px rgba(35, 165, 89, 0.4); transform: translateY(-2px); }

.btn-secondary {
  background-color: var(--accent-blue);
  box-shadow: 0 4px 15px rgba(88, 101, 242, 0.3);
}
.btn-secondary:hover { background-color: var(--accent-blue-hover); box-shadow: 0 6px 20px rgba(88, 101, 242, 0.4); transform: translateY(-2px); }

.btn-dark {
  background-color: #2B2D31;
  color: #DBDEE1;
  border: 1px solid rgba(255,255,255,0.05);
}
.btn-dark:hover { background-color: #313338; color: white; transform: translateY(-2px); }

.btn-danger {
  background-color: #DA373C;
}
.btn-danger:hover { background-color: #C92B30; transform: translateY(-2px); }

/* Status Message */
.status-message {
  margin-top: 24px;
  padding: 16px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(218, 55, 60, 0.1);
  border: 1px solid rgba(218, 55, 60, 0.2);
  color: #FA777C;
  font-weight: 500;
  animation: fadeIn 0.5s ease-out 0.3s both;
}

.status-message i {
  font-size: 20px;
}

.status-message .muted {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 400;
  margin-left: auto;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Responsive */
@media (max-width: 768px) {
  #app { flex-direction: column; }
  .sidebar { width: 100%; height: auto; flex-direction: column; align-items: stretch; padding: 0; z-index: 100; border-right: none; border-bottom: 1px solid var(--border-color); }
  .sidebar-header { padding: 12px; border-bottom: 1px solid var(--border-color); display: flex; justify-content: center; }
  .sidebar-menu { flex-direction: row; overflow-x: auto; padding: 10px; gap: 15px; }
  .menu-item { padding: 8px 12px; flex-direction: column; gap: 4px; flex-shrink: 0; }
  .menu-item span { display: block; font-size: 11px; text-align: center; }
  .menu-icon { font-size: 20px; }
  .top-bar { height: 50px; padding: 0 15px; position: static; }
  .page-title span { display: none; } /* hide long text in top bar on mobile */
  .page-title { font-size: 16px; }
  .content-wrapper { padding: 15px; }
  .action-buttons { flex-direction: column; }
  .btn { width: 100%; justify-content: center; }
}

/* Login Overlay */
.login-overlay {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  background: rgba(11, 14, 20, 0.95);
  backdrop-filter: blur(20px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease;
}

.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 40px;
  border-radius: 20px;
  text-align: center;
  max-width: 400px;
  width: 90%;
  box-shadow: var(--shadow-glow);
}

.login-card h2 {
  font-size: 24px;
  margin-bottom: 12px;
}

.login-card p {
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.btn-discord {
  background-color: #5865F2;
  color: white;
  width: 100%;
  padding: 14px;
  border-radius: 8px;
  border: none;
  font-weight: bold;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  transition: var(--transition);
}

.btn-discord:hover {
  background-color: #4752C4;
  transform: translateY(-2px);
}

.chart-container {
  margin-top: 32px;
  padding: 24px;
  background: rgba(255,255,255,0.02);
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.05);
  height: 300px;
}
