:root {
  --bg: #050505; 
  --card-bg: rgba(12, 12, 12, 0.85); 
  --border: rgba(255, 255, 255, 0.07);
  --accent: #ffffff; 
  --text-main: #ededed; 
  --text-dim: #777777;
  --success: #10b981; 
  --danger: #ef4444;
}

* { box-sizing: border-box; }

body { 
  background-color: var(--bg); 
  color: var(--text-main); 
  font-family: 'Inter', sans-serif; 
  margin: 0; 
  min-height: 100vh; 
  overflow-x: hidden; 
}

.bg-layer { position: fixed; inset: 0; background: url('bg-dashboard.jpg') center/cover; z-index: -2; }
.bg-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.7); z-index: -1; }

.auth-overlay { position: fixed; inset: 0; z-index: 5000; background: #000; display: flex; align-items: center; justify-content: center; }
.split-container { display: flex; width: 100%; height: 100vh; }
.split-left { 
  flex: 1.2; background: url('bg-auth.jpg') center/cover; 
  position: relative; overflow: hidden;
}
.split-left::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to right, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.5) 50%, #080808 100%);
  z-index: 1;
}
.auth-brand {
  position: absolute; bottom: 60px; left: 60px; z-index: 2;
}
.auth-brand h1 {
  font-size: 2.4rem; font-weight: 800; color: white; margin: 0; letter-spacing: -1px;
  text-shadow: 0 2px 30px rgba(0,0,0,0.5);
}
.auth-brand p {
  font-size: 0.9rem; color: rgba(255,255,255,0.7); margin: 4px 0 0 0; font-weight: 400;
  letter-spacing: 3px; text-transform: uppercase;
  text-shadow: 0 1px 20px rgba(0,0,0,0.5);
}
.split-right { flex: 1; background: #080808; display: flex; align-items: center; justify-content: center; overflow: hidden; }

.auth-slider { width: 400px; overflow: hidden; position: relative; }
.auth-slider-track { display: flex; width: 200%; transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1); }
.auth-slider-track.slide-register { transform: translateX(-50%); }
.auth-slide { width: 50%; flex-shrink: 0; display: flex; flex-direction: column; gap: 0; padding: 0 16px; }
.auth-slide h1 { font-size: 2rem; font-weight: 800; margin: 0; letter-spacing: -0.5px; }
.auth-slide-header { margin-bottom: 32px; }
.auth-welcome { 
  display: inline-block; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 2px;
  color: rgba(255,255,255,0.35); margin-bottom: 12px;
}
.auth-subtitle { color: var(--text-dim); font-size: 0.88rem; margin: 8px 0 0 0; line-height: 1.5; }
.auth-fields { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }
.auth-row { display: flex; justify-content: space-between; align-items: center; padding: 2px 0; }
.auth-link-text { color: rgba(255,255,255,0.5); text-align: center; margin: 0; font-size: 0.85rem; }
.auth-divider { 
  display: flex; align-items: center; gap: 16px; margin: 16px 0;
}
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: rgba(255,255,255,0.06); }
.auth-divider span { font-size: 0.75rem; color: rgba(255,255,255,0.2); text-transform: uppercase; letter-spacing: 1px; }

.inputForm { 
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08); 
  border-radius: 12px; height: 52px; display: flex; align-items: center; padding: 0 16px; gap: 12px;
  transition: all 0.25s ease; 
}
.inputForm:focus-within { border-color: rgba(255,255,255,0.2); background: rgba(255,255,255,0.05); }
.input-icon { width: 18px; height: 18px; color: rgba(255,255,255,0.25); flex-shrink: 0; transition: color 0.25s; }
.inputForm:focus-within .input-icon { color: rgba(255,255,255,0.5); }
.input { background: transparent; border: none; width: 100%; color: white; outline: none; font-size: 14px; font-family: 'Inter', sans-serif; }
.input::placeholder { color: rgba(255,255,255,0.25); }
.button-submit { 
  background: white; border: none; color: black; font-weight: 700; height: 52px; border-radius: 12px; 
  cursor: pointer; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); font-size: 14px; font-family: 'Inter', sans-serif;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  box-shadow: 0 2px 12px rgba(255,255,255,0.06);
}
.button-submit:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(255,255,255,0.12); }
.button-submit:active { transform: translateY(0); }
.btn-arrow { width: 18px; height: 18px; transition: transform 0.3s; }
.button-submit:hover .btn-arrow { transform: translateX(4px); }
.span { color: rgba(255,255,255,0.5); cursor: pointer; font-size: 0.85rem; transition: color 0.2s; }
.span:hover { color: white; }

.container { max-width: 1100px; margin: 0 auto; padding: 40px 20px; }

.header-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }
.header-left h2 { margin: 0; font-size: 1.4rem; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.header-right { display: flex; gap: 10px; }

.bento-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card { 
  background: var(--card-bg); 
  border: 1px solid var(--border); 
  border-radius: 20px; 
  padding: 22px; 
  backdrop-filter: blur(12px); 
  position: relative; 
  overflow: hidden;
  transition: all 0.3s ease;
}
.card:hover { border-color: rgba(255,255,255,0.12); }
.card-center { text-align: center; }
.timer-card { grid-column: span 2; display: flex; align-items: center; justify-content: space-around; }
.chart-card { grid-column: span 3; }

.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 8px;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  vertical-align: middle;
  transition: all 0.3s;
}

#leaderboard-modal .auth-card, 
.global-settings-card {
  position: relative;
  max-width: 850px !important;
  width: 90%;
  max-height: 85vh;
  background: #0a0a0a !important;
  border: 1px solid var(--border) !important;
  border-radius: 28px !important;
  padding: 0 !important;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.8);
  z-index: 9000;
}

.settings-header, 
.leaderboard-header {
  display: flex;
  justify-content: space-between; 
  align-items: center;            
  padding: 28px 36px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.settings-body,
#global-list {
  padding: 20px 36px;
  flex-grow: 1;
  overflow-y: auto; 
  scrollbar-width: thin; 
  scrollbar-color: var(--border) transparent;
}

#global-list::-webkit-scrollbar { width: 5px; }
#global-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }

#settings-panel { 
  position: absolute; 
  inset: 0; 
  background: #0a0a0a; 
  z-index: 500; 
  padding: 25px; 
  border-radius: 20px; 
  text-align: left;
  overflow-y: auto; 
}

.label-group {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 15px; font-weight: 700; text-transform: uppercase;
  font-size: 0.8rem; color: var(--accent);
}

.support-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.support-item {
  background: rgba(255,255,255,0.03); border: 1px solid var(--border);
  padding: 15px; border-radius: 14px; display: flex; align-items: center;
  gap: 15px; cursor: pointer; color: inherit; text-decoration: none; transition: 0.2s;
}
.support-item:hover { background: rgba(255,255,255,0.06); transform: translateY(-2px); }

.btn-danger-outline {
  width: 100%; background: transparent; border: 1px solid var(--danger);
  color: var(--danger); padding: 12px; border-radius: 10px;
  cursor: pointer; font-weight: 600; transition: 0.2s;
}
.btn-danger-outline:hover { background: var(--danger); color: white; }

.settings-footer {
  padding: 20px 25px; background: rgba(0,0,0,0.3);
  border-top: 1px solid var(--border); display: flex;
  justify-content: space-between; align-items: center;
}

.timer-container {
  position: relative; width: 220px; height: 220px;
  display: flex; align-items: center; justify-content: center; z-index: 100;
}

#timer-display {
  position: relative; z-index: 101;
  font-size: 3.5rem; font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.progress-ring { 
  position: absolute; top: 0; left: 0;
  width: 220px; height: 220px; transform: rotate(-90deg); 
}

.ring-bar { 
  fill: none; stroke: var(--accent); stroke-width: 6; 
  stroke-linecap: round; stroke-dasharray: 628; 
  transition: stroke-dashoffset 0.1s linear; 
}

.timer-controls { width: 190px; display: flex; flex-direction: column; gap: 8px; z-index: 10; }

.btn-black { 
  background: white; color: black; border: none; padding: 13px; 
  border-radius: 12px; font-weight: 700; cursor: pointer; 
  transition: all 0.2s; font-family: 'Inter', sans-serif; font-size: 0.85rem;
}
.btn-black:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(255,255,255,0.1); }
.btn-success { background: var(--success) !important; color: white !important; }
.btn-secondary { background: rgba(255,255,255,0.08) !important; color: white !important; }
.btn-outline { background: none !important; border: 1px solid var(--border) !important; color: white !important; }
.btn-skip-break { background: var(--success) !important; color: white !important; font-weight: 800 !important; }
.btn-quit { background: none; border: 1px solid var(--border); color: white; padding: 8px 16px; border-radius: 10px; cursor: pointer; font-family: 'Inter', sans-serif; font-size: 0.8rem; transition: all 0.2s; }
.btn-quit:hover { background: rgba(255,255,255,0.05); }

.progress-bg { background: rgba(255,255,255,0.05); height: 6px; border-radius: 10px; margin-top: 15px; overflow: hidden; }
.progress-fill { background: white; height: 100%; border-radius: 10px; width: 0%; transition: width 0.5s ease; }
.progress-fill.green { background: var(--success); }

.core-container { 
  width: 130px; height: 130px; margin: 10px auto; 
  display: flex; align-items: center; justify-content: center;
  position: relative;
}

.elysium-core {
  --core-primary: #10b981;
  --core-secondary: #34d399;
  --core-glow: rgba(16,185,129,0.5);
  --core-pulse: rgba(52,211,153,0.3);
  --breathe-speed: 4s;
  --core-scale: 1;
  
  width: 55px; height: 55px;
  background: radial-gradient(circle at 35% 35%, var(--core-secondary), var(--core-primary));
  box-shadow: 
    0 0 30px var(--core-glow),
    0 0 60px var(--core-pulse),
    0 0 90px var(--core-pulse),
    inset 0 0 20px rgba(255,255,255,0.1);
  animation: 
    coreBreathe var(--breathe-speed) infinite ease-in-out,
    coreMorph 6s infinite ease-in-out,
    coreFloat 8s infinite ease-in-out;
  transform: scale(var(--core-scale));
  position: relative;
}

.elysium-core::before {
  content: '';
  position: absolute;
  inset: -15px;
  border-radius: inherit;
  background: radial-gradient(circle, var(--core-pulse) 0%, transparent 70%);
  animation: coreAura var(--breathe-speed) infinite ease-in-out;
  z-index: -1;
}

.elysium-core::after {
  content: '';
  position: absolute;
  top: 15%; left: 20%;
  width: 35%; height: 25%;
  background: radial-gradient(ellipse, rgba(255,255,255,0.5), transparent);
  border-radius: 50%;
  transform: rotate(-30deg);
}

@keyframes coreBreathe {
  0%, 100% { 
    transform: scale(var(--core-scale, 1)); 
    box-shadow: 0 0 30px var(--core-glow), 0 0 60px var(--core-pulse), inset 0 0 20px rgba(255,255,255,0.1);
  }
  50% { 
    transform: scale(calc(var(--core-scale, 1) * 1.15));
    box-shadow: 0 0 45px var(--core-glow), 0 0 90px var(--core-pulse), 0 0 120px var(--core-pulse), inset 0 0 25px rgba(255,255,255,0.15);
  }
}

@keyframes coreMorph {
  0%   { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
  25%  { border-radius: 58% 42% 55% 45% / 56% 60% 40% 44%; }
  50%  { border-radius: 50% 50% 35% 65% / 60% 40% 60% 40%; }
  75%  { border-radius: 40% 60% 65% 35% / 45% 55% 45% 55%; }
  100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
}

@keyframes coreFloat {
  0%, 100% { translate: 0 0; }
  33% { translate: 3px -4px; }
  66% { translate: -3px 3px; }
}

@keyframes coreAura {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.3); }
}

.leaderboard-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 18px; margin-bottom: 8px; background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05); border-radius: 14px; transition: 0.2s;
}
.leaderboard-item:hover { background: rgba(255, 255, 255, 0.06); transform: scale(1.01); }
.rank-gold { border-left: 3px solid #ffd700; }
.rank-silver { border-left: 3px solid #c0c0c0; }
.rank-bronze { border-left: 3px solid #cd7f32; }
.item-left { display: flex; align-items: center; gap: 12px; }
.item-right { text-align: right; }
.rank-badge-lb { font-size: 1.1rem; min-width: 32px; }
.user-name { font-weight: 600; font-size: 0.9rem; }
.level-tag { font-weight: 700; font-size: 0.8rem; }
.xp-count { color: var(--text-dim); font-size: 0.7rem; margin-top: 2px; }
.mini-xp-bar-bg { width: 80px; height: 3px; background: rgba(255,255,255,0.08); border-radius: 4px; margin-top: 4px; }
.mini-xp-bar-fill { height: 100%; background: white; border-radius: 4px; transition: width 0.3s; }

.label { color: var(--text-dim); font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }
.val { font-size: 1.6rem; font-weight: 700; margin-top: 5px; }
.badge-btn { background: rgba(255,255,255,0.05); border: 1px solid var(--border); color: white; padding: 8px; border-radius: 10px; width: 100%; margin-top: 12px; cursor: pointer; font-size: 0.72rem; font-family: 'Inter', sans-serif; transition: all 0.2s; }
.badge-btn:hover { background: rgba(255,255,255,0.1); }
.hidden { display: none !important; }
.clickable { cursor: pointer; transition: 0.2s; }
.clickable:hover { border-color: rgba(255,255,255,0.15); transform: translateY(-2px); }
.status-label { font-size: 0.65rem; font-weight: 800; color: var(--text-dim); text-align: center; letter-spacing: 2px; text-transform: uppercase; }
.timer-input { background: #111; border: 1px solid var(--border); color: white; padding: 10px 12px; border-radius: 10px; width: 100%; margin: 5px 0 15px 0; box-sizing: border-box; font-family: 'Inter', sans-serif; }

.toast-notification {
  position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%) translateY(20px);
  padding: 14px 28px; border-radius: 14px; font-size: 0.85rem; font-weight: 600;
  z-index: 99999; opacity: 0; transition: all 0.3s ease;
  font-family: 'Inter', sans-serif;
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}
.toast-show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast-success { background: rgba(16,185,129,0.9); color: white; }
.toast-danger { background: rgba(239,68,68,0.9); color: white; }
.toast-info { background: rgba(255,255,255,0.15); color: white; border: 1px solid var(--border); }

.pw-toggle {
  background: none; border: none; cursor: pointer; padding: 4px; display: flex; align-items: center;
  color: rgba(255,255,255,0.25); transition: color 0.2s; flex-shrink: 0;
}
.pw-toggle:hover { color: rgba(255,255,255,0.6); }
.pw-toggle svg { width: 18px; height: 18px; }

@media (max-width: 768px) {
  .split-left { display: none; }
  .split-right { flex: 1; }
  .split-container { height: 100vh; height: 100dvh; }
  .auth-overlay { background: #080808; }
  .auth-slider { width: 90%; max-width: 400px; }
  .auth-slide-header { margin-bottom: 24px; }
  .auth-slide h1 { font-size: 1.7rem; }
  .auth-welcome { font-size: 0.7rem; margin-bottom: 8px; }
  .auth-subtitle { font-size: 0.82rem; }
  .bento-grid { grid-template-columns: 1fr; }
  .timer-card { flex-direction: column; padding: 40px 20px; gap: 20px; }
  .card { grid-column: span 1 !important; }
  #settings-panel { padding: 15px; }
  .support-grid { grid-template-columns: 1fr; }
  .header-bar { flex-direction: column; gap: 15px; align-items: flex-start; }
  .header-right { width: 100%; justify-content: flex-end; }
}
