:root {
  --bg-dark: #07080d;
  --bg-card: rgba(20, 24, 41, 0.85);
  --bg-card-hover: rgba(30, 36, 61, 0.95);
  --border-glow: rgba(255, 42, 109, 0.3);
  --neon-pink: #ff2a6d;
  --neon-cyan: #05d9e8;
  --neon-purple: #9d4edd;
  --neon-yellow: #f72585;
  --neon-green: #00f5d4;
  --text-main: #f0f3fe;
  --text-muted: #8e99b7;
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;
  --shadow-neon: 0 0 20px rgba(255, 42, 109, 0.25);
  --shadow-cyan: 0 0 20px rgba(5, 217, 232, 0.25);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  padding-bottom: 70px; /* Space for fixed bottom nav on mobile */
}

/* Header Navbar */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: rgba(13, 15, 25, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: 1px;
  color: #fff;
  text-decoration: none;
}

.brand-title .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--neon-pink);
  box-shadow: 0 0 10px var(--neon-pink);
}

.brand-badge {
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 12px;
  background: rgba(255, 42, 109, 0.15);
  color: var(--neon-pink);
  border: 1px solid rgba(255, 42, 109, 0.3);
  font-weight: 700;
  text-transform: uppercase;
}

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

.btn-lang {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-lang:hover {
  background: rgba(255, 255, 255, 0.18);
}

.avatar-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--neon-pink);
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 0 10px rgba(255, 42, 109, 0.3);
}

.avatar-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Page Container */
.main-content {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
}

/* Card Styling */
.card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.37);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.card-title .icon {
  color: var(--neon-cyan);
}

/* Form Inputs */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.input-text, .input-select {
  width: 100%;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-text:focus, .input-select:focus {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 10px rgba(5, 217, 232, 0.2);
}

/* Pinned Search Bar */
.search-box-pinned {
  position: sticky;
  top: 60px;
  z-index: 90;
  background: var(--bg-dark);
  padding: 8px 0;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  font-size: 1.1rem;
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 14px 44px 14px 42px;
  background: rgba(20, 24, 41, 0.95);
  border: 1px solid var(--border-glow);
  border-radius: 30px;
  color: #fff;
  font-size: 1rem;
  outline: none;
  box-shadow: var(--shadow-neon);
}

.search-input:focus {
  border-color: var(--neon-cyan);
  box-shadow: var(--shadow-cyan);
}

.search-clear-btn {
  position: absolute;
  right: 10px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-clear-btn:hover {
  background: var(--neon-pink);
}

/* Filters Bar */
.filters-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 8px;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.filter-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--neon-cyan);
  letter-spacing: 0.5px;
}

.filter-select {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  outline: none;
  cursor: pointer;
}

/* Buttons */
.btn {
  background: var(--neon-pink);
  color: #fff;
  border: none;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-neon);
  text-decoration: none;
}

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

.btn:active {
  transform: translateY(0);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  box-shadow: none;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-cyan {
  background: var(--neon-cyan);
  color: #000;
  box-shadow: var(--shadow-cyan);
}

.btn-danger {
  background: #ff4757;
  color: #fff;
  box-shadow: none;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}

.btn:disabled, .btn-disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* Play/Pause admin button states: flashing while paused-live, solid while playing, dim while not live */
@keyframes btn-flash-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.btn-flashing {
  animation: btn-flash-pulse 1s ease-in-out infinite;
}

.btn-live-on {
  filter: brightness(1.15);
  box-shadow: 0 0 22px var(--neon-cyan);
}

.btn-off {
  opacity: 0.35;
  cursor: not-allowed;
  filter: grayscale(0.6);
}

@keyframes spinner-rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.spinner-icon {
  display: inline-block;
  animation: spinner-rotate 0.9s linear infinite;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
}

.badge-live {
  background: rgba(0, 245, 212, 0.15);
  color: var(--neon-green);
  border: 1px solid rgba(0, 245, 212, 0.3);
}

.badge-idle {
  background: rgba(142, 153, 183, 0.15);
  color: var(--text-muted);
  border: 1px solid rgba(142, 153, 183, 0.3);
}

.badge-missing {
  background: rgba(255, 71, 87, 0.15);
  color: #ff4757;
  border: 1px solid rgba(255, 71, 87, 0.3);
}

.badge-tag {
  background: rgba(255, 255, 255, 0.08);
  color: var(--neon-cyan);
  border: 1px solid rgba(5, 217, 232, 0.2);
  font-weight: 600;
}

/* Song Item Card */
.song-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.song-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 12px 14px;
  border-radius: var(--radius-md);
  gap: 12px;
  transition: background 0.2s ease;
}

.song-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.song-item.missing {
  opacity: 0.45;
  background: rgba(255, 0, 0, 0.05);
}

.song-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.song-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.song-artist {
  font-size: 0.82rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.song-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 2px;
}

/* Progress bar */
.progress-bar-bg {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 8px;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--neon-pink), var(--neon-cyan));
  width: 0%;
  transition: width 0.3s linear;
}

/* Apple/iOS Style Fixed Bottom Tab Bar */
.bottom-tab-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 65px;
  background: rgba(13, 15, 25, 0.96);
  backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 200;
}

.tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--text-muted);
  background: transparent;
  border: none;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  flex: 1;
  height: 100%;
  transition: color 0.2s ease;
}

.tab-item .tab-icon {
  font-size: 1.3rem;
}

.tab-item.active {
  color: var(--neon-pink);
}

.tab-item.active .tab-icon {
  transform: scale(1.1);
}

/* Collapsible Accordion Sections for Admin Logs */
.collapsible {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  overflow: hidden;
}

.collapsible-header {
  padding: 14px 16px;
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.02);
  user-select: none;
}

.collapsible-header:hover {
  background: rgba(255, 255, 255, 0.06);
}

.collapsible-body {
  padding: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: none;
}

.collapsible.open .collapsible-body {
  display: block;
}

.collapsible-arrow {
  transition: transform 0.2s ease;
}

.collapsible.open .collapsible-arrow {
  transform: rotate(180deg);
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  background: var(--bg-dark);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 480px;
  padding: 24px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.8);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Desktop Player UI */
.player-screen {
  position: fixed;
  inset: 0;
  background: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.video-stage {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.standby-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, rgba(20, 24, 41, 0.95), rgba(7, 8, 13, 1));
  gap: 24px;
  text-align: center;
  padding: 20px;
}

.qr-card {
  background: #ffffff;
  padding: 20px;
  border-radius: 20px;
  box-shadow: 0 0 40px rgba(255, 42, 109, 0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.qr-card svg {
  width: 220px;
  height: 220px;
}

.player-controls-floating {
  position: absolute;
  bottom: 24px;
  right: 24px;
  display: flex;
  gap: 12px;
  z-index: 20;
}

.icon-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.icon-btn:hover {
  background: var(--neon-pink);
  box-shadow: var(--shadow-neon);
}
