/* ============================================================
   WHEEL PAGE STYLES
   ============================================================ */

/* ---- Fixed Header / Navbar ---- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  background: #ffffff;
  border-bottom: 1px solid #e8e8e8;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.header-logo {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 700;
  color: #1a1a1a;
  text-decoration: none;
  letter-spacing: -0.3px;
}

.header-logo:hover {
  color: #D4A853;
}

.header-nav {
  display: flex;
  gap: 8px;
}

.header-link {
  font-family: 'Roboto', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #666;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.header-link:hover {
  color: #1a1a1a;
  background: #f5f5f5;
}

.header-link.active {
  color: #1a1a1a;
  background: #f0f0f0;
  font-weight: 600;
}


/* ---- Main Page Layout ---- */
.wheel-page {
  display: flex;
  min-height: 100vh;
  padding-top: 60px; /* for fixed header */
  background: #fafafa;
  overflow-x: hidden;
}


/* ---- Left Panel – Wheel Area (65%) ---- */
.wheel-main {
  flex: 0 0 65%;
  max-width: 65%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px;
  position: relative;
  background: #ffffff;
  transition: flex 0.3s ease, max-width 0.3s ease;
}

.wheel-container {
  position: relative;
  width: 100%;
  max-width: 560px;
  aspect-ratio: 1;
}

.wheel-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.wheel-spin-btn {
  margin-top: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 48px;
  font-family: 'Roboto', sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #1a1a1a;
  background: linear-gradient(135deg, #F5D98A, #D4A853, #B8922F);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 14px rgba(212, 168, 83, 0.35);
  text-transform: uppercase;
}

.wheel-spin-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(212, 168, 83, 0.5);
}

.wheel-spin-btn:active:not(:disabled) {
  transform: translateY(0);
}

.wheel-spin-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}


/* ---- Right Panel – Sidebar (35%) ---- */
.wheel-sidebar {
  flex: 0 0 35%;
  max-width: 35%;
  border-left: 1px solid #e8e8e8;
  display: flex;
  flex-direction: column;
  max-height: 100vh;
  position: sticky;
  top: 60px;
  overflow-y: auto;
  background: #ffffff;
  transition: flex 0.3s ease, max-width 0.3s ease, border-color 0.3s ease, opacity 0.3s ease;
}

/* Sidebar collapsed state */
.sidebar-collapsed .wheel-main {
  flex: 0 0 100%;
  max-width: 100%;
}

.sidebar-collapsed .wheel-sidebar {
  flex: 0 0 0%;
  max-width: 0%;
  border-left-color: transparent;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
}

.sidebar-section {
  padding: 20px;
  border-bottom: 1px solid #f0f0f0;
}

.sidebar-section-title {
  font-family: 'Roboto', sans-serif;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #999;
  margin-bottom: 14px;
}


/* ---- Entry Count ---- */
.entry-count {
  font-family: 'Roboto', sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1;
}

.entry-count-label {
  font-size: 12px;
  color: #999;
  margin-top: 4px;
}


/* ---- Tabs ---- */
.tabs {
  display: flex;
  border-bottom: 1px solid #f0f0f0;
  padding: 0;
}

.tab {
  flex: 1;
  padding: 12px 16px;
  font-family: 'Roboto', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #999;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.tab:hover {
  color: #666;
  background: #fafafa;
}

.tab.active {
  color: #1a1a1a;
  border-bottom-color: #D4A853;
  font-weight: 600;
}


/* ---- Badge ---- */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 10px;
  line-height: 1;
}

.badge-gray {
  background: #eee;
  color: #666;
}

.badge-gold {
  background: #D4A853;
  color: #fff;
}


/* ---- Input / Textarea ---- */
.input-group {
  margin-bottom: 12px;
}

.input-label {
  display: block;
  font-family: 'Roboto', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: #666;
  margin-bottom: 6px;
}

.textarea {
  width: 100%;
  min-height: 100px;
  padding: 10px 12px;
  font-family: 'Roboto Mono', 'Roboto', monospace;
  font-size: 12px;
  line-height: 1.6;
  color: #333;
  background: #fafafa;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  resize: vertical;
  transition: border-color 0.2s ease;
  box-sizing: border-box;
}

.textarea:focus {
  outline: none;
  border-color: #D4A853;
  background: #fff;
}


/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: 'Roboto', sans-serif;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn-sm {
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 6px;
}

.btn-primary {
  color: #fff;
  background: #1a1a1a;
}

.btn-primary:hover {
  background: #333;
}

.btn-secondary {
  color: #555;
  background: #f0f0f0;
}

.btn-secondary:hover {
  background: #e5e5e5;
}

.btn-danger {
  color: #C0392B;
  background: #fef2f2;
}

.btn-danger:hover {
  background: #fee2e2;
}

.btn-gold {
  color: #1a1a1a;
  background: linear-gradient(135deg, #F5D98A, #D4A853);
}

.btn-gold:hover {
  box-shadow: 0 2px 10px rgba(212, 168, 83, 0.3);
}


/* ---- Flex helpers ---- */
.flex {
  display: flex;
}

.gap-8 {
  gap: 8px;
}

.w-full {
  width: 100%;
}


/* ---- Entry List ---- */
.entry-list {
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid #f0f0f0;
  border-radius: 8px;
  background: #fafafa;
}

.entry-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  font-size: 12px;
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.15s ease;
}

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

.entry-item:hover {
  background: #f5f5f5;
}

.entry-code {
  font-family: 'Roboto Mono', monospace;
  font-weight: 600;
  color: #1a1a1a;
  min-width: 80px;
}

.entry-name {
  color: #666;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}


/* ---- History / Results List ---- */
.history-list {
  max-height: 350px;
  overflow-y: auto;
}

.history-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #f5f5f5;
}

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

.history-badge {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #F5D98A, #D4A853);
  color: #1a1a1a;
  font-size: 11px;
  font-weight: 700;
}

.history-info {
  flex: 1;
  min-width: 0;
}

.history-code {
  font-family: 'Roboto Mono', monospace;
  font-size: 13px;
  font-weight: 600;
  color: #1a1a1a;
}

.history-name {
  font-size: 12px;
  color: #666;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-time {
  font-size: 10px;
  color: #bbb;
  margin-top: 2px;
}

.history-delete {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #ccc;
  background: transparent;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.history-delete:hover {
  color: #C0392B;
  background: #fef2f2;
}


/* ---- Toggle Switches ---- */
.toggle-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.toggle {
  position: relative;
  width: 40px;
  height: 22px;
  background: #ddd;
  border-radius: 11px;
  cursor: pointer;
  transition: background 0.25s ease;
  flex-shrink: 0;
}

.toggle::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  transition: transform 0.25s ease;
}

.toggle.active {
  background: #D4A853;
}

.toggle.active::after {
  transform: translateX(18px);
}

.toggle-label {
  font-family: 'Roboto', sans-serif;
  font-size: 13px;
  color: #555;
}


/* ---- Music Player Mini-bar ---- */
.music-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #fafafa;
  border: 1px solid #f0f0f0;
  border-radius: 8px;
}

.music-btn {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  background: #1a1a1a;
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s ease;
}

.music-btn:hover {
  background: #333;
}

.music-info {
  flex: 1;
  font-size: 12px;
  color: #999;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.volume-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 70px;
  height: 4px;
  background: #e0e0e0;
  border-radius: 2px;
  outline: none;
  flex-shrink: 0;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  background: #D4A853;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.volume-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  background: #D4A853;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}


/* ---- Hidden utility ---- */
.hidden {
  display: none !important;
}


/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1024px) {
  .wheel-page {
    flex-direction: column;
  }

  .wheel-main {
    flex: auto;
  }

  .wheel-sidebar {
    flex: auto;
    position: static;
    max-height: none;
    border-left: none;
    border-top: 1px solid #e8e8e8;
  }
}

@media (max-width: 640px) {
  .site-header {
    padding: 0 16px;
  }

  .header-logo {
    font-size: 17px;
  }

  .header-link {
    font-size: 12px;
    padding: 6px 10px;
  }

  .wheel-main {
    padding: 16px;
  }

  .wheel-container {
    max-width: 320px;
  }

  .wheel-spin-btn {
    padding: 12px 36px;
    font-size: 14px;
  }

  .sidebar-section {
    padding: 16px;
  }
}
