/* ====================================================
   AquaClash Premium Mobile-First Stylesheet (Upgraded)
   ==================================================== */

/* Design Tokens & Theme Variables */
:root {
  --font-primary: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-accent: 'Space Grotesk', -apple-system, sans-serif;

  /* Oceanic Theme Colours */
  --bg-color: #060913;
  --bg-color-alt: #0a0e1f;
  --card-bg: rgba(13, 20, 44, 0.6);
  --card-border: rgba(255, 255, 255, 0.08);
  --card-glow-blue: rgba(0, 210, 255, 0.15);
  
  --text-main: #f0f4f9;
  --text-muted: #7f91ab;
  --text-inverse: #03060f;

  /* Neon accents */
  --primary: #00d2ff;
  --primary-rgb: 0, 210, 255;
  --secondary: #0072ff;
  --accent-teal: #0df2c9;
  --accent-purple: #b026ff;
  --accent-orange: #ff9d00;
  --accent-red: #ff3c69;
  --accent-green: #3cf39c;

  --wave-color-4: #0072ff;
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  
  --header-height: 60px;
  --nav-height: 65px;
}

/* ====== COLOR THEMES ====== */
/* Theme 2: Midnight Purple */
[data-theme="midnight-purple"] {
  --bg-color: #0d0618;
  --bg-color-alt: #150d28;
  --card-bg: rgba(25, 14, 52, 0.6);
  --card-border: rgba(176, 38, 255, 0.12);
  --card-glow-blue: rgba(176, 38, 255, 0.15);
  --text-main: #ede6f7;
  --text-muted: #9b85b8;
  --primary: #b026ff;
  --primary-rgb: 176, 38, 255;
  --secondary: #7b2ff2;
  --accent-teal: #c77dff;
  --accent-purple: #e040fb;
  --accent-green: #bb86fc;
  --wave-color-4: #7b2ff2;
}

/* Theme 3: Sunset Ember */
[data-theme="sunset-ember"] {
  --bg-color: #1a0a05;
  --bg-color-alt: #241008;
  --card-bg: rgba(44, 18, 8, 0.6);
  --card-border: rgba(255, 157, 0, 0.12);
  --card-glow-blue: rgba(255, 120, 0, 0.15);
  --text-main: #fff1e6;
  --text-muted: #b08968;
  --primary: #ff6d00;
  --primary-rgb: 255, 109, 0;
  --secondary: #ff9100;
  --accent-teal: #ffab40;
  --accent-purple: #ff3d00;
  --accent-green: #ffc107;
  --wave-color-4: #e65100;
}

/* Theme 4: Forest Jade */
[data-theme="forest-jade"] {
  --bg-color: #04120a;
  --bg-color-alt: #081c12;
  --card-bg: rgba(8, 32, 20, 0.6);
  --card-border: rgba(60, 243, 156, 0.12);
  --card-glow-blue: rgba(60, 243, 156, 0.15);
  --text-main: #e8f5e9;
  --text-muted: #6d9b7e;
  --primary: #00e676;
  --primary-rgb: 0, 230, 118;
  --secondary: #00c853;
  --accent-teal: #69f0ae;
  --accent-purple: #00bfa5;
  --accent-green: #76ff03;
  --wave-color-4: #00897b;
}

/* Theme 5: Arctic Frost */
[data-theme="arctic-frost"] {
  --bg-color: #080e18;
  --bg-color-alt: #0e1628;
  --card-bg: rgba(14, 26, 50, 0.6);
  --card-border: rgba(144, 202, 249, 0.12);
  --card-glow-blue: rgba(100, 181, 246, 0.15);
  --text-main: #e3f2fd;
  --text-muted: #78909c;
  --primary: #64b5f6;
  --primary-rgb: 100, 181, 246;
  --secondary: #42a5f5;
  --accent-teal: #80deea;
  --accent-purple: #90caf9;
  --accent-green: #b2ebf2;
  --wave-color-4: #1565c0;
}

/* Theme 6: Neon Cyber */
[data-theme="neon-cyber"] {
  --bg-color: #0a0a12;
  --bg-color-alt: #12121f;
  --card-bg: rgba(18, 18, 40, 0.6);
  --card-border: rgba(0, 255, 136, 0.12);
  --card-glow-blue: rgba(0, 255, 136, 0.15);
  --text-main: #e0ffe8;
  --text-muted: #5c8a6a;
  --primary: #00ff88;
  --primary-rgb: 0, 255, 136;
  --secondary: #00e5ff;
  --accent-teal: #18ffff;
  --accent-purple: #d500f9;
  --accent-green: #76ff03;
  --wave-color-4: #00b248;
}

/* Theme 7: Rose Gold */
[data-theme="rose-gold"] {
  --bg-color: #140a0e;
  --bg-color-alt: #1f1018;
  --card-bg: rgba(38, 16, 26, 0.6);
  --card-border: rgba(255, 128, 171, 0.12);
  --card-glow-blue: rgba(255, 128, 171, 0.15);
  --text-main: #fce4ec;
  --text-muted: #ad7a8d;
  --primary: #ff80ab;
  --primary-rgb: 255, 128, 171;
  --secondary: #f48fb1;
  --accent-teal: #f8bbd0;
  --accent-purple: #ff4081;
  --accent-green: #ffab91;
  --wave-color-4: #c2185b;
}

/* Theme 8: Deep Ocean */
[data-theme="deep-ocean"] {
  --bg-color: #020812;
  --bg-color-alt: #041020;
  --card-bg: rgba(4, 18, 40, 0.65);
  --card-border: rgba(0, 150, 200, 0.12);
  --card-glow-blue: rgba(0, 150, 200, 0.15);
  --text-main: #cce5ff;
  --text-muted: #4a7a9b;
  --primary: #0288d1;
  --primary-rgb: 2, 136, 209;
  --secondary: #0277bd;
  --accent-teal: #26c6da;
  --accent-purple: #0097a7;
  --accent-green: #00acc1;
  --wave-color-4: #01579b;
}

/* Theme 9: Volcano */
[data-theme="volcano"] {
  --bg-color: #120404;
  --bg-color-alt: #1c0808;
  --card-bg: rgba(36, 10, 10, 0.6);
  --card-border: rgba(255, 60, 105, 0.12);
  --card-glow-blue: rgba(255, 60, 105, 0.15);
  --text-main: #ffe8ec;
  --text-muted: #a06070;
  --primary: #ff1744;
  --primary-rgb: 255, 23, 68;
  --secondary: #d50000;
  --accent-teal: #ff5252;
  --accent-purple: #ff6e40;
  --accent-green: #ff9100;
  --wave-color-4: #b71c1c;
}

/* Theme 10: Monochrome */
[data-theme="monochrome"] {
  --bg-color: #0a0a0a;
  --bg-color-alt: #141414;
  --card-bg: rgba(22, 22, 22, 0.7);
  --card-border: rgba(255, 255, 255, 0.1);
  --card-glow-blue: rgba(255, 255, 255, 0.08);
  --text-main: #e8e8e8;
  --text-muted: #777777;
  --primary: #ffffff;
  --primary-rgb: 255, 255, 255;
  --secondary: #cccccc;
  --accent-teal: #bbbbbb;
  --accent-purple: #999999;
  --accent-green: #dddddd;
  --wave-color-4: #555555;
}

/* Reset and Base Styles */
html, body {
  height: 100%;
  overflow: hidden;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-primary);
  background-color: #03050c;
  background-image: 
    radial-gradient(at 10% 20%, rgba(0, 114, 255, 0.1) 0px, transparent 50%),
    radial-gradient(at 90% 80%, rgba(176, 38, 255, 0.08) 0px, transparent 50%);
  color: var(--text-main);
  display: flex;
  justify-content: center;
  align-items: center;
  line-height: 1.4;
}

/* Confetti Canvas */
#confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
}

/* Simulated Phone frame mockup */
.app-frame {
  width: 100%;
  height: 100vh;
  height: 100dvh;
  background-color: var(--bg-color);
  border: none;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

/* Header */
.main-header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background: rgba(6, 9, 19, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--card-border);
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 16px;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.logo-icon {
  width: 26px;
  height: 26px;
  filter: drop-shadow(0 0 6px rgba(0, 210, 255, 0.4));
}

.logo-icon.large {
  width: 60px;
  height: 60px;
  margin-bottom: 15px;
  filter: drop-shadow(0 0 15px rgba(0, 210, 255, 0.5));
}

.logo-area h1 {
  font-family: var(--font-accent);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.logo-area h1 span {
  color: var(--primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Unit Switcher */
.unit-toggle-wrapper {
  display: flex;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 2px;
}

.unit-toggle-btn {
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-primary);
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--text-muted);
  padding: 4px 8px;
  border-radius: 15px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.unit-toggle-btn.active {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--text-inverse);
  box-shadow: 0 2px 6px rgba(0, 210, 255, 0.3);
}

.icon-button {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-button svg {
  width: 14px;
  height: 14px;
}

.icon-button svg.hidden {
  display: none;
}

/* Main Content Panel */
.main-content {
  flex-grow: 1;
  overflow-y: auto;
  padding: 20px 16px;
  margin-top: var(--header-height);
  margin-bottom: var(--nav-height);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.main-content::-webkit-scrollbar {
  width: 0;
  background: transparent;
}

/* Tab Panels */
.tab-panel {
  display: none;
  animation: fadeIn 0.3s ease-out;
}

.tab-panel.active {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

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

/* Premium Card (Glassmorphism) */
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 16px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.card h2, .card h3 {
  font-family: var(--font-accent);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.subtitle {
  color: var(--text-muted);
  font-size: 0.8rem;
  display: block;
  margin-bottom: 12px;
}

/* ====================================================
   AUTHENTICATION OVERLAY SCREEN
   ==================================================== */
.overlay-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(4, 6, 15, 0.85);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  z-index: 2000;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.overlay-screen.hidden {
  display: none !important;
}

.auth-card {
  width: 100%;
  max-width: 350px;
  padding: 30px 24px;
  background: rgba(13, 20, 44, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.auth-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 24px;
}

.auth-header h1 {
  font-family: var(--font-accent);
  font-size: 1.8rem;
  font-weight: 700;
  margin-top: 5px;
}

.auth-header h1 span {
  color: var(--primary);
}

.auth-tabs {
  display: flex;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 12px;
  padding: 3px;
  margin-bottom: 20px;
}

.auth-tab {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-primary);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 0;
  cursor: pointer;
  border-radius: 9px;
  transition: all var(--transition-fast);
}

.auth-tab.active {
  background: rgba(255,255,255,0.08);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: fadeIn 0.2s ease-out;
}

.auth-form.hidden {
  display: none !important;
}

.auth-submit-btn {
  width: 100%;
  padding: 12px;
  margin-top: 8px;
  font-size: 0.9rem;
}

.auth-error-msg {
  color: var(--accent-red);
  font-size: 0.75rem;
  font-weight: 600;
  text-align: center;
  margin-top: 10px;
  min-height: 18px;
}

.google-auth-wrapper {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.google-btn {
  width: 100%;
  padding: 10px 16px;
  background-color: #ffffff;
  color: #1f1f1f;
  border: 1px solid #dadce0;
  border-radius: 10px;
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.08);
  transition: all var(--transition-fast);
}

.google-btn:hover {
  background-color: #f8f9fa;
  border-color: #d2d4d7;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.12);
}

.google-icon-svg {
  width: 16px;
  height: 16px;
}

.auth-footer {
  margin-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ====================================================
   GUIDED TUTORIAL ONBOARDING OVERLAY
   ==================================================== */
#tutorial-overlay {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.tutorial-card {
  position: absolute;
  bottom: 90px;
  left: 20px;
  right: 20px;
  z-index: 1600;
  padding: 20px;
  background: rgba(10, 15, 35, 0.95);
  border: 1px solid rgba(0, 210, 255, 0.3);
  box-shadow: 0 15px 40px rgba(0, 210, 255, 0.15);
  transition: all 0.3s ease;
}

.tutorial-card h4 {
  font-family: var(--font-accent);
  color: var(--primary);
  font-size: 1.05rem;
  margin-bottom: 6px;
}

.tutorial-card p {
  font-size: 0.8rem;
  color: var(--text-main);
  margin-bottom: 14px;
  line-height: 1.45;
}

.tutorial-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.tutorial-actions button {
  font-size: 0.75rem;
  padding: 6px 12px;
  border-radius: 8px;
}

.tutorial-focus-box {
  position: absolute;
  pointer-events: none;
  z-index: 1500;
  border: 3px solid var(--primary);
  box-shadow: 0 0 0 9999px rgba(2, 4, 10, 0.94), 0 0 20px var(--primary), 0 0 40px rgba(0, 210, 255, 0.25);
  border-radius: 16px;
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  opacity: 0;
}

.tutorial-focus-box.active {
  opacity: 1;
  animation: pulse-border 1.8s infinite ease-in-out;
}

/* Tutorial Finish Celebration Modal */
.tutorial-finish-modal {
  opacity: 0;
  transition: opacity 0.35s ease;
  z-index: 2600;
}

.tutorial-finish-modal .modal-card {
  animation: modalSlideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.1) forwards;
}

.tutorial-finish-modal.removing {
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* ====================================================
   MODALS AND DIALOGS
   ==================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(4, 6, 15, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2500;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.modal-overlay.hidden {
  display: none !important;
}

.modal-card {
  width: 100%;
  max-width: 340px;
  padding: 24px;
  background: rgba(10, 15, 33, 0.95);
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 15px 35px rgba(0,0,0,0.5);
  animation: modalSlideUp 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.1) forwards;
}

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

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

/* ====================================================
   CUSTOM PRESET CONTAINERS IN GRID
   ==================================================== */
.preset-btn {
  position: relative;
}

.delete-preset-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 18px;
  height: 18px;
  background: var(--accent-red);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: 50%;
  border: 1.5px solid var(--bg-color-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  transition: all var(--transition-fast);
}

.delete-preset-badge:hover {
  transform: scale(1.15);
  background: #ff1c4d;
}

.dash-plus-icon {
  font-size: 1.6rem;
  font-weight: 400;
  color: var(--primary);
}

.add-custom-preset-trigger {
  border: 1px dashed rgba(0, 210, 255, 0.3) !important;
  background: rgba(0, 210, 255, 0.01) !important;
}

.add-custom-preset-trigger:hover {
  border-color: var(--primary) !important;
  background: rgba(0, 210, 255, 0.04) !important;
}

/* ====================================================
   DASHBOARD / GROUP HEADERS
   ==================================================== */
.dashboard-group-header, .leaderboard-heading-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2px 4px;
}

.group-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.select-wrapper {
  position: relative;
  display: inline-block;
}

.select-wrapper::after {
  content: '▼';
  font-size: 0.6rem;
  color: var(--primary);
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.group-select-dropdown {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  color: var(--primary);
  font-family: var(--font-primary);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 28px 6px 12px;
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  max-width: 170px;
  text-overflow: ellipsis;
}

.group-select-dropdown option {
  background: var(--bg-color-alt);
  color: #fff;
}

/* Wave Tank capsule */
.fluid-tank-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 16px;
}

.tank-outer {
  width: 170px;
  height: 260px;
  margin: 10px 0;
  border-radius: 85px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.015);
  border: 3px solid rgba(255, 255, 255, 0.05);
  box-shadow: 
    0 8px 30px rgba(0, 0, 0, 0.4), 
    inset 0 0 20px rgba(255, 255, 255, 0.02);
  position: relative;
  overflow: hidden;
}

.tank-inner {
  width: 100%;
  height: 100%;
  border-radius: 79px;
  position: relative;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.15);
  box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.5);
}

.water-level {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: var(--wave-color-4);
  box-shadow: 0 0 15px rgba(0, 114, 255, 0.5);
  transition: height 0.8s cubic-bezier(0.1, 0.8, 0.3, 1);
}

.waves {
  position: absolute;
  top: -24px;
  left: 0;
  width: 100%;
  height: 26px;
  will-change: transform;
  transform: translate3d(0, 0, 0);
}

.parallax > use {
  will-change: transform;
  transform: translate3d(0, 0, 0);
}

.bubble-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
}

.bubble {
  position: absolute;
  bottom: 6px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  will-change: transform, opacity;
  transform: translate3d(0, 0, 0);
  pointer-events: none;
  opacity: 0;
}

/* --- Visual Fidelity / Performance Modes --- */

/* Off visuals: hide waves SVG entirely, replace with flat top border */
.visuals-off .waves {
  display: none !important;
}
.visuals-off .water-level {
  border-top: 2.5px solid rgba(255, 255, 255, 0.45) !important;
  box-shadow: 0 0 15px rgba(0, 114, 255, 0.3) !important;
}

/* Pause all animations when body has animations-paused class */
.animations-paused *,
.animations-paused *::before,
.animations-paused *::after {
  animation-play-state: paused !important;
}

.tank-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
  pointer-events: none;
}

.tank-percentage {
  font-family: var(--font-accent);
  font-size: 2.2rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8), 0 0 15px rgba(0, 210, 255, 0.3);
}

.tank-stats {
  font-size: 0.75rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(6, 9, 19, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 3px 10px;
  border-radius: 12px;
  margin-top: 4px;
  backdrop-filter: blur(4px);
}

.hydration-status-msg {
  font-weight: 700;
  color: var(--accent-teal);
  text-align: center;
  margin-top: 8px;
  font-size: 0.85rem;
}

/* Quick presets logging */
.log-quick-presets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 12px 0 16px 0;
}

.preset-btn {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--card-border);
  color: var(--text-main);
  border-radius: 14px;
  padding: 10px 4px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: all var(--transition-fast);
}

.preset-btn:hover {
  background: rgba(0, 210, 255, 0.04);
  border-color: rgba(0, 210, 255, 0.2);
  transform: translateY(-2px);
}

.preset-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

.preset-btn svg {
  width: 16px;
  height: 16px;
}

.preset-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}

.preset-value {
  font-size: 0.8rem;
  font-weight: 700;
}

/* Custom log styling */
.custom-log-area {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 12px;
}

.divider-text {
  font-size: 0.7rem;
  text-align: center;
  color: var(--text-muted);
  text-transform: uppercase;
}

.custom-input-wrapper {
  display: flex;
  gap: 8px;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 3px 4px 3px 12px;
}

.custom-input-wrapper input {
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-family: var(--font-primary);
  font-size: 0.9rem;
  font-weight: 700;
  width: 100%;
}

.custom-input-wrapper .unit {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-right: 6px;
}

/* Challenge elements */
.active-challenge-card {
  border: 1px solid rgba(176, 38, 255, 0.12);
}

.tag {
  background: rgba(176, 38, 255, 0.12);
  color: #d880ff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.active-challenge-card h4 {
  font-size: 0.95rem;
  margin-bottom: 2px;
}

.active-challenge-card p {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.challenge-progress-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.challenge-progress-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 3px;
  overflow: hidden;
}

.challenge-fill {
  height: 100%;
  background: linear-gradient(to right, var(--accent-purple), var(--primary));
  border-radius: 3px;
}

.challenge-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
}

.reward {
  color: var(--accent-orange);
  font-weight: 700;
}

/* Leaderboard preview list widget */
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.text-link {
  background: transparent;
  border: none;
  color: var(--primary);
  font-family: var(--font-primary);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}

.preview-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.preview-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid rgba(255, 255, 255, 0.03);
  padding: 6px 10px;
  border-radius: 10px;
}

.preview-item.active {
  background: rgba(0, 210, 255, 0.03);
  border-color: rgba(0, 210, 255, 0.08);
}

.preview-rank {
  font-family: var(--font-accent);
  font-weight: 700;
  font-size: 0.85rem;
  width: 14px;
}

.preview-item:nth-child(1) .preview-rank { color: var(--accent-orange); }
.preview-item:nth-child(2) .preview-rank { color: #8595ae; }
.preview-item:nth-child(3) .preview-rank { color: #cd7f32; }

.preview-avatar { font-size: 1.1rem; }
.preview-name { font-weight: 600; font-size: 0.8rem; flex-grow: 1; }

.preview-bar-wrapper {
  width: 75px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.preview-mini-bar {
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 2px;
  overflow: hidden;
}

.preview-fill { height: 100%; background: var(--primary); }
.preview-percent { font-size: 0.7rem; font-weight: 700; text-align: right; }

/* ====================================================
   LEADERBOARD DESIGN
   ==================================================== */
.leaderboard-heading-wrapper {
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 12px;
}

.leaderboard-heading-wrapper h2 {
  font-family: var(--font-accent);
  font-size: 1.25rem;
}

/* Podium */
.podium-area {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 12px;
  height: 190px;
  margin-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.podium-pillar {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 85px;
  position: relative;
}

.podium-avatar {
  font-size: 1.7rem;
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.03);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.podium-crown {
  position: absolute;
  top: -16px;
  font-size: 1.1rem;
}

.podium-name {
  font-weight: 600;
  font-size: 0.8rem;
  margin-bottom: 1px;
}

.podium-score {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}

.pillar-block {
  width: 100%;
  border-radius: 8px 8px 0 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.position-num {
  font-family: var(--font-accent);
  font-size: 1.6rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.08);
}

/* Second Place */
.podium-pillar.second .pillar-block {
  height: 80px;
  background: linear-gradient(180deg, rgba(133, 149, 174, 0.12) 0%, rgba(133, 149, 174, 0.01) 100%);
  border: 1px solid rgba(133, 149, 174, 0.15);
  border-bottom: none;
}

/* First Place */
.podium-pillar.first {
  width: 100px;
}
.podium-pillar.first .pillar-block {
  height: 110px;
  background: linear-gradient(180deg, rgba(255, 157, 0, 0.15) 0%, rgba(255, 157, 0, 0.01) 100%);
  border: 1px solid rgba(255, 157, 0, 0.25);
  border-bottom: none;
}
.podium-pillar.first .podium-avatar {
  border-color: var(--accent-orange);
  width: 56px;
  height: 56px;
  font-size: 2rem;
}
.podium-pillar.first .podium-score {
  color: var(--accent-orange);
}

/* Third Place */
.podium-pillar.third .pillar-block {
  height: 60px;
  background: linear-gradient(180deg, rgba(205, 127, 50, 0.12) 0%, rgba(205, 127, 50, 0.01) 100%);
  border: 1px solid rgba(205, 127, 50, 0.15);
  border-bottom: none;
}

/* Rankings list */
.leaderboard-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.leaderboard-row {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 10px 14px;
}

.leaderboard-row.current-user {
  background: rgba(0, 210, 255, 0.03);
  border-color: rgba(0, 210, 255, 0.12);
}

.row-rank {
  font-family: var(--font-accent);
  font-size: 0.95rem;
  font-weight: 700;
  width: 26px;
  color: var(--text-muted);
}

.leaderboard-row:nth-child(1) .row-rank { color: var(--accent-orange); }
.leaderboard-row:nth-child(2) .row-rank { color: #8595ae; }
.leaderboard-row:nth-child(3) .row-rank { color: #cd7f32; }

.row-avatar { font-size: 1.3rem; margin-right: 10px; }

.row-details {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.row-name-bar {
  display: flex;
  align-items: center;
  gap: 6px;
}

.row-name { font-weight: 600; font-size: 0.85rem; }

.row-streak {
  font-size: 0.65rem;
  color: var(--accent-orange);
  background: rgba(255, 157, 0, 0.06);
  padding: 1px 4px;
  border-radius: 3px;
  font-weight: 600;
}

.row-bar-bg {
  width: 100%;
  max-width: 140px;
  height: 5px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 2px;
}

.row-bar-fill {
  height: 100%;
  background: linear-gradient(to right, var(--secondary), var(--primary));
}

.row-score {
  text-align: right;
  display: flex;
  flex-direction: column;
}

.row-percent {
  font-family: var(--font-accent);
  font-size: 0.95rem;
  font-weight: 700;
}

.row-fraction {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* Activity feed */
.activity-feed-card {
  max-height: 280px;
  display: flex;
  flex-direction: column;
}

.activity-feed {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  margin-top: 10px;
}

.feed-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(255, 255, 255, 0.02);
}

.feed-item.achievement-unlock {
  border-color: rgba(176, 38, 255, 0.15);
  background: rgba(176, 38, 255, 0.02);
}

.feed-avatar {
  font-size: 1.1rem;
  padding: 4px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
}

.feed-body {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.feed-text {
  font-size: 0.75rem;
  line-height: 1.3;
}

.feed-text strong { color: #fff; }
.feed-text span.highlight { color: var(--primary); font-weight: 700; }
.feed-text span.badge-name { color: #d880ff; font-weight: 700; }
.feed-time { font-size: 0.65rem; color: var(--text-muted); }

/* ====================================================
   ANALYTICS & CHARTS
   ==================================================== */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 4px;
}

.metric-box {
  background: rgba(255,255,255,0.01);
  border: 1px solid rgba(255,255,255,0.02);
  border-radius: 14px;
  padding: 12px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.metric-icon {
  font-size: 1.3rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}

.metric-title {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.metric-big-num {
  font-family: var(--font-accent);
  font-size: 1.15rem;
  font-weight: 700;
}

/* Hourly graph */
.hourly-chart-wrapper {
  display: flex;
  height: 150px;
  gap: 8px;
  padding-top: 10px;
}

.chart-y-axis {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-size: 0.65rem;
  color: var(--text-muted);
  text-align: right;
  width: 35px;
  height: 120px;
}

.chart-bars-container {
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  flex-grow: 1;
  height: 120px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0 4px;
}

.chart-bar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
  width: 20px;
}

.chart-bar-fill {
  width: 10px;
  background: linear-gradient(180deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: 5px 5px 0 0;
  min-height: 2px;
  transition: height 0.6s ease;
}

.chart-bar-label {
  font-size: 0.6rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Weekly graph */
.weekly-chart-wrapper {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.weekly-bars-container {
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  height: 120px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.weekly-bar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  width: 28px;
  justify-content: flex-end;
}

.weekly-grouped-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 100%;
}

.weekly-bar {
  width: 8px;
  border-radius: 4px 4px 0 0;
  transition: height 0.6s ease;
}

.weekly-bar.user {
  background: linear-gradient(180deg, var(--accent-teal) 0%, var(--secondary) 100%);
}

.weekly-bar.group {
  background: rgba(255, 255, 255, 0.06);
}

.weekly-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.weekly-legend {
  display: flex;
  justify-content: center;
  gap: 12px;
  font-size: 0.75rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
}

.legend-dot { width: 8px; height: 8px; border-radius: 50%; }
.legend-dot.user-dot { background: var(--accent-teal); }
.legend-dot.group-dot { background: rgba(255, 255, 255, 0.15); }

/* History log */
.history-logs-card {
  max-height: 240px;
  display: flex;
  flex-direction: column;
}

.history-list-wrapper {
  overflow-y: auto;
  margin-top: 10px;
}

.history-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.history-table th {
  padding: 6px 8px;
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.history-table td {
  padding: 8px 8px;
  font-size: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

.history-time { font-weight: 500; }
.history-name { font-weight: 600; }
.history-amount { font-family: var(--font-accent); font-weight: 700; color: var(--primary); }

.delete-log-btn {
  background: transparent;
  border: none;
  color: var(--accent-red);
  cursor: pointer;
  padding: 2px;
  display: flex;
  align-items: center;
}

.delete-log-btn svg { width: 14px; height: 14px; }

/* ====================================================
   ACHIEVEMENTS / QUESTS
   ==================================================== */
.achievements-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.player-level-card {
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.05) 0%, rgba(176, 38, 255, 0.05) 100%);
  border: 1px solid rgba(0, 242, 254, 0.15);
  padding: 16px 20px;
  border-radius: 20px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.player-level-info {
  display: flex;
  align-items: center;
  gap: 15px;
}

.level-badge {
  font-family: var(--font-accent);
  font-size: 1.4rem;
  font-weight: 800;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent-purple) 100%);
  color: #fff;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 242, 254, 0.3);
  flex-shrink: 0;
}

.xp-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.xp-details h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0;
  color: #fff;
}

.xp-ratio {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
}

.level-progress-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 4px;
  overflow: hidden;
}

.level-fill {
  height: 100%;
  background: linear-gradient(to right, var(--primary), var(--accent-purple));
  border-radius: 4px;
  transition: width 0.5s ease-out;
}

.level-unlock-hint {
  font-size: 0.7rem;
  color: var(--accent-teal);
  margin: 0;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.quests-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.quest-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255,255,255,0.005);
  border: 1px solid rgba(255,255,255,0.02);
  padding: 10px 14px;
  border-radius: 14px;
}

.quest-item.completed {
  border-color: rgba(60, 243, 156, 0.15);
  background: rgba(60, 243, 156, 0.01);
}

.quest-checkbox {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
}

.quest-item.completed .quest-checkbox {
  background: var(--accent-green);
  border-color: var(--accent-green);
  color: var(--text-inverse);
}

.quest-details { flex-grow: 1; }
.quest-title { font-size: 0.85rem; font-weight: 600; margin-bottom: 2px; }
.quest-desc { font-size: 0.7rem; color: var(--text-muted); }

.quest-progress-wrap {
  width: 100px;
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.quest-mini-bar-bg { width: 100%; height: 4px; background: rgba(255,255,255,0.04); border-radius: 2px; overflow: hidden; }
.quest-mini-bar-fill { height: 100%; background: var(--primary); border-radius: 2px; }
.quest-item.completed .quest-mini-bar-fill { background: var(--accent-green); }
.quest-progress-lbl { font-size: 0.65rem; font-weight: 700; color: var(--text-muted); }
.quest-item.completed .quest-progress-lbl { color: var(--accent-green); }

/* Badges Grid */
.badges-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 10px;
}

.badge-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: rgba(255, 255, 255, 0.005);
  border: 1px solid rgba(255, 255, 255, 0.02);
  border-radius: 16px;
  padding: 10px 4px;
  opacity: 0.35;
  filter: grayscale(1);
  transition: all var(--transition-smooth);
}

.badge-item.unlocked {
  opacity: 1;
  filter: grayscale(0);
  background: rgba(0, 210, 255, 0.02);
  border-color: rgba(0, 210, 255, 0.12);
}

.badge-icon-box {
  font-size: 1.6rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.01);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
  border: 1px solid rgba(255,255,255,0.04);
}

.badge-item.unlocked .badge-icon-box {
  background: linear-gradient(135deg, rgba(0, 210, 255, 0.1), rgba(0, 114, 255, 0.1));
  border-color: rgba(0, 210, 255, 0.25);
}

.badge-title { font-size: 0.75rem; font-weight: 700; margin-bottom: 2px; }
.badge-desc { font-size: 0.6rem; color: var(--text-muted); line-height: 1.2; }

/* ====================================================
   SETTINGS PANELS
   ==================================================== */
.settings-container,
.social-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.form-group label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.form-group input, .form-group select, .form-group textarea {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--card-border);
  color: #fff;
  font-family: var(--font-primary);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 10px 12px;
  border-radius: 10px;
  outline: none;
}

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

.form-group select option {
  background: var(--bg-color-alt);
}

/* Custom Checkboxes in group selector */
.form-group-checkboxes {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}

.form-group-checkboxes label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.members-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid var(--card-border);
  padding: 10px;
  border-radius: 10px;
  max-height: 100px;
  overflow-y: auto;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  cursor: pointer;
}

.checkbox-item input[type="checkbox"] {
  accent-color: var(--primary);
  width: 14px;
  height: 14px;
}

/* Firebase Setting banner card */
.firebase-status-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--card-border);
  padding: 8px 12px;
  border-radius: 10px;
}

.status-indicator-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.firebase-status-banner.offline .status-indicator-dot { background: var(--accent-red); box-shadow: 0 0 5px var(--accent-red); }
.firebase-status-banner.online .status-indicator-dot { background: var(--accent-green); box-shadow: 0 0 5px var(--accent-green); }
.status-text { font-size: 0.75rem; font-weight: 600; }

/* Group Invites Settings panel design */
.incoming-invites-wrapper {
  margin: 16px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 12px;
}

.incoming-invites-wrapper h4 {
  font-size: 0.85rem;
  margin-bottom: 8px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.invites-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.invite-item {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.015);
  border: 1px solid var(--card-border);
  padding: 8px 12px;
  border-radius: 10px;
  gap: 10px;
}

.invite-details {
  flex-grow: 1;
}

.invite-title {
  font-weight: 700;
  font-size: 0.8rem;
}

.invite-desc {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.accept-invite-btn {
  background: linear-gradient(135deg, var(--accent-teal), var(--secondary));
  border: none;
  color: var(--text-inverse);
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: 0.7rem;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
}

/* Group settings manager list item card */
.group-manager-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.group-manager-item {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--card-border);
  padding: 8px 12px;
  border-radius: 12px;
  gap: 10px;
}

.g-name {
  font-weight: 600;
  font-size: 0.85rem;
  flex-grow: 1;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.g-name:hover {
  color: var(--accent-blue);
  text-decoration: underline;
}

.g-primary-badge {
  font-size: 0.6rem;
  font-weight: 700;
  background: rgba(13, 242, 201, 0.15);
  color: var(--accent-teal);
  padding: 1px 5px;
  border-radius: 4px;
  text-transform: uppercase;
}

.make-primary-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-muted);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 6px;
  border-radius: 6px;
  cursor: pointer;
}

.make-primary-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.delete-group-btn {
  background: transparent;
  border: none;
  color: var(--accent-red);
  cursor: pointer;
  padding: 2px;
  font-size: 1.1rem;
}

.invite-group-member-btn {
  background: rgba(0, 242, 254, 0.08);
  border: 1px solid rgba(0, 242, 254, 0.2);
  color: var(--accent-blue);
  font-family: var(--font-primary);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.invite-group-member-btn:hover {
  background: rgba(0, 242, 254, 0.16);
  border-color: var(--accent-blue);
  transform: translateY(-1px);
}

/* Add Group Form */
.add-group-form {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 12px;
}

.add-group-form h4 {
  font-size: 0.85rem;
  margin-bottom: 8px;
  color: #fff;
}

/* Switches */
.form-group-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.toggle-title { font-weight: 600; font-size: 0.8rem; }
.switch { position: relative; display: inline-block; width: 40px; height: 20px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider-toggle {
  position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: .3s; border-radius: 20px;
}
.slider-toggle:before {
  position: absolute; content: ""; height: 12px; width: 12px; left: 3px; bottom: 3px;
  background-color: var(--text-muted); transition: .3s; border-radius: 50%;
}
.switch input:checked + .slider-toggle { background-color: rgba(0, 210, 255, 0.12); }
.switch input:checked + .slider-toggle:before {
  transform: translateX(20px);
  background-color: var(--primary);
}

/* Friends settings */
.friends-list-settings {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.friend-settings-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.01);
  border: 1px solid rgba(255,255,255,0.02);
  padding: 8px 10px;
  border-radius: 10px;
}

.fs-avatar { font-size: 1.1rem; }
.fs-name { font-weight: 600; flex-grow: 1; font-size: 0.8rem; }
.fs-goal { font-size: 0.75rem; color: var(--text-muted); }

.add-friend-form-inline {
  display: flex;
  gap: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 12px;
}

.add-friend-form-inline input {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--card-border);
  color: #fff;
  border-radius: 8px;
  padding: 6px 10px;
  font-family: var(--font-primary);
  font-size: 0.8rem;
  outline: none;
  flex-grow: 1;
}

.add-friend-form-inline select {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--card-border);
  color: #fff;
  border-radius: 8px;
  padding: 6px;
  font-family: var(--font-primary);
  font-size: 0.8rem;
  outline: none;
}

/* Profile header log out button */
.settings-profile-header-inline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.logout-action-btn {
  font-size: 0.7rem !important;
  padding: 4px 8px !important;
  border-radius: 6px !important;
  color: var(--accent-red) !important;
  border-color: rgba(255, 60, 105, 0.2) !important;
}

.logout-action-btn:hover {
  background: rgba(255, 60, 105, 0.08) !important;
}

/* Buttons System */
.primary-btn {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border: none;
  color: var(--text-inverse);
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 10px 20px;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 210, 255, 0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.primary-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.secondary-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  color: #fff;
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: 0.8rem;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
}

.danger-btn {
  background: rgba(255, 60, 105, 0.08);
  border: 1px solid rgba(255, 60, 105, 0.2);
  color: var(--accent-red);
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: 0.8rem;
  padding: 10px 20px;
  border-radius: 10px;
  cursor: pointer;
}

.danger-btn:hover {
  background: var(--accent-red);
  color: var(--text-inverse);
}

/* Bottom Nav */
.bottom-nav {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  background: rgba(10, 14, 31, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--card-border);
  z-index: 100;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0 8px;
}

.bottom-nav .nav-btn {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-muted);
  font-family: var(--font-primary);
  font-size: 0.65rem;
  font-weight: 700;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  flex-grow: 1;
  height: 100%;
  border-radius: 0;
  position: relative;
}

.bottom-nav .nav-btn.active {
  background: transparent;
  border: none;
  color: var(--primary);
}

.bottom-nav .nav-btn .nav-icon {
  width: 18px;
  height: 18px;
  transition: var(--transition-fast);
}

.bottom-nav .nav-btn.active .nav-icon {
  filter: drop-shadow(0 0 4px rgba(0, 210, 255, 0.5));
}

.bottom-nav .badge-count {
  position: absolute;
  top: 6px;
  right: calc(50% - 22px);
  font-size: 0.55rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 10px;
  background: var(--accent-teal);
  color: var(--text-inverse);
  box-shadow: 0 0 6px rgba(13, 242, 201, 0.4);
}

/* Toast container */
.toast-container {
  position: absolute;
  bottom: calc(var(--nav-height) + 12px);
  right: 12px;
  left: 12px;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 8px;
  z-index: 1700;
  pointer-events: none;
  max-width: none;
  width: auto;
}

.toast {
  background: rgba(10, 15, 30, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-left: 4px solid var(--primary);
  backdrop-filter: blur(16px);
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
  width: calc(100% - 24px);
  max-width: 320px;
  transform: translateY(100%);
  opacity: 0;
  animation: toastSlideUp 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.15) forwards;
  max-height: 150px;
  box-sizing: border-box;
  transition: max-height 0.35s ease, padding 0.35s ease, margin 0.35s ease, opacity 0.35s ease, border-width 0.35s ease, transform 0.35s ease;
}

.toast.removing {
  animation: toastSlideOut 0.35s cubic-bezier(0.6, 0, 0.35, 1) forwards;
  max-height: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  border-top-width: 0 !important;
  border-bottom-width: 0 !important;
  opacity: 0 !important;
  overflow: hidden;
}

/* Achievement toast special styling */
.toast-achievement {
  border-left-color: #ffd700;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 215, 0, 0.08);
  background: linear-gradient(135deg, rgba(10, 15, 30, 0.96), rgba(30, 25, 10, 0.96));
}

.toast-achievement .toast-title {
  background: linear-gradient(135deg, #ffd700, #ff9f1c);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.toast-avatar { font-size: 1.1rem; padding: 2px; }
.toast-title { font-weight: 700; font-size: 0.8rem; }
.toast-message { font-size: 0.75rem; color: var(--text-muted); }
.toast-close { font-size: 1.1rem; color: var(--text-muted); background: transparent; border: none; cursor: pointer; }

@keyframes toastSlideUp {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
@keyframes toastSlideOut {
  from { transform: translateY(0); opacity: 1; }
  to { transform: translateY(100%); opacity: 0; }
}

/* Tutorial Focus Pulse keyframes */
@keyframes pulse-border {
  0% {
    border-color: var(--primary);
    box-shadow: 0 0 0 9999px rgba(2, 4, 10, 0.94), 0 0 10px rgba(0, 210, 255, 0.4);
  }
  50% {
    border-color: var(--accent-teal);
    box-shadow: 0 0 0 9999px rgba(2, 4, 10, 0.94), 0 0 25px rgba(13, 242, 201, 0.6);
  }
  100% {
    border-color: var(--primary);
    box-shadow: 0 0 0 9999px rgba(2, 4, 10, 0.94), 0 0 10px rgba(0, 210, 255, 0.4);
  }
}

/* Achievement Category Filter Tabs */
.achievements-filter-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 4px 2px 10px 2px;
  margin-bottom: 8px;
  scrollbar-width: none; /* Hide scrollbar Firefox */
}

.achievements-filter-tabs::-webkit-scrollbar {
  display: none; /* Hide scrollbar Chrome/Safari/Edge */
}

.ach-filter-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  font-family: var(--font-primary);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 12px;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
  outline: none;
}

.ach-filter-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.15);
}

.ach-filter-btn.active {
  background: linear-gradient(135deg, rgba(0, 210, 255, 0.12), rgba(0, 114, 255, 0.12));
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 2px 8px rgba(0, 210, 255, 0.15);
}

/* Autocomplete Dropdown list */
.autocomplete-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: rgba(10, 15, 33, 0.98);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  max-height: 160px;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.autocomplete-dropdown.hidden {
  display: none !important;
}

.autocomplete-item {
  padding: 10px 12px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  transition: all var(--transition-fast);
}

.autocomplete-item:last-child {
  border-bottom: none;
}

.autocomplete-item:hover {
  background: rgba(0, 210, 255, 0.08);
}

.autocomplete-item .ac-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
}

.autocomplete-item .ac-username {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* ====================================================
   STICKY DASHBOARD HEADER & CUSTOMIZER
   ==================================================== */
.sticky-dashboard-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 25, 41, 0.85); /* Frosted dark glass */
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin: -20px -20px 20px -20px; /* Offset main panel padding */
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.header-group-selector {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex-grow: 1;
  max-width: 45%;
}

.group-select-dropdown-large {
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 8px 12px;
  border-radius: 12px;
  outline: none;
  cursor: pointer;
  width: 100%;
  transition: all 0.2s ease;
}

.group-select-dropdown-large:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--primary);
}

.header-level-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent-purple) 100%);
  color: #fff;
  border-radius: 14px;
  padding: 6px 14px;
  box-shadow: 0 4px 15px rgba(0, 242, 254, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
}

.header-level-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent-purple) 100%);
  color: #fff;
  font-family: var(--font-accent);
  font-size: 0.65rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 2px 8px rgba(0, 210, 255, 0.2);
  margin-left: 6px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  letter-spacing: 0.5px;
  line-height: 1;
}

.header-level-display .level-lbl {
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  opacity: 0.85;
}

.header-level-display .level-val {
  font-size: 1.1rem;
  font-weight: 900;
  line-height: 1.1;
  margin-top: 1px;
}

.customize-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.customize-btn svg {
  width: 14px;
  height: 14px;
}

.customize-btn:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  border-color: var(--primary);
}

.dashboard-widgets-grid {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.reorder-btn {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--primary);
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
}

.reorder-btn:hover:not(:disabled) {
  background: rgba(0, 242, 254, 0.1);
  border-color: var(--primary);
}

.reorder-btn:disabled {
  opacity: 0.3;
  cursor: default;
  color: var(--text-muted);
}

/* Customize widgets list modal styles */
.customize-widgets-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 15px 0;
  max-height: 250px;
  overflow-y: auto;
  padding-right: 5px;
}

.customize-widgets-list::-webkit-scrollbar {
  width: 6px;
}

.customize-widgets-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 3px;
}

.customize-widgets-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.customize-widgets-list::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

.customize-widget-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  transition: all 0.2s ease;
}

.customize-widget-item:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
}

.customize-widget-item .widget-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
}

/* Global Hidden Utility */
.hidden {
  display: none !important;
}

/* Featured Badges next to names */
.profile-badge-small {
  font-size: 1.15rem;
  cursor: pointer;
  transition: transform var(--transition-fast);
  display: inline-flex;
  align-items: center;
  user-select: none;
}
.profile-badge-small:hover {
  transform: scale(1.25);
}

/* Featured Badge state in Achievements Grid */
.badge-item.featured {
  border-color: rgba(255, 215, 0, 0.45) !important;
  background: rgba(255, 215, 0, 0.04) !important;
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.1), inset 0 0 8px rgba(255, 215, 0, 0.05) !important;
  position: relative;
}
.badge-item.featured::before {
  content: '★';
  position: absolute;
  top: 6px;
  right: 8px;
  color: #ffd700;
  font-size: 0.85rem;
  text-shadow: 0 0 4px rgba(255, 215, 0, 0.6);
}

/* Friends List UI */
.friend-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 10px 14px;
  transition: background var(--transition-fast);
}
.friend-item:hover {
  background: rgba(255, 255, 255, 0.035);
}
.friend-info {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  flex-grow: 1;
}
.friend-info:hover .friend-name {
  color: var(--primary);
  text-decoration: underline;
}
.friend-avatar {
  font-size: 1.4rem;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.friend-details {
  display: flex;
  flex-direction: column;
}
.friend-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  transition: color var(--transition-fast);
}
.friend-level {
  font-size: 0.7rem;
  color: var(--accent-teal);
  font-weight: 600;
  margin-top: 1px;
}
.remove-friend-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.3rem;
  cursor: pointer;
  transition: color var(--transition-fast);
  padding: 0 5px;
  line-height: 1;
}
.remove-friend-btn:hover {
  color: var(--accent-red);
}

/* Clickable Profile Text style */
.clickable-profile {
  cursor: pointer;
  transition: color var(--transition-fast);
}
.clickable-profile:hover {
  color: var(--primary) !important;
}

/* ====================================================
   DAILY CATCH UP SCREEN STYLES
   ==================================================== */
#catchup-overlay {
  background: rgba(3, 5, 12, 0.9);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  z-index: 3000;
}

.catchup-card {
  width: 100%;
  max-width: 440px;
  height: 90vh;
  height: 90dvh;
  max-height: 680px;
  padding: 24px;
  background: rgba(10, 15, 33, 0.95);
  border: 1px solid rgba(0, 242, 254, 0.2);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 30px rgba(0, 242, 254, 0.05);
  display: flex;
  flex-direction: column;
  animation: modalSlideUp 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
  border-radius: 24px;
}

.catchup-header {
  text-align: center;
  margin-bottom: 16px;
  flex-shrink: 0;
}

.catchup-icon-glow {
  font-size: 2.5rem;
  margin-bottom: 6px;
  filter: drop-shadow(0 0 10px rgba(0, 242, 254, 0.4));
  animation: pulse-avatar 2s infinite ease-in-out;
}

.catchup-header h2 {
  font-family: var(--font-accent);
  font-size: 1.45rem;
  font-weight: 800;
  margin: 0;
  background: linear-gradient(135deg, #00f2fe, #4facfe);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.catchup-header .subtitle {
  margin-top: 4px;
  margin-bottom: 0;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
}

.catchup-body {
  flex-grow: 1;
  overflow-y: auto;
  padding-right: 6px;
  margin-bottom: 15px;
}

.catchup-body::-webkit-scrollbar {
  width: 4px;
}

.catchup-body::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 2px;
}

.catchup-body::-webkit-scrollbar-thumb {
  background: rgba(0, 242, 254, 0.2);
  border-radius: 2px;
}

.catchup-body::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 242, 254, 0.4);
}

.catchup-section {
  margin-bottom: 20px;
  text-align: left;
}

.catchup-section h3 {
  font-family: var(--font-accent);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--accent-teal);
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 4px;
}

.catchup-personal-stat {
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 16px;
  padding: 15px;
  text-align: center;
}

.personal-stat-value {
  font-family: var(--font-accent);
  font-size: 1.8rem;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 0 10px rgba(0, 242, 254, 0.3);
}

.personal-stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.catchup-progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
  overflow: hidden;
}

.catchup-progress-fill {
  height: 100%;
  background: linear-gradient(to right, var(--primary), var(--accent-teal));
  border-radius: 3px;
  transition: width 1s ease-out;
}

.catchup-circle-item {
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 10px;
}

.catchup-circle-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.catchup-circle-name {
  font-family: var(--font-accent);
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
}

.catchup-circle-pinned-badge {
  font-size: 0.75rem;
  opacity: 0.85;
}

.catchup-circle-stats {
  display: flex;
  gap: 15px;
  margin-bottom: 12px;
  background: rgba(255, 255, 255, 0.01);
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 0.75rem;
}

.catchup-circle-stat-item {
  flex: 1;
}

.catchup-circle-stat-label {
  color: var(--text-muted);
  font-size: 0.65rem;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.catchup-circle-stat-val {
  font-weight: 700;
  color: #fff;
}

.catchup-circle-podium {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.catchup-podium-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.75rem;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.01);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.02);
}

.catchup-podium-row.is-user {
  background: rgba(0, 242, 254, 0.04);
  border-color: rgba(0, 242, 254, 0.12);
}

.catchup-podium-rank {
  font-weight: 800;
  width: 14px;
  color: var(--text-muted);
}

.catchup-podium-rank.rank-1 { color: #ffd700; }
.catchup-podium-rank.rank-2 { color: #c0c0c0; }
.catchup-podium-rank.rank-3 { color: #cd7f32; }

.catchup-podium-avatar {
  font-size: 0.95rem;
  width: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.catchup-podium-name {
  flex-grow: 1;
  font-weight: 600;
  color: #fff;
}

.catchup-podium-score {
  font-weight: 700;
  color: var(--text-muted);
}

.catchup-podium-row.is-user .catchup-podium-name {
  color: var(--accent-teal);
}

.catchup-podium-row.is-user .catchup-podium-score {
  color: var(--accent-teal);
}

.catchup-quests-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.catchup-quest-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(0, 242, 254, 0.03);
  border: 1px solid rgba(0, 242, 254, 0.08);
  border-radius: 12px;
  padding: 12px;
}

.catchup-quest-icon {
  font-size: 1.25rem;
  width: 32px;
  height: 32px;
  background: rgba(0, 242, 254, 0.08);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(0, 242, 254, 0.15);
}

.catchup-quest-info {
  flex-grow: 1;
}

.catchup-quest-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
}

.catchup-quest-desc {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.catchup-quest-xp {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--accent-teal);
  background: rgba(199, 125, 255, 0.08);
  border: 1px solid rgba(199, 125, 255, 0.2);
  padding: 2px 6px;
  border-radius: 6px;
  flex-shrink: 0;
}

.catchup-footer {
  flex-shrink: 0;
  padding-top: 10px;
}

.catchup-btn-glow {
  box-shadow: 0 4px 15px rgba(0, 242, 254, 0.2);
  transition: all var(--transition-fast) !important;
}

.catchup-btn-glow:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 242, 254, 0.35);
}

/* ====================================================
   DAILY RAID WIDGET & BOSS STYLES
   ==================================================== */
.raid-card {
  background: rgba(25, 10, 15, 0.65);
  border: 1px solid rgba(255, 60, 105, 0.2);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2), 0 0 15px rgba(255, 60, 105, 0.03);
}

.raid-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.raid-badge {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  background: rgba(255, 60, 105, 0.12);
  border: 1px solid rgba(255, 60, 105, 0.3);
  color: #ff3c69;
  padding: 2px 6px;
  border-radius: 6px;
}

.raid-boss-container {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 12px;
}

.raid-boss-avatar-wrapper {
  position: relative;
  flex-shrink: 0;
}

.raid-boss-avatar {
  font-size: 2.8rem;
  width: 65px;
  height: 65px;
  background: rgba(255, 60, 105, 0.08);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255, 60, 105, 0.2);
  box-shadow: 0 0 15px rgba(255, 60, 105, 0.1);
}

.raid-boss-avatar.shaking {
  animation: raid-shaking 1.5s infinite ease-in-out;
}

.raid-boss-avatar.defeated {
  background: rgba(0, 242, 254, 0.05);
  border-color: rgba(0, 242, 254, 0.2);
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.1);
  filter: grayscale(0.6) opacity(0.85);
  transform: rotate(15deg);
  animation: none !important;
}

@keyframes raid-shaking {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-3px) rotate(-3deg); }
  75% { transform: translateY(1px) rotate(3deg); }
}

.raid-boss-info {
  flex-grow: 1;
  text-align: left;
}

.raid-boss-name {
  font-family: var(--font-accent);
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
}

.raid-boss-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.raid-hp-container {
  margin-top: 8px;
}

.raid-hp-label-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.raid-hp-bar {
  width: 100%;
  height: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.5);
}

.raid-hp-fill {
  height: 100%;
  background: linear-gradient(to right, #ff1744, #ff5252);
  box-shadow: 0 0 8px rgba(255, 23, 68, 0.6);
  border-radius: 6px;
  transition: width 0.6s cubic-bezier(0.1, 0.8, 0.2, 1);
}

.raid-hp-fill.defeated {
  background: linear-gradient(to right, var(--accent-teal), #00e676);
  box-shadow: 0 0 8px rgba(0, 242, 254, 0.5);
}

.raid-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  font-size: 0.7rem;
  color: var(--text-muted);
  background: rgba(255,255,255,0.015);
  padding: 6px 10px;
  border-radius: 8px;
}

.raid-reward-label {
  font-weight: 700;
  color: #ffd700;
  display: flex;
  align-items: center;
  gap: 4px;
  text-shadow: 0 0 6px rgba(255, 215, 0, 0.2);
}

/* Catch Up Overlay Raid Styles */
.catchup-raid-card {
  background: rgba(25, 10, 15, 0.4);
  border: 1px solid rgba(255, 60, 105, 0.15);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.catchup-raid-card.victory {
  background: rgba(0, 242, 254, 0.02);
  border-color: rgba(0, 242, 254, 0.15);
}

.catchup-raid-avatar {
  font-size: 2.2rem;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 60, 105, 0.05);
  border-radius: 50%;
  border: 1px solid rgba(255, 60, 105, 0.1);
  flex-shrink: 0;
}

.catchup-raid-card.victory .catchup-raid-avatar {
  background: rgba(0, 242, 254, 0.05);
  border-color: rgba(0, 242, 254, 0.15);
}

.catchup-raid-info {
  flex-grow: 1;
  text-align: left;
}

.catchup-raid-name {
  font-family: var(--font-accent);
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
}

.catchup-raid-status-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  margin-top: 2px;
}

.catchup-raid-outcome-badge {
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.65rem;
}

.catchup-raid-outcome-badge.victory {
  color: var(--accent-teal);
}

.catchup-raid-outcome-badge.defeat {
  color: #ff3c69;
}



