@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

:root{
  --primary: #8b6f47;
  --primary-dark: #5e2e18;
  --secondary: #6b4423;
  --accent: #94704d;
  --success: #7c6a4f;
  --text: #ffffff;
  --text-secondary: #d4c4b0;
  --text-muted: #a89680;
  --bg-dark: rgba(28, 14, 12, 0.95);
  --bg-card: rgba(94, 46, 24, 0.4);
  --bg-card-hover: rgba(94, 46, 24, 0.6);
  --border: rgba(142, 111, 71, 0.3);
  --glass-bg: rgba(94, 46, 24, 0.2);
  --glass-border: rgba(142, 111, 71, 0.2);
  /* Surface tones (used across buttons/panels) */
  --surface-1: rgba(28, 14, 12, 0.6);
  --surface-1-hover: rgba(28, 14, 12, 0.75);
  --surface-2: rgba(94, 46, 24, 0.4);
  --surface-2-hover: rgba(94, 46, 24, 0.6);
  --chip-bg: rgba(255, 255, 255, 0.05);
  --chip-border: rgba(255, 255, 255, 0.08);
  --focus-ring: 0 0 0 2px rgba(139,111,71,0.18);
  /* Theming hooks */
  --glass-blur: 20px;
  --glass-sat: 180%;
  --glass-shadow: 0.3;
  --backdrop-blur: 10px;
  --backdrop-sat: 140%;
  --backdrop-radial: rgba(20, 12, 10, 0.8);
  --backdrop-linear-top: rgba(18, 10, 8, 0.9);
  --backdrop-linear-bottom: rgba(18, 10, 8, 0.92);
  --modal-bg: linear-gradient(135deg, rgba(28, 14, 12, 0.85), rgba(20, 12, 10, 0.9));
  --modal-blur: 14px;
  --modal-sat: 130%;
  --modal-shadow: 0.55;
  --picker-bg: rgba(20, 12, 10, 0.35);
  --picker-item-border: rgba(139, 111, 71, 0.18);
  --picker-item-bg: rgba(28, 14, 12, 0.55);
  --picker-item-hover-bg: rgba(94, 46, 24, 0.35);
  --picker-item-hover-border: rgba(184, 147, 95, 0.35);
  --picker-item-hover-shadow: 0.35;
  --picker-item-selected-bg: linear-gradient(135deg, rgba(94, 46, 24, 0.5), rgba(107, 68, 35, 0.45));
  --picker-item-selected-border: rgba(184, 147, 95, 0.5);
  --picker-item-selected-outline: rgba(184, 147, 95, 0.25);
  --picker-item-selected-shadow: 0.35;
  --btn-primary-from: var(--primary);
  --btn-primary-to: var(--secondary);
  --btn-primary-hover-from: var(--secondary);
  --btn-primary-hover-to: var(--primary);
  --btn-primary-shadow: 0.35;
  --btn-primary-hover-shadow: 0.4;
}

/* Theme variants */
body.theme-amber {
  --primary: #b8935f;
  --primary-dark: #8b6f47;
  --secondary: #6b4423;
  --accent: #d4a574;
  --border: rgba(184, 147, 95, 0.3);
  --glass-bg: rgba(107, 68, 35, 0.24);
  --glass-border: rgba(184, 147, 95, 0.25);
  --bg-dark: rgba(40, 26, 16, 0.95);
  --bg-card: rgba(107, 68, 35, 0.38);
  --bg-card-hover: rgba(107, 68, 35, 0.56);
  --surface-1: rgba(40, 26, 16, 0.6);
  --surface-1-hover: rgba(40, 26, 16, 0.75);
  --surface-2: rgba(107, 68, 35, 0.38);
  --surface-2-hover: rgba(107, 68, 35, 0.56);
  --backdrop-radial: rgba(24, 16, 10, 0.8);
  --backdrop-linear-top: rgba(22, 14, 9, 0.9);
  --backdrop-linear-bottom: rgba(20, 13, 8, 0.92);
  --modal-bg: linear-gradient(135deg, rgba(40, 26, 16, 0.85), rgba(32, 20, 12, 0.92));
  --picker-bg: rgba(40, 26, 16, 0.35);
  --picker-item-border: rgba(184, 147, 95, 0.25);
  --picker-item-bg: rgba(32, 20, 12, 0.55);
  --picker-item-hover-bg: rgba(184, 147, 95, 0.15);
  --picker-item-hover-border: rgba(216, 180, 120, 0.35);
  --picker-item-selected-bg: linear-gradient(135deg, rgba(184, 147, 95, 0.22), rgba(139, 111, 71, 0.2));
  --picker-item-selected-border: rgba(216, 180, 120, 0.5);
  --picker-item-selected-outline: rgba(216, 180, 120, 0.25);
}

body.theme-emerald {
  --primary: #10b981;
  --primary-dark: #059669;
  --secondary: #0e9f6e;
  --accent: #34d399;
  --border: rgba(16, 185, 129, 0.3);
  --glass-bg: rgba(6, 78, 59, 0.24);
  --glass-border: rgba(16, 185, 129, 0.25);
  --bg-dark: rgba(3, 30, 26, 0.95);
  --bg-card: rgba(6, 78, 59, 0.38);
  --bg-card-hover: rgba(6, 78, 59, 0.56);
  --surface-1: rgba(3, 30, 26, 0.6);
  --surface-1-hover: rgba(3, 30, 26, 0.75);
  --surface-2: rgba(6, 78, 59, 0.38);
  --surface-2-hover: rgba(6, 78, 59, 0.56);
  --backdrop-radial: rgba(3, 40, 34, 0.8);
  --backdrop-linear-top: rgba(2, 36, 30, 0.9);
  --backdrop-linear-bottom: rgba(2, 32, 27, 0.92);
  --modal-bg: linear-gradient(135deg, rgba(3, 48, 38, 0.85), rgba(3, 40, 34, 0.92));
  --picker-bg: rgba(3, 40, 34, 0.35);
  --picker-item-border: rgba(16, 185, 129, 0.25);
  --picker-item-bg: rgba(3, 36, 30, 0.55);
  --picker-item-hover-bg: rgba(16, 185, 129, 0.15);
  --picker-item-hover-border: rgba(110, 231, 183, 0.35);
  --picker-item-selected-bg: linear-gradient(135deg, rgba(16, 185, 129, 0.22), rgba(14, 159, 110, 0.2));
  --picker-item-selected-border: rgba(110, 231, 183, 0.5);
  --picker-item-selected-outline: rgba(110, 231, 183, 0.25);
}

body.theme-sapphire {
  --primary: #3b82f6;
  --primary-dark: #1d4ed8;
  --secondary: #2563eb;
  --accent: #60a5fa;
  --border: rgba(59, 130, 246, 0.3);
  --glass-bg: rgba(23, 37, 84, 0.24);
  --glass-border: rgba(59, 130, 246, 0.25);
  --bg-dark: rgba(8, 12, 30, 0.95);
  --bg-card: rgba(23, 37, 84, 0.38);
  --bg-card-hover: rgba(23, 37, 84, 0.56);
  --surface-1: rgba(8, 12, 30, 0.6);
  --surface-1-hover: rgba(8, 12, 30, 0.75);
  --surface-2: rgba(23, 37, 84, 0.38);
  --surface-2-hover: rgba(23, 37, 84, 0.56);
  --backdrop-radial: rgba(8, 13, 30, 0.8);
  --backdrop-linear-top: rgba(7, 11, 26, 0.9);
  --backdrop-linear-bottom: rgba(6, 10, 24, 0.92);
  --modal-bg: linear-gradient(135deg, rgba(8, 13, 30, 0.85), rgba(7, 11, 26, 0.92));
  --picker-bg: rgba(8, 13, 30, 0.35);
  --picker-item-border: rgba(59, 130, 246, 0.25);
  --picker-item-bg: rgba(7, 11, 26, 0.55);
  --picker-item-hover-bg: rgba(59, 130, 246, 0.15);
  --picker-item-hover-border: rgba(96, 165, 250, 0.35);
  --picker-item-selected-bg: linear-gradient(135deg, rgba(59, 130, 246, 0.22), rgba(37, 99, 235, 0.2));
  --picker-item-selected-border: rgba(96, 165, 250, 0.5);
  --picker-item-selected-outline: rgba(96, 165, 250, 0.25);
}

body.theme-crimson {
  --primary: #ef4444;
  --primary-dark: #dc2626;
  --secondary: #b91c1c;
  --accent: #f87171;
  --border: rgba(239, 68, 68, 0.3);
  --glass-bg: rgba(88, 28, 28, 0.24);
  --glass-border: rgba(239, 68, 68, 0.25);
  --bg-dark: rgba(30, 8, 8, 0.95);
  --bg-card: rgba(88, 28, 28, 0.38);
  --bg-card-hover: rgba(88, 28, 28, 0.56);
  --surface-1: rgba(30, 8, 8, 0.6);
  --surface-1-hover: rgba(30, 8, 8, 0.75);
  --surface-2: rgba(88, 28, 28, 0.38);
  --surface-2-hover: rgba(88, 28, 28, 0.56);
  --backdrop-radial: rgba(26, 7, 7, 0.8);
  --backdrop-linear-top: rgba(24, 6, 6, 0.9);
  --backdrop-linear-bottom: rgba(22, 6, 6, 0.92);
  --modal-bg: linear-gradient(135deg, rgba(26, 7, 7, 0.85), rgba(24, 6, 6, 0.92));
  --picker-bg: rgba(26, 7, 7, 0.35);
  --picker-item-border: rgba(239, 68, 68, 0.25);
  --picker-item-bg: rgba(24, 6, 6, 0.55);
  --picker-item-hover-bg: rgba(239, 68, 68, 0.15);
  --picker-item-hover-border: rgba(248, 113, 113, 0.35);
  --picker-item-selected-bg: linear-gradient(135deg, rgba(239, 68, 68, 0.22), rgba(185, 28, 28, 0.2));
  --picker-item-selected-border: rgba(248, 113, 113, 0.5);
  --picker-item-selected-outline: rgba(248, 113, 113, 0.25);
}

body.theme-violet {
  --primary: #8b5cf6;
  --primary-dark: #7c3aed;
  --secondary: #6d28d9;
  --accent: #a78bfa;
  --border: rgba(139, 92, 246, 0.3);
  --glass-bg: rgba(76, 29, 149, 0.24);
  --glass-border: rgba(139, 92, 246, 0.25);
  --bg-dark: rgba(22, 12, 40, 0.95);
  --bg-card: rgba(76, 29, 149, 0.38);
  --bg-card-hover: rgba(76, 29, 149, 0.56);
  --surface-1: rgba(22, 12, 40, 0.6);
  --surface-1-hover: rgba(22, 12, 40, 0.75);
  --surface-2: rgba(76, 29, 149, 0.38);
  --surface-2-hover: rgba(76, 29, 149, 0.56);
  --backdrop-radial: rgba(24, 14, 44, 0.8);
  --backdrop-linear-top: rgba(22, 12, 40, 0.9);
  --backdrop-linear-bottom: rgba(20, 11, 37, 0.92);
  --modal-bg: linear-gradient(135deg, rgba(24, 14, 44, 0.85), rgba(22, 12, 40, 0.92));
  --picker-bg: rgba(24, 14, 44, 0.35);
  --picker-item-border: rgba(139, 92, 246, 0.25);
  --picker-item-bg: rgba(22, 12, 40, 0.55);
  --picker-item-hover-bg: rgba(139, 92, 246, 0.15);
  --picker-item-hover-border: rgba(167, 139, 250, 0.35);
  --picker-item-selected-bg: linear-gradient(135deg, rgba(139, 92, 246, 0.22), rgba(109, 40, 217, 0.2));
  --picker-item-selected-border: rgba(167, 139, 250, 0.5);
  --picker-item-selected-outline: rgba(167, 139, 250, 0.25);
}

body.theme-graphite {
  --primary: #9ca3af;
  --primary-dark: #6b7280;
  --secondary: #4b5563;
  --accent: #d1d5db;
  --border: rgba(156, 163, 175, 0.35);
  --glass-bg: rgba(31, 41, 55, 0.24);
  --glass-border: rgba(75, 85, 99, 0.35);
  --bg-dark: rgba(20, 22, 24, 0.95);
  --bg-card: rgba(55, 65, 81, 0.4);
  --bg-card-hover: rgba(55, 65, 81, 0.6);
  --surface-1: rgba(20, 22, 24, 0.6);
  --surface-1-hover: rgba(20, 22, 24, 0.75);
  --surface-2: rgba(55, 65, 81, 0.4);
  --surface-2-hover: rgba(55, 65, 81, 0.6);
  --backdrop-radial: rgba(17, 24, 39, 0.8);
  --backdrop-linear-top: rgba(15, 23, 42, 0.9);
  --backdrop-linear-bottom: rgba(17, 24, 39, 0.92);
  --modal-bg: linear-gradient(135deg, rgba(17, 24, 39, 0.85), rgba(15, 23, 42, 0.92));
  --picker-bg: rgba(17, 24, 39, 0.35);
  --picker-item-border: rgba(156, 163, 175, 0.28);
  --picker-item-bg: rgba(15, 23, 42, 0.55);
  --picker-item-hover-bg: rgba(156, 163, 175, 0.15);
  --picker-item-hover-border: rgba(209, 213, 219, 0.35);
  --picker-item-selected-bg: linear-gradient(135deg, rgba(156, 163, 175, 0.22), rgba(75, 85, 99, 0.2));
  --picker-item-selected-border: rgba(209, 213, 219, 0.5);
  --picker-item-selected-outline: rgba(209, 213, 219, 0.25);
}

body.theme-rose {
  --primary: #f472b6;
  --primary-dark: #ec4899;
  --secondary: #be185d;
  --accent: #fbcfe8;
  --border: rgba(244, 114, 182, 0.3);
  --glass-bg: rgba(131, 24, 67, 0.22);
  --glass-border: rgba(236, 72, 153, 0.28);
  --bg-dark: rgba(40, 12, 28, 0.95);
  --bg-card: rgba(131, 24, 67, 0.34);
  --bg-card-hover: rgba(131, 24, 67, 0.5);
  --surface-1: rgba(40, 12, 28, 0.6);
  --surface-1-hover: rgba(40, 12, 28, 0.75);
  --surface-2: rgba(131, 24, 67, 0.34);
  --surface-2-hover: rgba(131, 24, 67, 0.5);
  --backdrop-radial: rgba(44, 14, 32, 0.8);
  --backdrop-linear-top: rgba(40, 12, 28, 0.9);
  --backdrop-linear-bottom: rgba(36, 11, 25, 0.92);
  --modal-bg: linear-gradient(135deg, rgba(44, 14, 32, 0.85), rgba(40, 12, 28, 0.92));
  --picker-bg: rgba(44, 14, 32, 0.35);
  --picker-item-border: rgba(236, 72, 153, 0.25);
  --picker-item-bg: rgba(40, 12, 28, 0.55);
  --picker-item-hover-bg: rgba(236, 72, 153, 0.15);
  --picker-item-hover-border: rgba(251, 207, 232, 0.35);
  --picker-item-selected-bg: linear-gradient(135deg, rgba(244, 114, 182, 0.22), rgba(190, 24, 93, 0.2));
  --picker-item-selected-border: rgba(251, 207, 232, 0.5);
  --picker-item-selected-outline: rgba(251, 207, 232, 0.25);
}

body.theme-ocean {
  --primary: #06b6d4;
  --primary-dark: #0e7490;
  --secondary: #0891b2;
  --accent: #67e8f9;
  --glass-bg: rgba(2, 20, 28, 0.28);
  --glass-border: rgba(6, 182, 212, 0.25);
  --glass-blur: 18px;
  --glass-sat: 180%;
  --glass-shadow: 0.28;
  --backdrop-blur: 10px;
  --backdrop-sat: 160%;
  --modal-bg: linear-gradient(135deg, rgba(2, 24, 32, 0.85), rgba(2, 20, 28, 0.92));
  --modal-blur: 14px;
  --modal-sat: 140%;
  --modal-shadow: 0.5;
  --picker-bg: rgba(2, 24, 32, 0.35);
  --picker-item-border: rgba(6, 182, 212, 0.25);
  --picker-item-bg: rgba(2, 20, 28, 0.55);
  --picker-item-hover-bg: rgba(6, 182, 212, 0.15);
  --picker-item-hover-border: rgba(103, 232, 249, 0.35);
  --picker-item-hover-shadow: 0.28;
  --picker-item-selected-bg: linear-gradient(135deg, rgba(6, 182, 212, 0.22), rgba(8, 145, 178, 0.2));
  --picker-item-selected-border: rgba(103, 232, 249, 0.5);
  --picker-item-selected-outline: rgba(103, 232, 249, 0.25);
  --picker-item-selected-shadow: 0.28;
  --btn-primary-from: #06b6d4;
  --btn-primary-to: #0891b2;
  --btn-primary-hover-from: #0891b2;
  --btn-primary-hover-to: #06b6d4;
  --btn-primary-shadow: 0.3;
  --btn-primary-hover-shadow: 0.35;
}

body.theme-cyber {
  --primary: #22d3ee;
  --primary-dark: #0891b2;
  --secondary: #14b8a6;
  --accent: #a7f3d0;
  --border: rgba(34, 211, 238, 0.3);
  --glass-bg: rgba(2, 36, 42, 0.24);
  --glass-border: rgba(34, 211, 238, 0.25);
  --bg-dark: rgba(3, 24, 28, 0.95);
  --bg-card: rgba(2, 36, 42, 0.38);
  --bg-card-hover: rgba(2, 36, 42, 0.56);
  --surface-1: rgba(3, 24, 28, 0.6);
  --surface-1-hover: rgba(3, 24, 28, 0.75);
  --surface-2: rgba(2, 36, 42, 0.38);
  --surface-2-hover: rgba(2, 36, 42, 0.56);
  --backdrop-radial: rgba(2, 32, 38, 0.8);
  --backdrop-linear-top: rgba(2, 28, 34, 0.9);
  --backdrop-linear-bottom: rgba(1, 26, 32, 0.92);
  --modal-bg: linear-gradient(135deg, rgba(2, 32, 38, 0.85), rgba(2, 28, 34, 0.92));
  --picker-bg: rgba(2, 32, 38, 0.35);
  --picker-item-border: rgba(34, 211, 238, 0.25);
  --picker-item-bg: rgba(2, 28, 34, 0.55);
  --picker-item-hover-bg: rgba(34, 211, 238, 0.15);
  --picker-item-hover-border: rgba(167, 243, 208, 0.35);
  --picker-item-selected-bg: linear-gradient(135deg, rgba(34, 211, 238, 0.22), rgba(20, 184, 166, 0.2));
  --picker-item-selected-border: rgba(167, 243, 208, 0.5);
  --picker-item-selected-outline: rgba(167, 243, 208, 0.25);
}

body.theme-obsidian {
  --primary: #f59e0b;
  --primary-dark: #b45309;
  --secondary: #374151;
  --accent: #fbbf24;
  --glass-bg: rgba(17, 24, 39, 0.3);
  --glass-border: rgba(55, 65, 81, 0.4);
  --glass-blur: 20px;
  --glass-sat: 160%;
  --glass-shadow: 0.35;
  --backdrop-blur: 12px;
  --backdrop-sat: 150%;
  --modal-bg: linear-gradient(135deg, rgba(17, 24, 39, 0.88), rgba(15, 23, 42, 0.94));
  --modal-blur: 16px;
  --modal-sat: 130%;
  --modal-shadow: 0.6;
  --picker-bg: rgba(17, 24, 39, 0.4);
  --picker-item-border: rgba(251, 191, 36, 0.22);
  --picker-item-bg: rgba(15, 23, 42, 0.6);
  --picker-item-hover-bg: rgba(251, 191, 36, 0.15);
  --picker-item-hover-border: rgba(245, 158, 11, 0.4);
  --picker-item-hover-shadow: 0.35;
  --picker-item-selected-bg: linear-gradient(135deg, rgba(245, 158, 11, 0.22), rgba(55, 65, 81, 0.2));
  --picker-item-selected-border: rgba(245, 158, 11, 0.5);
  --picker-item-selected-outline: rgba(245, 158, 11, 0.25);
  --picker-item-selected-shadow: 0.35;
  --btn-primary-from: #f59e0b;
  --btn-primary-to: #b45309;
  --btn-primary-hover-from: #b45309;
  --btn-primary-hover-to: #f59e0b;
  --btn-primary-shadow: 0.35;
  --btn-primary-hover-shadow: 0.4;
}

/* Theme Switcher */
.theme-switcher {
  position: fixed;
  top: 72px;
  right: 12px;
  display: grid;
  grid-template-columns: repeat(10, 22px) auto auto;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  align-items: center;
  z-index: 1100;
}

.theme-btn {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.theme-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0,0,0,0.35); }
.theme-btn[data-theme="amber"] { background: linear-gradient(135deg, #b8935f, #8b6f47); }
.theme-btn[data-theme="emerald"] { background: linear-gradient(135deg, #34d399, #059669); }
.theme-btn[data-theme="sapphire"] { background: linear-gradient(135deg, #60a5fa, #1d4ed8); }
.theme-btn[data-theme="crimson"] { background: linear-gradient(135deg, #f87171, #b91c1c); }
.theme-btn[data-theme="violet"] { background: linear-gradient(135deg, #a78bfa, #6d28d9); }
.theme-btn[data-theme="graphite"] { background: linear-gradient(135deg, #9ca3af, #4b5563); }
.theme-btn[data-theme="rose"] { background: linear-gradient(135deg, #fbcfe8, #ec4899); }
.theme-btn[data-theme="ocean"] { background: linear-gradient(135deg, #67e8f9, #0e7490); }
.theme-btn[data-theme="cyber"] { background: linear-gradient(135deg, #a7f3d0, #0891b2); }
.theme-btn[data-theme="obsidian"] { background: linear-gradient(135deg, #fbbf24, #374151); }

.theme-label {
  color: var(--text-secondary);
  font-size: 12px;
  margin-left: 6px;
}

.theme-reset, .theme-close {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 8px;
  padding: 4px 8px;
  font-weight: 700;
  transition: all 0.2s ease;
}
.theme-reset:hover, .theme-close:hover { background: var(--surface-2-hover); border-color: var(--primary); }

.theme-switcher.hidden { opacity: 0.4; pointer-events: none; }

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Performance Optimizations */
*,
*::before,
*::after {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: url('headerBG.png') center/cover no-repeat fixed;
  color: var(--text);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 96px 20px 20px;
  position: relative;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.top-panel {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background: linear-gradient(135deg, rgba(33, 18, 13, 0.9), rgba(84, 49, 32, 0.92));
  border-bottom: 1px solid rgba(255, 222, 147, 0.35);
  box-shadow: 0 12px 24px rgba(12, 6, 4, 0.45);
  z-index: 1200;
  backdrop-filter: blur(12px) saturate(140%);
}

.top-panel .wrap {
  max-width: 1240px;
  width: 100%;
  height: 100%;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.top-menu ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0;
  margin: 0;
}

.top-menu li {
  position: relative;
}

.top-menu a {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #ffecc7;
  text-decoration: none;
  padding: 14px 0;
  transition: color 0.25s ease;
}

.top-menu a::after {
  content: '';
  position: absolute;
  bottom: 8px;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, rgba(255, 220, 137, 0), rgba(255, 220, 137, 0.85), rgba(255, 220, 137, 0));
  transform: translateX(-50%);
  transition: width 0.25s ease;
}

.top-menu a:hover,
.top-menu a:focus-visible {
  color: #ffe6aa;
}

.top-menu a:hover::after,
.top-menu a:focus-visible::after {
  width: 60%;
}

@media (max-width: 1024px) {
  body {
    padding-top: 120px;
  }

  .top-panel {
    height: auto;
    padding: 14px 0;
  }

  .top-panel .wrap {
    flex-direction: column;
    gap: 6px;
  }

  .top-menu ul {
    flex-wrap: wrap;
    gap: 10px 18px;
  }

  .task-tip,
  .inventory-tip {
    padding: 12px 16px 12px 46px;
    font-size: 12px;
  }

  .inventory-tip {
    left: 18px;
    width: calc(100% - 36px);
  }
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, rgba(94, 46, 24, 0.3) 0%, rgba(107, 68, 35, 0.2) 50%, rgba(148, 112, 77, 0.2) 100%);
  z-index: -1;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, transparent 0%, rgba(24, 20, 19, 0.95) 100%);
  z-index: -1;
}

.container {
  display: flex;
  gap: 30px;
  max-width: 1400px;
  width: 100%;
  align-items: flex-start;
  justify-content: center;
  animation: fadeIn 0.6s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Glass Card Effect */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, var(--glass-shadow)),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 0 0 1px rgba(255, 255, 255, 0.05);
  transition: box-shadow 0.3s ease;
}

/* Inventory Wrapper */
.inv-wrap {
  position: relative;
  width: 380px;
  height: 450px;
  margin-top: 60px;
  animation: slideInLeft 0.6s ease;
  will-change: transform;
}

/* Character bar with image buttons */
.character-bar {
  position: absolute;
  top: -58px;
  left: 0;
  right: 0;
  display: flex;
  gap: 10px;
  justify-content: center;
  z-index: 10;
}

.character-btn {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: rgba(94, 46, 24, 0.55);
  border: 2px solid rgba(139, 111, 71, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
  overflow: hidden;
}

.character-btn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.45));
}

.character-btn:hover {
  background: rgba(139, 111, 71, 0.8);
  transform: translateY(-2px);
  border-color: #d4af37;
  box-shadow: 0 4px 12px rgba(139,111,71,0.5);
}

.character-btn.active {
  background: rgba(139, 111, 71, 0.9);
  border-color: #d4af37;
  box-shadow: 0 0 16px rgba(212,175,55,0.35);
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.inv-bg {
  position: absolute;
  inset: 0;
  background: url("images/empty_inventory.png") center/contain no-repeat;
  filter: brightness(0.9) contrast(1.1);
  pointer-events: none;
  opacity: 0.7;
}

.slot[data-slot="kask"] {left: 107px;top: 10px;}
.slot[data-slot="zirh"] { left: 107px; top: 21px; }
.slot[data-slot="silah"] { left: 23px; top: -192px; }
.slot[data-slot="kalkan"] {left: 193px;top: -331px;}
.slot[data-slot="ayakkabi"] {left: 106px;top: -134px;}
.slot[data-slot="kolye"] {left: 288px;top: -397px;}
.slot[data-slot="bilezik"] {left: 194px;top: -465px;}
.slot[data-slot="kupe"] {left: 287px;top: -613px;}

/* Inventory Slots */
.slot {
  position: absolute;
  width: 70px;
  height: 70px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(28, 14, 12, 0.8), rgba(20, 15, 10, 0.9));
  border: 2px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    inset 0 2px 8px rgba(0, 0, 0, 0.55),
    0 2px 10px rgba(0, 0, 0, 0.45);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(8px);
  overflow: hidden;
  will-change: transform;
  position: relative;
}

.slot::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(45deg,
    transparent 0%,
    rgba(255, 255, 255, 0.08) 25%,
    rgba(255, 255, 255, 0.12) 50%,
    rgba(255, 255, 255, 0.08) 75%,
    transparent 100%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
  border-radius: 12px;
  animation: slotShine 4s linear infinite;
  z-index: 0;
  pointer-events: none;
}

@keyframes slotShine {
  0% { transform: translateX(-100%) rotate(45deg); }
  100% { transform: translateX(200%) rotate(45deg); }
}

.slot::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(255, 215, 0, 0.2), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 12px;
  z-index: 0;
  pointer-events: none;
}

.slot:hover::before {
  opacity: 1;
}

.slot:hover::after {
  opacity: 1;
}

.slot:hover {
  transform: scale(1.06) translateY(-2px);
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow:
    inset 0 2px 8px rgba(0, 0, 0, 0.65),
    0 6px 18px rgba(0, 0, 0, 0.45);
  background: linear-gradient(135deg, rgba(40, 25, 15, 0.9), rgba(30, 20, 10, 0.95));
}

.slot:active {
  transform: scale(1.02) translateY(-1px);
  transition: transform 0.1s ease;
}

.slot.empty::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px rgba(184, 134, 11, 0.2);
  pointer-events: none;
  z-index: 1;
}

.slot.empty::before {
  opacity: 0.25;
}

.slot.empty .slot-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.82);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2px;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0,0,0,0.6);
  z-index: 1;
  pointer-events: none;
}

/* no icon/badge before text - purely textual */

.slot img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 8px;
  pointer-events: none;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.6)) brightness(1.05);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
  position: relative;
  z-index: 2;
}

/* Small label under item to show mode/type */
.slot .slot-badge {
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 10px;
  line-height: 1;
  padding: 3px 6px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.2);
  z-index: 3;
  pointer-events: none;
  white-space: nowrap;
}

.slot .slot-upgrade-badge {
  position: absolute;
  top: 4px;
  right: 6px;
  background: rgba(0, 0, 0, 0.6);
  color: #ffd700;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  padding: 3px 6px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
  z-index: 4;
  pointer-events: none;
  white-space: nowrap;
}

/* Special Slot Sizes */
.slot[data-slot="zirh"] {
  width: 64px;
  height: 141px;
  border-radius: 20px;
}

.slot[data-slot="zirh"]::before {
  border-radius: 20px;
}

.slot[data-slot="silah"] {
  width: 64px;
  height: 210px;
  border-radius: 20px;
}

.slot[data-slot="silah"]::before {
  border-radius: 20px;
}

.slot:hover img {
  transform: scale(1.12) rotate(2deg);
  filter: drop-shadow(0 4px 10px rgba(255, 215, 0, 0.4)) brightness(1.15);
}

/* Right Panel */
.panel {
  width: 520px;
  max-height: 85vh;
  padding: 32px;
  display: flex;
  flex-direction: column;
  animation: slideInRight 0.6s ease;
  overflow: hidden;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Header */
.panel-header {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.panel-title {
  font-size: 28px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--secondary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
  display: inline-block;
}

.panel-subtitle {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
  font-weight: 400;
}

/* Gear Score Display */
.gear-score-display {
  background: linear-gradient(135deg, rgba(139, 111, 71, 0.3), rgba(124, 106, 79, 0.2));
  border: 1px solid rgba(142, 111, 71, 0.4);
  border-radius: 16px;
  padding: 16px 28px;
  margin-bottom: 20px;
  text-align: center;
  position: relative;
  min-width: 320px;
}

.gear-score-display::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.05), transparent);
  animation: shine 3s infinite;
}

@keyframes shine {
  0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
  100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.score-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 600;
  margin-bottom: 8px;
  white-space: nowrap;
  position: relative;
  z-index: 1;
}

.score-value {
  font-size: 48px;
  font-weight: 800;
  background: linear-gradient(135deg, #d4a574, #b8935f);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  position: relative;
  z-index: 1;
}

.gear-score-label {
  font-size: 13px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
  margin-bottom: 8px;
}

.gear-score-value {
  font-size: 48px;
  font-weight: 800;
  background: linear-gradient(135deg, #d4a574, #b8935f);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

/* Scrollable Content */
.panel-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 8px;
}

.panel-content::-webkit-scrollbar {
  width: 6px;
}

.panel-content::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}

.panel-content::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 3px;
}

.panel-content::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--accent));
}

/* Section */
.section {
  background: rgba(94, 46, 24, 0.3);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
  transition: all 0.3s ease;
}

.section:hover {
  background: rgba(94, 46, 24, 0.5);
  border-color: rgba(139, 111, 71, 0.5);
}

.section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title-icon {
  font-size: 20px;
}

.task-tip {
  position: relative;
  margin-bottom: 18px;
  padding: 14px 18px 14px 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(148, 112, 77, 0.24), rgba(94, 46, 24, 0.38));
  border: 1px solid rgba(255, 222, 147, 0.32);
  color: #ffe8c4;
  font-size: 13px;
  line-height: 1.55;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 10px 22px rgba(12, 6, 4, 0.35);
}

.task-tip::before {
  content: '➤';
  position: absolute;
  top: 50%;
  left: 20px;
  transform: translateY(-50%);
  font-size: 20px;
  color: #ff6464;
  text-shadow: 0 0 14px rgba(255, 80, 80, 0.65);
}

.inventory-tip {
  position: absolute;
  left: 3px;
  top: 453px;
  width: 368px;
  padding: 14px 18px 14px 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(148, 112, 77, 0.28), rgba(94, 46, 24, 0.4));
  border: 1px solid rgba(255, 222, 147, 0.35);
  color: #ffe8c4;
  font-size: 13px;
  line-height: 1.55;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 12px 24px rgba(12, 6, 4, 0.4);
  pointer-events: none;
}

.inventory-tip::before {
  content: '➤';
  position: absolute;
  top: 50%;
  left: 20px;
  transform: translateY(-50%);
  font-size: 20px;
  color: #ff6464;
  text-shadow: 0 0 14px rgba(255, 80, 80, 0.65);
}

/* Selected Items List */
.secili-liste {
  background: rgba(28, 14, 12, 0.6);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  max-height: 320px;
  overflow-y: auto;
}

.secili-liste::-webkit-scrollbar {
  width: 6px;
}

.secili-liste::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}

.secili-liste::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 3px;
}

.secili-item {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 12px;
  margin-bottom: 10px;
  background: linear-gradient(135deg, rgba(94, 46, 24, 0.4), rgba(107, 68, 35, 0.3));
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.secili-item:hover {
  transform: translateX(8px);
  border-color: var(--primary);
  background: linear-gradient(135deg, rgba(139, 111, 71, 0.4), rgba(124, 106, 79, 0.3));
}

.secili-item img {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  border: 2px solid rgba(139, 111, 71, 0.5);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.secili-item .meta {
  flex: 1;
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
}

.secili-item .meta small {
  display: block;
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 4px;
  font-weight: 400;
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 14px;
}

/* Buttons */
.btn {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--text);
  border: none;
  padding: 12px 24px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  font-family: 'Poppins', sans-serif;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, var(--glass-shadow));
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(139, 111, 71, 0.7);
}

.btn:active {
  transform: translateY(-1px);
}

.btn.ghost {
  background: var(--surface-2);
  border: 1px solid var(--border);
  box-shadow: none;
}

.btn.ghost:hover {
  background: var(--surface-2-hover);
  border-color: var(--primary);
}

.btn-row {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

/* Task Buttons */
.task-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0;
}

.task-btn {
  padding: 10px 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 10px;
  transition: all 0.3s ease;
  font-size: 13px;
  font-weight: 500;
  font-family: 'Poppins', sans-serif;
}

.task-btn.special-task {
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--text-secondary);
  box-shadow: none;
}

.task-btn.special-task:hover {
  background: var(--surface-2-hover);
  border-color: var(--primary);
  color: var(--text-secondary);
  box-shadow: none;
}

.task-btn:hover {
  background: var(--surface-2-hover);
  border-color: var(--primary);
  transform: translateY(-2px);
}

.task-btn.active {
  background: linear-gradient(135deg, var(--success), #059669);
  color: var(--text);
  border-color: var(--success);
  box-shadow: 0 4px 16px rgba(124, 106, 79, 0.5);
}

/* Set Controls */
.set-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.set-box {
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 12px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s ease;
}

.set-box:hover {
  background: var(--surface-2-hover);
  border-color: var(--primary);
}

.set-title {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
  min-width: 45px;
}

.set-btn {
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  font-family: 'Poppins', sans-serif;
  transition: all 0.2s ease;
}

.set-btn:hover {
  background: var(--surface-2-hover);
  border-color: var(--primary);
  transform: translateY(-1px);
}

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  box-shadow: 0 2px 8px rgba(139, 111, 71, 0.4);
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.3s ease;
}

.modal.show {
  display: flex;
  box-shadow: 0 2px 8px rgba(0, 0, 0, var(--glass-shadow));
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(1200px 800px at 50% 40%, var(--backdrop-radial), transparent 70%),
    linear-gradient(180deg, var(--backdrop-linear-top), var(--backdrop-linear-bottom));
  border: 1px solid var(--glass-border);
}

.modal-content {
  position: relative;
  width: 900px;
  max-width: 95vw;
  max-height: 90vh;
  background: var(--modal-bg);
  backdrop-filter: blur(var(--modal-blur)) saturate(var(--modal-sat));
  border: 1px solid rgba(139, 111, 71, 0.25);
  padding: 28px;
  border-radius: 20px;
  box-shadow:
    0 18px 48px rgba(0, 0, 0, var(--modal-shadow)),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  animation: modalSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalSlideUp {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Modal Header */
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-title {
  font-size: 24px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
}

.modal-close {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(248, 113, 113, 0.15);
  border: 1px solid rgba(248, 113, 113, 0.3);
  color: #f87171;
  font-size: 24px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  line-height: 1;
}

.modal-close:hover {
  background: rgba(239, 68, 68, 0.3);
  border-color: #ef4444;
  transform: rotate(90deg) scale(1.1);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

/* Modal Body */
.modal-body {
  flex: 1;
  overflow-y: auto;
  padding-right: 8px;
}

/* Controls at the bottom of picker */
.picker-controls-bottom {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 12px;
  margin-top: 14px;
  padding: 12px;
  background: rgba(28, 14, 12, 0.5);
  border: 1px solid rgba(139, 111, 71, 0.2);
  border-radius: 12px;
}

.picker-control label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: var(--text);
  font-size: 12px;
}

.modal-body::-webkit-scrollbar {
  width: 8px;
}

.modal-body::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 4px;
  transition: background 0.2s ease;
}

.modal-body::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

/* Primary Button (Uygula butonu) */
.btn-primary {
  width: 100%;
  padding: 14px 24px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--btn-primary-from), var(--btn-primary-to));
  color: white;
  font-size: 16px;
  font-weight: 700;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, var(--btn-primary-shadow));
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, var(--btn-primary-hover-shadow));
  background: linear-gradient(135deg, var(--btn-primary-hover-from), var(--btn-primary-hover-to));
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}


.picker-list {
  width: 450px;
  max-height: 520px;
  overflow-y: auto;
  padding-right: 12px;
}

.picker-list::-webkit-scrollbar {
  width: 6px;
}

.picker-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}

.picker-list::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 3px;
}

.picker-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.pick {
  background: rgba(94, 46, 24, 0.4);
  padding: 12px;
  border-radius: 12px;
  text-align: center;
  cursor: pointer;
  border: 2px solid rgba(139, 111, 71, 0.3);
  transition: all 0.3s ease;
}

.pick:hover {
  border-color: var(--primary);
  transform: translateY(-8px) scale(1.05);
  box-shadow: 0 12px 24px rgba(139, 111, 71, 0.5);
  background: rgba(139, 111, 71, 0.3);
}

.pick img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

.controls {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.controls .info {
  background: rgba(94, 46, 24, 0.4);
  padding: 16px;
  border-radius: 12px;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  font-size: 14px;
  line-height: 1.6;
}

.row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.row label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-width: 120px;
}

.row label span {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
}

select {
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(94, 46, 24, 0.5);
  color: var(--text);
  border: 1px solid var(--border);
  font-size: 14px;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  transition: all 0.2s ease;
}

select:hover {
  border-color: var(--primary);
}

select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(139, 111, 71, 0.18);
}

.close-x {
  margin-left: auto;
  background: rgba(248, 113, 113, 0.2);
  border: 1px solid rgba(248, 113, 113, 0.3);
  color: #f87171;
  cursor: pointer;
  font-size: 20px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  transition: all 0.2s ease;
  font-weight: 700;
}

.close-x:hover {
  background: rgba(239, 68, 68, 0.3);
  border-color: #ef4444;
  transform: rotate(90deg);
}

/* Modal Header */
.modal-header {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.modal-title {
  font-size: 22px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Info Text */
.silik {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
}

.iptal {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 12px;
  line-height: 1.5;
  font-style: italic;
}

/* İletişim Bilgisi */
.contact-info {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: rgba(28, 14, 12, 0.95);
  backdrop-filter: blur(16px);
  padding: 12px 20px;
  border-radius: 12px;
  border: 1px solid rgba(139, 111, 71, 0.4);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 4px;
  z-index: 999;
  transition: all 0.3s ease;
  animation: slideInUp 0.6s ease-out;
}

.contact-info:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(139, 111, 71, 0.6);
  border-color: rgba(139, 111, 71, 0.7);
}

/* Responsive */
@media (max-width: 1200px) {
  .container {
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }
  
  .panel {
    width: 100%;
    max-width: 600px;
  }
}

/* Character Selection Cards */
.character-card:hover {
  transform: translateY(-8px) scale(1.05);
  border-color: var(--primary) !important;
  background: rgba(139, 111, 71, 0.4) !important;
  box-shadow: 0 12px 32px rgba(139, 111, 71, 0.6);
}

.character-card:active {
  transform: translateY(-4px) scale(1.02);
}

@media (max-width: 768px) {
  body {
    padding: 10px;
  }

  .container {
    gap: 15px;
  }
  
  /* Keep the inventory board visually compact on tablets/phones */
  .inv-wrap {
    width: 380px;
    height: 450px;
  }
  
  .panel {
    width: 100%;
    max-width: 100%;
    padding: 16px;
  }

  .panel-title {
    font-size: 22px;
  }

  .gear-score-value {
    font-size: 36px;
  }
  
  .item-picker-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
  
  .modal-content {
    width: 95vw;
    max-width: 95vw;
    padding: 20px;
    max-height: 85vh;
  }

  .picker-controls-bottom {
    grid-template-columns: 1fr;
  }

  .modal-title {
    font-size: 20px;
  }

  .modal-close {
    width: 36px;
    height: 36px;
    font-size: 20px;
  }

  .picker-item {
    padding: 8px;
  }

  .picker-item img {
    width: 50px;
    height: 50px;
  }

  .picker-item small {
    font-size: 11px;
  }

  .section {
    padding: 14px;
  }

  .section-title {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  body {
    padding: 5px;
    overflow-x: auto;
  }

  /* On narrow phones, scale the inventory board to preserve slot alignment */
  .inv-wrap {
    width: 380px !important;
    height: 450px !important;
    transform: scale(0.9);
    transform-origin: top left;
  }

  /* Slight slot position tweaks for small screens */
  .slot[data-slot="silah"] { left: 18px; top: -195px; }
  .slot[data-slot="kask"] { left: 102px; top: 8px; }
  .slot[data-slot="zirh"] { left: 103px; top: 20px; }
  .slot[data-slot="kalkan"] { left: 186px; top: -336px; }
  .slot[data-slot="ayakkabi"] { left: 101px; top: -146px; }
  .slot[data-slot="kolye"] { left: 280px; top: -400px; }
  .slot[data-slot="bilezik"] { left: 186px; top: -468px; }
  .slot[data-slot="kupe"] { left: 280px; top: -616px; }

  .panel {
    padding: 12px;
  }

  .panel-title {
    font-size: 18px;
  }

  .gear-score-display {
    padding: 15px;
  }

  .gear-score-value {
    font-size: 28px;
  }

  .contact-info {
    bottom: 10px;
    right: 10px;
    padding: 8px 14px;
    font-size: 11px;
  }

  .contact-info span:first-child {
    font-size: 11px;
  }

  .item-picker-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .modal-content {
    padding: 15px;
    border-radius: 16px;
  }

  .modal-header {
    margin-bottom: 16px;
    padding-bottom: 12px;
  }

  .modal-title {
    font-size: 18px;
  }

  .btn-primary {
    padding: 12px 20px;
    font-size: 14px;
  }

  .select-input {
    padding: 8px 12px;
    font-size: 13px;
  }

  .section {
    padding: 12px;
  }

  .section-header {
    gap: 8px;
  }

  .section-icon {
    font-size: 18px;
  }

  .section-title {
    font-size: 13px;
  }

  /* Slot boyutlarını küçült */
  .slot {
    width: 60px;
    height: 60px;
  }

  .slot img {
    width: 55px;
    height: 55px;
  }

  .slot[data-slot="zirh"] {
    width: 55px;
    height: 120px;
  }
}

/* Ultra small devices */
@media (max-width: 360px) {
  .inv-wrap {
    transform: scale(0.85);
  }
  .panel {
    padding: 10px;
  }
}

/* Utility Classes */
h3, h4 {
  margin: 0;
  font-weight: 700;
}

h3 {
  font-size: 18px;
  color: var(--text);
}

h4 {
  font-size: 16px;
  color: var(--text-secondary);
}

/* Set Buttons */
.set-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.set-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: rgba(94, 46, 24, 0.25);
  border-radius: 12px;
  border: 1px solid rgba(139, 111, 71, 0.2);
  transition: all 0.2s ease;
}

.set-row:hover {
  background: rgba(139, 111, 71, 0.15);
  border-color: rgba(139, 111, 71, 0.4);
}

.set-label {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-secondary);
  min-width: 60px;
}

.btn-small {
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  background: linear-gradient(135deg, rgba(139, 111, 71, 0.3), rgba(124, 106, 79, 0.3));
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Poppins', sans-serif;
  flex: 1;
}

.btn-small:hover {
  background: linear-gradient(135deg, rgba(139, 111, 71, 0.5), rgba(124, 106, 79, 0.5));
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(139, 111, 71, 0.4);
}

.btn-small:active {
  transform: translateY(0);
}

.btn-small.btn-danger {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(220, 38, 38, 0.2));
  border-color: rgba(239, 68, 68, 0.3);
}

.btn-small.btn-danger:hover {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.4), rgba(220, 38, 38, 0.4));
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Task Buttons */
.task-category {
  margin-top: 16px;
}

.task-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.task-subtitle {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.task-info {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.task-section {
  margin-top: 16px;
}

.task-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(85px, 1fr));
  gap: 8px;
}

.task-btn {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--glass-border);
  background: rgba(94, 46, 24, 0.4);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Poppins', sans-serif;
  text-align: center;
}

.task-btn:hover {
  background: rgba(139, 111, 71, 0.3);
  border-color: var(--primary);
  color: var(--text);
  transform: translateY(-2px);
}

.task-btn.active {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-color: var(--primary);
  color: white;
  box-shadow: 0 4px 12px rgba(139, 111, 71, 0.5);
}

.task-btn.royal-pass.active {
  background: linear-gradient(135deg, #b8935f, #9c7a4d);
  border-color: #b8935f;
  box-shadow: 0 4px 12px rgba(184, 147, 95, 0.5);
}

.task-btn:active {
  transform: translateY(0);
}

/* Select Input */
.select-input {
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(94, 46, 24, 0.5);
  color: var(--text);
  border: 1px solid var(--border);
  font-size: 14px;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  transition: all 0.2s ease;
}

.select-input:hover {
  border-color: var(--primary);
  background: rgba(94, 46, 24, 0.7);
}

.select-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(139, 111, 71, 0.18);
}

/* Item Picker Grid */
.item-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 12px;
  max-height: 400px;
  overflow-y: auto;
  padding: 10px;
  background: var(--picker-bg);
  border-radius: 12px;
}

.picker-group-title {
  grid-column: 1 / -1;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.3px;
  padding: 6px 2px 2px;
  margin: 6px 0 2px;
  border-bottom: 1px solid rgba(139, 111, 71, 0.25);
}

.item-picker-grid::-webkit-scrollbar {
  width: 8px;
}

.item-picker-grid::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

.item-picker-grid::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 4px;
}

.item-picker-grid::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

.picker-item {
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--picker-item-border);
  background: var(--picker-item-bg);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.picker-item:hover {
  background: var(--picker-item-hover-bg);
  border-color: var(--picker-item-hover-border);
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, var(--picker-item-hover-shadow));
}

.picker-item.selected {
  background: var(--picker-item-selected-bg);
  border-color: var(--picker-item-selected-border);
  box-shadow: 0 0 0 1px var(--picker-item-selected-outline), 0 10px 22px rgba(0, 0, 0, var(--picker-item-selected-shadow));
}

.picker-item img {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.picker-item small {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 500;
  line-height: 1.3;
}

/* style.css dosyanızdaki ilgili bölümü bununla değiştirin */

.task-badge {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  bottom: 110%; /* Butonun hemen üstünde */
  left: 50%;
  transform: translateX(-50%);
  
  background-color: rgba(15, 23, 42, 0.9); /* Koyu ve modern bir arkaplan */
  color: #cbd5e1; /* Daha yumuşak bir metin rengi */
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
  width: max-content; /* İçeriğe göre genişle */
  min-width: 180px; /* Çok küçülmesini engelle */
  max-width: 75px; /* Çok genişlemesini engelle */
  z-index: 99999999;
  
  transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;
  pointer-events: none; /* Üzerine gelince fare olaylarını engelle */
}

/* GS puanını gösteren strong etiketini stillendirelim */
.task-badge strong {
  color: #5eead4; /* Vurgu rengi */
  font-weight: 600;
  display: block; /* Altındaki metnin yeni satıra geçmesini sağlar */
  margin-bottom: 4px; /* Açıklama ile arasına boşluk koyar */
  font-size: 14px;
}

/* Fareyle üzerine gelince badge'i görünür yap */
.task-btn:hover .task-badge {
  visibility: visible;
  opacity: 1;
}

/* Tooltip oku */
.task-badge::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -6px;
  border-width: 6px;
  border-style: solid;
  border-color: rgba(15, 23, 42, 0.9) transparent transparent transparent;
}