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

:root {
  --accent: #ffcc00;
  --accent-dim: #b38f00;
  --bg-1: #1a1a2e;
  --bg-2: #0a0a15;
  --panel: #14142a;
  --panel-hover: #1e1e3a;
  --text: #eee;
  --text-dim: #888;
  --border: #2a2a44;
}

html, body {
  height: 100%;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: radial-gradient(circle at top, var(--bg-1), var(--bg-2) 70%);
  color: var(--text);
  overflow: hidden;
}

.app {
  display: flex;
  height: 100vh;
}

/* ==== SIDEBAR ==== */
.sidebar {
  width: 340px;
  min-width: 340px;
  background: #0d0d1c;
  border-right: 2px solid var(--border);
  display: flex;
  flex-direction: column;
}

.logo {
  font-size: 20px;
  font-weight: bold;
  padding: 18px 20px;
  background: linear-gradient(90deg, #ffcc00, #ff6600);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  border-bottom: 1px solid var(--border);
}

.menu {
  flex: 1;
  overflow-y: auto;
  padding: 10px 0;
}

.menu::-webkit-scrollbar { width: 8px; }
.menu::-webkit-scrollbar-track { background: transparent; }
.menu::-webkit-scrollbar-thumb {
  background: #2a2a44;
  border-radius: 4px;
}
.menu::-webkit-scrollbar-thumb:hover { background: #3a3a5a; }

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: background 0.12s;
  font-size: 16px;
  font-weight: 600;
  color: #d5d5e5;
}

.menu-item:hover {
  background: var(--panel-hover);
}

.menu-item:hover .label {
  color: #FF256D;
  text-shadow:
    0 0 8px rgba(255, 37, 109, 0.6),
    0 0 16px rgba(255, 37, 109, 0.35);
}

.menu-item:hover .meta {
  color: #FF256D;
  opacity: 0.7;
}

.menu-item.active {
  background: var(--panel);
  border-left-color: var(--accent);
}

.menu-item.active .label {
  color: var(--accent);
}

.menu-item.active .meta {
  color: var(--accent);
  opacity: 0.8;
}

.menu-item .icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  object-fit: contain;
  padding: 4px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  transition: background 0.15s;
}

.menu-item:hover .icon {
  background: rgba(255, 255, 255, 0.25);
}

.menu-item.active .icon {
  background: rgba(255, 204, 0, 0.25);
}

.menu-item .label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.menu-item .meta {
  font-size: 13px;
  color: #888;
  flex-shrink: 0;
  font-weight: 500;
}

/* ==== CONTENT ==== */
.content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 26px;
  border-bottom: 1px solid var(--border);
}

.title-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.burger {
  display: none;
  background: none;
  border: none;
  color: var(--accent);
  font-size: 24px;
  cursor: pointer;
}

.current-console {
  font-size: 20px;
  color: var(--accent);
  font-weight: 600;
}

.current-meta {
  font-size: 13px;
  color: #888;
  font-weight: 500;
}

.roulette-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
  text-align: center;
  overflow-y: auto;
}

.slot {
  width: 90%;
  max-width: 900px;
  background: #000;
  border: 3px solid var(--accent);
  border-radius: 16px;
  padding: 40px 24px;
  box-shadow: 0 0 40px rgba(255, 204, 0, 0.25),
              inset 0 0 30px rgba(255, 204, 0, 0.08);
  min-height: 160px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

#game {
  font-size: 34px;
  font-weight: bold;
  color: var(--accent);
  text-shadow: 0 0 12px rgba(255, 204, 0, 0.7);
  word-break: break-word;
  line-height: 1.2;
}

.platform {
  font-size: 18px;
  color: #ff8800;
  font-weight: bold;
  min-height: 22px;
}

.note {
  font-size: 14px;
  color: #aaa;
  font-style: italic;
  max-width: 700px;
  line-height: 1.4;
}

.slot.spinning #game { color: #fff; filter: blur(0.6px); }
.slot.spinning .platform,
.slot.spinning .note { opacity: 0.3; }

.slot.winner { animation: pulse 0.7s ease-in-out 3; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 40px rgba(255,204,0,0.25); }
  50% { box-shadow: 0 0 80px rgba(255,204,0,1); border-color: #fff; }
}

.spin-btn {
  margin-top: 30px;
  font-size: 22px;
  padding: 16px 60px;
  border: none;
  border-radius: 50px;
  background: linear-gradient(135deg, #ffcc00, #ff8800);
  color: #111;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 6px 0 var(--accent-dim), 0 8px 20px rgba(0,0,0,0.5);
  transition: transform 0.1s, box-shadow 0.1s;
}

.spin-btn:hover:not(:disabled) { transform: translateY(-2px); }
.spin-btn:active:not(:disabled) {
  transform: translateY(4px);
  box-shadow: 0 2px 0 var(--accent-dim), 0 4px 10px rgba(0,0,0,0.5);
}
.spin-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.links {
  margin-top: 22px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.links a {
  display: inline-block;
  padding: 10px 22px;
  background: #1a1a2e;
  color: var(--accent);
  border: 2px solid var(--accent);
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 14px;
  transition: all 0.15s;
}

.links a:hover { background: var(--accent); color: #111; }

.counter {
  margin-top: 20px;
  font-size: 13px;
  color: #666;
}

.history {
  margin-top: 14px;
  font-size: 13px;
  color: #888;
  max-width: 800px;
  line-height: 1.6;
}

.history b { color: var(--accent); }

.welcome {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-dim);
  padding: 40px;
}

.welcome h2 { font-size: 26px; margin-bottom: 10px; color: #ccc; }
.welcome p { font-size: 15px; }

/* ==== LOADING ==== */
.loading {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.loading-box {
  background: #14142a;
  border: 2px solid var(--accent);
  border-radius: 12px;
  padding: 30px 40px;
  text-align: center;
  min-width: 320px;
}

.spinner {
  width: 44px;
  height: 44px;
  border: 4px solid #333;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-text {
  color: #eee;
  font-size: 15px;
  margin-bottom: 14px;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: #222;
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #ffcc00, #ff8800);
  width: 0%;
  transition: width 0.2s;
}

/* ==== RESPONSIVE ==== */
@media (max-width: 800px) {
  .sidebar {
    position: fixed;
    left: -100%;
    top: 0;
    height: 100vh;
    z-index: 50;
    transition: left 0.25s;
  }
  .sidebar.open { left: 0; }
  .burger { display: block; }
  .current-console { font-size: 16px; }
  #game { font-size: 24px; }
}