/* ===== GLASSMORPHISM DARK MODE DESIGN ===== */

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

:root {
  /* Dark Background Gradient */
  --bg-primary: #0a0a0f;
  --bg-secondary: #131318;

  /* Glass Effect Colors */
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-shadow: rgba(0, 0, 0, 0.3);

  /* Accent Colors */
  --accent-primary: rgba(138, 180, 248, 0.8);
  --accent-glow: rgba(138, 180, 248, 0.3);

  /* Tier Colors */
  --tier-s: linear-gradient(135deg, #ffd700, #ffed4e, #ffd700, #ffaa00);
  --tier-a: linear-gradient(135deg, #c0c0c0, #e8e8e8, #b8b8b8, #d4d4d4);
  --tier-b: linear-gradient(135deg, #cd7f32, #e89f5d, #cd7f32, #a0522d);
  --tier-c: linear-gradient(135deg, #00ff88, #00d9ff);
  --tier-d: linear-gradient(135deg, #4a90e2, #9013fe);
  --tier-e: linear-gradient(135deg, #b833ff, #ff00ff);
  --tier-f: linear-gradient(135deg, #666, #999);

  /* Text Colors */
  --text-primary: rgba(255, 255, 255, 0.95);
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-muted: rgba(255, 255, 255, 0.5);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto",
    sans-serif;
  background: #0a0a0f url("/assets/BGDJ.png") center center / cover no-repeat
    fixed;
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Dark overlay for better readability */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 10, 15, 0.4);
  pointer-events: none;
  z-index: 0;
}

/* ===== STICKY HEADER ===== */
.glass-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem 1.5rem;
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: 0 4px 30px var(--glass-shadow);
}

.app-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  background: linear-gradient(135deg, #fff, var(--accent-primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 30px var(--accent-glow);
  cursor: pointer;
  user-select: none;
}

@media (min-width: 768px) {
  .glass-header {
    padding: 1.5rem 2rem;
  }

  .app-title {
    font-size: 2rem;
  }
}

/* ===== ADMIN MODE - HIDE ADMIN-ONLY ELEMENTS BY DEFAULT ===== */

/* Hide admin-only elements for public view */
.criteria-ranking,
#saveDetailBtn,
.upload-btn,
#musicInputs,
.remove-media-btn,
.performance-bonuses,
.performance-penalties,
.final-score {
  display: none !important;
}

/* Hide public-only elements by default */
.criteria-breakdown {
  display: none !important;
}

/* ===== PUBLIC MODE: HIDE ADMIN FEATURES ===== */

/* Hide artist library (search/add) in public mode */
body:not(.admin-mode) .artist-library {
  display: none !important;
}

/* Hide Add DJ modal in public mode */
body:not(.admin-mode) #addDJModal {
  display: none !important;
}

/* Hide delete mode overlay in public mode */
body:not(.admin-mode) .delete-mode-overlay {
  display: none !important;
}

/* Show tooltip in public mode for criteria guidance */
body:not(.admin-mode) .criteria-tooltip {
  display: block !important;
}

/* Hide event context inputs (admin grid) in public mode */
body:not(.admin-mode) .event-context #eventGrid {
  display: none !important;
}

/* Show event context display (public) in public mode */
body:not(.admin-mode) .event-context #eventDisplay {
  display: grid !important;
}

/* Hide event context display in admin mode */
body.admin-mode .event-context #eventDisplay {
  display: none !important;
}

/* Make notes read-only in public mode */
body:not(.admin-mode) #djNotes {
  pointer-events: none;
  opacity: 0.7;
  cursor: default;
  background: rgba(255, 255, 255, 0.03);
}

/* ===== ADMIN MODE: SHOW ADMIN FEATURES ===== */

/* Show tooltip in admin mode */
body.admin-mode .criteria-tooltip {
  display: block !important;
}

/* Show admin-only elements when authenticated */
.admin-mode .criteria-ranking {
  display: block !important;
}

.admin-mode #saveDetailBtn {
  display: block !important;
}

.admin-mode .upload-btn {
  display: flex !important;
}

.admin-mode #musicInputs {
  display: flex !important;
}

.admin-mode .remove-media-btn {
  display: block !important;
}

/* Show breakdown in both modes */
.criteria-breakdown {
  display: block !important;
}

/* Show bonuses, penalties, and final score ONLY in admin mode */
.admin-mode .performance-bonuses,
.admin-mode .performance-penalties,
.admin-mode .final-score {
  display: block !important;
}

.notes-actions {
  display: none;
  margin-top: 0.75rem;
  justify-content: flex-end;
}

.notes-actions .glass-btn {
  min-width: 150px;
}

.notes-actions .glass-btn.success {
  background: rgba(0, 255, 136, 0.18);
  border-color: rgba(0, 255, 136, 0.35);
  box-shadow: 0 0 18px rgba(0, 255, 136, 0.25);
}

.admin-mode .notes-actions {
  display: flex;
}

/* Hide bonuses, penalties sections in public mode (integrated into breakdown) */
body:not(.admin-mode) .performance-bonuses,
body:not(.admin-mode) .performance-penalties,
body:not(.admin-mode) .final-score {
  display: none !important;
}

/* Hide Apply to Tier button in public mode */
body:not(.admin-mode) #applyTierBtn {
  display: none !important;
}

/* Hide checkbox inputs in admin mode collapsible */
body:not(.admin-mode) .collapsible-header {
  cursor: default;
}

body:not(.admin-mode) .toggle-icon {
  display: none;
}

/* Admin Mode Indicator */
.admin-indicator {
  position: fixed;
  top: 20px;
  right: 20px;
  background: linear-gradient(135deg, #00ff88, #00d9ff);
  color: #0a0a0f;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 4px 20px rgba(0, 255, 136, 0.4);
  z-index: 10000;
  animation: pulseGlow 2s ease-in-out infinite;
}

.admin-indicator button {
  background: rgba(10, 10, 15, 0.8);
  color: white;
  border: none;
  padding: 0.25rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.admin-indicator button:hover {
  background: rgba(10, 10, 15, 1);
  transform: scale(1.05);
}

@keyframes pulseGlow {
  0%,
  100% {
    box-shadow: 0 4px 20px rgba(0, 255, 136, 0.4);
  }
  50% {
    box-shadow: 0 4px 30px rgba(0, 255, 136, 0.6);
  }
}

/* ===== GLASS EFFECTS ===== */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 8px 32px var(--glass-shadow);
  position: relative;
  z-index: 1;
}

.glass-btn {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 0.75rem 1.5rem;
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.glass-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent-primary);
  box-shadow: 0 0 20px var(--accent-glow);
  transform: translateY(-2px);
}

.glass-btn.primary {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #fff;
}

.glass-btn.primary:hover {
  box-shadow: 0 0 30px var(--accent-glow);
}

.glass-input {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 0.875rem 1rem;
  color: var(--text-primary);
  font-size: 0.95rem;
  width: 100%;
  transition: all 0.3s ease;
}

.glass-input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 20px var(--accent-glow);
}

.glass-input::placeholder {
  color: var(--text-muted);
}

/* ===== MAIN CONTAINER ===== */
.main-container {
  padding: 1rem;
  max-width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 768px) {
  .main-container {
    padding: 2rem;
    max-width: 1800px;
    gap: 2rem;
  }
}

@media (min-width: 1024px) {
  .main-container {
    display: grid;
    grid-template-columns: 1fr 380px;
    grid-template-rows: auto;
    align-items: start;
  }

  /* Reorder: Tier Ranking on left, Artist Library on right */
  .tier-ranking {
    order: 1;
    grid-column: 1;
  }

  .artist-library {
    order: 2;
    grid-column: 2;
    position: sticky;
    top: 80px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    margin-bottom: 0;
  }

  /* Adjust artist library layout for sidebar */
  .artist-library .section-header {
    flex-direction: column;
    align-items: stretch;
  }

  .artist-library .search-input {
    width: 100%;
  }

  /* Single column for artist cards in sidebar */
  .artist-library .artist-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
}

/* ===== ARTIST LIBRARY ===== */
.artist-library {
  margin-bottom: 0.5rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-header h2 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0;
}

@media (min-width: 768px) {
  .section-header h2 {
    font-size: 1.5rem;
  }
}

.collapse-btn {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  width: 32px;
  height: 32px;
  color: var(--text-primary);
  font-size: 1.5rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.collapse-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent-primary);
}

.search-input {
  flex: 1;
  min-width: 200px;
  max-width: 100%;
}

@media (min-width: 768px) {
  .search-input {
    max-width: 400px;
  }
}

/* Horizontal scrolling artist grid */
.artist-grid-container {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--glass-border) var(--bg-secondary);
  transition: max-height 0.3s ease, opacity 0.3s ease;
  max-height: 200px;
  opacity: 1;
}

.artist-grid-container.collapsed {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
}

.artist-grid-container::-webkit-scrollbar {
  height: 6px;
}

.artist-grid-container::-webkit-scrollbar-track {
  background: var(--bg-secondary);
  border-radius: 3px;
}

.artist-grid-container::-webkit-scrollbar-thumb {
  background: var(--glass-border);
  border-radius: 3px;
}

.artist-grid-container::-webkit-scrollbar-thumb:hover {
  background: var(--accent-primary);
}

.artist-grid {
  display: flex;
  gap: 1rem;
  padding: 1rem 0.5rem;
  min-height: 150px;
}

@media (min-width: 768px) {
  .artist-grid {
    gap: 1.5rem;
    padding: 1rem;
  }
}

.artist-card {
  cursor: grab;
  transition: all 0.3s ease;
  text-align: center;
  width: 100px;
  flex-shrink: 0;
  position: relative;
}

@media (min-width: 768px) {
  .artist-card {
    width: 120px;
  }
}

.artist-card:active {
  cursor: grabbing;
}

.artist-card.dragging {
  opacity: 0.5;
}

/* Artist grid as drop zone for moving back to library */
.admin-mode .artist-grid.drag-over {
  background: rgba(138, 180, 248, 0.05);
  border: 2px dashed var(--accent-primary);
  border-radius: 16px;
  box-shadow: 0 0 30px var(--accent-glow);
}

/* Remove button for artists in tiers */
.artist-card .remove-btn {
  position: absolute;
  top: -8px;
  right: -8px;
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
  display: none;
  z-index: 10;
  transition: all 0.3s ease;
  line-height: 1;
  padding: 0;
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.9), 0 2px 4px rgba(0, 0, 0, 0.5);
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.5));
}

/* ADMIN ONLY: Desktop - show on hover */
@media (hover: hover) {
  body.admin-mode .artist-card:hover .remove-btn {
    display: block;
  }

  body.admin-mode .remove-btn:hover {
    color: #ff4545;
    transform: scale(1.3) rotate(90deg);
    filter: drop-shadow(0 0 8px rgba(255, 69, 69, 0.8));
  }
}

/* ADMIN ONLY: Mobile - show in wiggle/delete mode */
body.admin-mode .delete-mode .artist-card .remove-btn {
  display: block;
}

body.admin-mode .delete-mode .artist-card {
  animation: wiggle 0.3s ease-in-out infinite;
}

/* PUBLIC MODE: Never show remove buttons or delete mode */
body:not(.admin-mode) .remove-btn {
  display: none !important;
}

@keyframes wiggle {
  0%,
  100% {
    transform: rotate(-2deg);
  }
  50% {
    transform: rotate(2deg);
  }
}

/* Delete mode overlay/button */
.delete-mode-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 999;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 80px;
}

.delete-mode-overlay.active {
  display: flex;
}

.done-delete-btn {
  background: var(--accent-primary);
  border: none;
  border-radius: 12px;
  padding: 1rem 2rem;
  color: white;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(138, 180, 248, 0.5);
  transition: all 0.3s ease;
}

.done-delete-btn:active {
  transform: scale(0.95);
}

.artist-avatar {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--glass-border);
  box-shadow: 0 4px 20px var(--glass-shadow);
  transition: all 0.3s ease;
  margin-bottom: 0.25rem;
}

.artist-card:hover .artist-avatar {
  border-color: var(--accent-primary);
  box-shadow: 0 0 30px var(--accent-glow);
  transform: scale(1.05);
}

.artist-card.search-result .add-artist-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 0 20px rgba(138, 180, 248, 0.6);
}

.artist-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-top: 0.25rem;
}

/* ===== TIER RANKING ===== */
.tier-ranking h2 {
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
  font-weight: 600;
}

.tier-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.tier-row {
  display: flex;
  gap: 1rem;
  align-items: stretch;
  min-height: 184px;
}

.tier-label {
  flex-shrink: 0;
  width: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: 900;
  border-radius: 12px;
  background: var(--glass-bg);
  border: 2px solid var(--glass-border);
  position: relative;
  overflow: hidden;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.tier-label::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.9;
  z-index: -1;
}

.tier-label::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    transparent 0%,
    rgba(255, 255, 255, 0.3) 45%,
    rgba(255, 255, 255, 0.5) 50%,
    rgba(255, 255, 255, 0.3) 55%,
    transparent 100%
  );
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.tier-s::before {
  background: var(--tier-s);
  animation: shimmer-gold 3s ease-in-out infinite;
}
.tier-s {
  border: 4px solid #ffd700;
  box-shadow: 0 0 50px rgba(255, 215, 0, 0.8), 0 0 80px rgba(255, 215, 0, 0.4),
    inset 0 0 30px rgba(255, 215, 0, 0.4);
  transform: scale(1.05);
  font-size: 2.8rem;
}

.tier-a::before {
  background: var(--tier-a);
  animation: shimmer-silver 3s ease-in-out infinite;
}
.tier-a {
  border: 3px solid #c0c0c0;
  box-shadow: 0 0 25px rgba(192, 192, 192, 0.5),
    inset 0 0 15px rgba(192, 192, 192, 0.3);
}

.tier-b::before {
  background: var(--tier-b);
  animation: shimmer-bronze 3s ease-in-out infinite;
}
.tier-b {
  border: 3px solid #cd7f32;
  box-shadow: 0 0 25px rgba(205, 127, 50, 0.5),
    inset 0 0 15px rgba(205, 127, 50, 0.3);
}

.tier-c::before {
  background: var(--tier-c);
}
.tier-d::before {
  background: var(--tier-d);
}
.tier-e::before {
  background: var(--tier-e);
}
.tier-f::before {
  background: var(--tier-f);
}

/* Shimmer animations for metallic effects */
@keyframes shimmer-gold {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

@keyframes shimmer-silver {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

@keyframes shimmer-bronze {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.tier-s::before,
.tier-a::before,
.tier-b::before {
  background-size: 200% 200%;
}

/* Hover effect for metallic tiers */
.tier-row:hover .tier-s::after,
.tier-row:hover .tier-a::after,
.tier-row:hover .tier-b::after {
  opacity: 1;
  animation: shine 1.5s ease-in-out;
}

@keyframes shine {
  0% {
    transform: translateX(-100%) rotate(45deg);
  }
  100% {
    transform: translateX(100%) rotate(45deg);
  }
}

.tier-drop-zone {
  flex: 1;
  background: var(--glass-bg);
  border: 2px dashed var(--glass-border);
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
  min-height: 148px;
  transition: all 0.3s ease;
}

.tier-drop-zone.drag-over {
  background: rgba(138, 180, 248, 0.1);
  border-color: var(--accent-primary);
  box-shadow: 0 0 30px var(--accent-glow);
}

.tier-drop-zone .artist-card {
  width: 100px;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .tier-drop-zone .artist-card {
    width: 120px;
  }
}

.tier-drop-zone .artist-avatar {
  width: 100%;
  aspect-ratio: 1;
  margin-bottom: 0.25rem;
}

/* ===== MODALS ===== */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  overflow-y: auto;
}

.modal.active {
  display: flex;
}

/* Prevent body scroll when modal is open */
body.modal-open {
  overflow: hidden;
}

.modal-content {
  max-height: 90vh;
  overflow-y: auto;
  animation: modalSlideIn 0.3s ease;
}

.glass-modal {
  background: rgba(10, 10, 15, 0.95);
  backdrop-filter: blur(30px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 2rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  max-width: 600px;
  width: 100%;
}

.glass-modal.large {
  max-width: 1200px;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--glass-border);
}

.modal-header h2 {
  font-size: 1.75rem;
  font-weight: 600;
}

.close-btn {
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 2rem;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.close-btn:hover {
  background: var(--glass-bg);
  transform: rotate(90deg);
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.modal-footer {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--glass-border);
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
}

/* ===== ADD DJ MODAL ===== */
.search-artist-section {
  display: flex;
  gap: 1rem;
}

.search-results {
  max-height: 300px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.search-result-item:hover {
  border-color: var(--accent-primary);
  box-shadow: 0 0 20px var(--accent-glow);
}

.search-result-item img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
}

.divider {
  text-align: center;
  color: var(--text-muted);
  position: relative;
  margin: 1.5rem 0;
}

.divider::before,
.divider::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: var(--glass-border);
}

.divider::before {
  left: 0;
}
.divider::after {
  right: 0;
}

#manualDJForm {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* ===== DJ DETAIL MODAL ===== */
.dj-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.dj-profile {
  margin-bottom: 1.5rem;
}

.dj-profile img {
  width: 100%;
  max-width: 250px;
  aspect-ratio: 1;
  border-radius: 20px;
  object-fit: cover;
  border: 3px solid var(--glass-border);
  margin-bottom: 1rem;
}

.bio-text {
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 0.95rem;
}

.music-links h3,
.criteria-ranking h3,
.notes-section h3,
.media-section h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.link-inputs {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

/* Criteria Breakdown (Public View) */
.criteria-breakdown {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.criteria-breakdown h3 {
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.breakdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.breakdown-item:last-of-type {
  border-bottom: none;
}

.breakdown-label {
  min-width: 100px;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 1rem;
}

.breakdown-stars {
  font-size: 1.2rem;
  letter-spacing: 2px;
}

.breakdown-score {
  color: var(--text-secondary);
  font-size: 1rem;
}

.breakdown-desc {
  margin-left: auto;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-style: italic;
}

.breakdown-total {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 2px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.1rem;
}

.breakdown-tier {
  background: var(--accent-primary);
  padding: 0.25rem 0.75rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1rem;
}

/* Music Buttons */
.music-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.music-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  cursor: pointer;
  border: 2px solid transparent;
}

.spotify-btn {
  background: linear-gradient(135deg, #1db954, #1ed760);
  color: white;
  box-shadow: 0 4px 15px rgba(29, 185, 84, 0.3);
}

.spotify-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(29, 185, 84, 0.5);
  border-color: rgba(255, 255, 255, 0.2);
}

.spotify-web-btn {
  background: rgba(29, 185, 84, 0.2);
  color: #1db954;
  border: 2px solid #1db954;
}

.spotify-web-btn:hover {
  background: rgba(29, 185, 84, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(29, 185, 84, 0.2);
}

.soundcloud-btn {
  background: linear-gradient(135deg, #ff5500, #ff7733);
  color: white;
  box-shadow: 0 4px 15px rgba(255, 85, 0, 0.3);
}

.soundcloud-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 85, 0, 0.5);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Mobile optimization for music buttons */
@media (max-width: 768px) {
  .music-btn {
    padding: 0.85rem 1rem;
    font-size: 0.9rem;
  }

  .event-grid {
    grid-template-columns: 1fr;
  }

  .score-breakdown {
    flex-direction: column;
    gap: 0.5rem;
  }
}

/* ===== CRITERIA RANKING ===== */
.criteria-ranking {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 1.5rem;
  position: relative;
}

.criteria-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
}

.criteria-item label {
  font-weight: 500;
  color: var(--text-primary);
  min-width: 80px;
}

.rating-dots {
  display: flex;
  gap: 0.5rem;
}

.dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid var(--glass-border);
  background: var(--glass-bg);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.dot:hover {
  border-color: var(--accent-primary);
  transform: scale(1.1);
}

.dot.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  box-shadow: 0 0 15px var(--accent-glow);
}

.total-score {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.1rem;
}

.suggested-tier {
  color: var(--text-secondary);
}

.suggested-tier strong {
  color: var(--accent-primary);
  font-size: 1.3rem;
}

/* ===== EVENT CONTEXT ===== */
.event-context {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.event-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.event-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.event-field label {
  font-weight: 500;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.event-field select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Event Display (Public Mode) */
.event-display {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.event-display-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.event-display-label {
  font-weight: 500;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.event-display-value {
  color: var(--text-primary);
  font-size: 1rem;
  padding: 0.5rem 0;
}

.event-display-value:empty::after {
  content: "Not specified";
  color: var(--text-muted);
  font-style: italic;
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .event-display {
    grid-template-columns: 1fr;
  }
}

/* ===== CRITERIA LABELS (HOVERABLE IN ADMIN MODE) ===== */
.admin-mode .criteria-label {
  cursor: help;
  transition: all 0.2s ease;
  border-bottom: 1px dashed transparent;
  padding-bottom: 2px;
}

.admin-mode .criteria-label:hover {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
}

/* Mobile: make clickable appearance obvious */
@media (max-width: 1200px) {
  .admin-mode .criteria-label {
    cursor: pointer;
  }
}

/* ===== COLLAPSIBLE SECTIONS ===== */
.collapsible-section {
  transition: all 0.3s ease;
}

.collapsible-header {
  cursor: pointer;
  user-select: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.collapsible-header:hover {
  color: var(--accent-primary);
}

.toggle-icon {
  transition: transform 0.3s ease;
  font-size: 0.8rem;
}

.collapsible-section.collapsed .toggle-icon {
  transform: rotate(-90deg);
}

.collapsible-section.collapsed .collapsible-content {
  display: none;
}

.collapsible-content {
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    max-height: 0;
  }
  to {
    opacity: 1;
    max-height: 500px;
  }
}

/* ===== CRITERIA TOOLTIP ===== */
.criteria-tooltip {
  position: absolute;
  left: calc(100% + 1.5rem);
  top: 0;
  width: 350px;
  z-index: 5;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease 0.1s, visibility 0.2s ease 0.1s;
}

.criteria-tooltip.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}

.criteria-tooltip-content {
  background: var(--glass-bg);
  backdrop-filter: blur(30px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  height: 100%;
}

.criteria-tooltip-content h4 {
  color: var(--text-primary);
  font-size: 1rem;
  margin-bottom: 1rem;
  font-weight: 500;
}

.criteria-tooltip-content .rating-level {
  padding: 0.75rem 1rem;
  margin: 0.5rem 0;
  background: rgba(255, 255, 255, 0.03);
  border-left: 3px solid var(--accent-primary);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Mobile: show below on smaller screens */
@media (max-width: 1200px) {
  .criteria-tooltip {
    position: fixed;
    left: 50%;
    top: auto;
    bottom: 2rem;
    transform: translateX(-50%);
    width: calc(100% - 3rem);
    max-width: 500px;
    z-index: 10000;
  }

  .criteria-tooltip-content {
    height: auto;
  }
}

@media (max-width: 768px) {
  .criteria-tooltip {
    bottom: 1rem;
    width: calc(100% - 2rem);
  }

  .criteria-tooltip-content {
    padding: 1.25rem;
  }

  .criteria-tooltip-content h4 {
    font-size: 0.95rem;
  }

  .criteria-tooltip-content .rating-level {
    font-size: 0.9rem;
    padding: 0.65rem 0.85rem;
  }
}

/* ===== CONFIRMATION POPUP ===== */
.confirm-popup {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  animation: fadeIn 0.2s ease;
}

.confirm-popup.active {
  display: flex;
}

.confirm-content {
  background: var(--glass-bg);
  backdrop-filter: blur(30px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 2rem;
  max-width: 400px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: slideUp 0.3s ease;
}

.confirm-content p {
  color: var(--text-primary);
  font-size: 1rem;
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

.confirm-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}

.confirm-actions .glass-btn {
  min-width: 100px;
}

.confirm-actions .glass-btn.primary {
  background: rgba(239, 68, 68, 0.8);
  border-color: rgba(239, 68, 68, 0.5);
}

.confirm-actions .glass-btn.primary:hover {
  background: rgba(220, 38, 38, 0.9);
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.5);
}

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

/* ===== PERFORMANCE BONUSES & PENALTIES ===== */
.performance-bonuses,
.performance-penalties {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.performance-bonuses h3 {
  color: #4ade80;
}

.performance-penalties h3 {
  color: #f87171;
}

.bonus-checkboxes,
.penalty-checkboxes {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 1rem 0;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.checkbox-label:hover {
  background: rgba(255, 255, 255, 0.06);
}

.checkbox-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--accent-primary);
}

.checkbox-label span {
  color: var(--text-primary);
  font-size: 0.95rem;
}

.bonus-total,
.penalty-total {
  padding-top: 1rem;
  border-top: 1px solid var(--glass-border);
  font-size: 1rem;
}

.bonus-total {
  color: #4ade80;
}

.penalty-total {
  color: #f87171;
}

/* ===== FINAL SCORE ===== */
.final-score {
  background: linear-gradient(
    135deg,
    rgba(138, 180, 248, 0.1),
    rgba(138, 180, 248, 0.05)
  );
  border: 2px solid var(--accent-primary);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.score-breakdown {
  display: flex;
  justify-content: space-around;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--glass-border);
}

.score-breakdown div {
  text-align: center;
  color: var(--text-secondary);
}

.score-breakdown span {
  color: var(--text-primary);
  font-weight: 600;
}

.total-final {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.total-final strong {
  color: var(--accent-primary);
}

#applyTierBtn {
  width: 100%;
  margin-top: 0.5rem;
}

/* ===== MEDIA SECTIONS ===== */
.notes-section textarea {
  min-height: 150px;
  resize: vertical;
}

.media-upload {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.upload-btn {
  width: 100%;
  justify-content: center;
}

.media-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.media-preview img,
.media-preview video {
  width: 100%;
  height: 100px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
}

/* ===== MEDIA ITEMS WITH REMOVE BUTTONS ===== */
.media-item {
  position: relative;
  display: inline-block;
  width: 100%;
  margin-bottom: 0.5rem;
}

.media-item img,
.media-item video {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  cursor: pointer;
  transition: all 0.3s ease;
  display: block;
}

.media-item img:hover,
.media-item video:hover {
  transform: scale(1.02);
  border-color: var(--accent-primary);
  box-shadow: 0 4px 20px rgba(138, 180, 248, 0.3);
}

/* Video play overlay */
.video-item {
  position: relative;
}

.video-play-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: white;
  pointer-events: none;
  transition: all 0.3s ease;
  border: 3px solid rgba(255, 255, 255, 0.8);
}

.video-item:hover .video-play-overlay {
  background: rgba(0, 0, 0, 0.9);
  transform: translate(-50%, -50%) scale(1.1);
  border-color: var(--accent-primary);
  box-shadow: 0 0 20px rgba(138, 180, 248, 0.5);
}

.remove-media-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 68, 68, 0.9);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
  font-size: 1.2rem;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  line-height: 1;
  padding: 0;
}

.remove-media-btn:hover {
  background: rgba(255, 0, 0, 1);
  transform: scale(1.1);
  border-color: white;
}

/* ===== LOADING STATES ===== */
.media-loading {
  background: var(--glass-bg);
  border: 1px dashed var(--glass-border);
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  margin-bottom: 0.5rem;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto 1rem;
  border: 4px solid rgba(138, 180, 248, 0.2);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.file-size {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

.upload-hint {
  color: var(--accent-primary);
  font-size: 0.9rem;
  margin-top: 0.5rem;
  font-style: italic;
}

/* ===== MEDIA LIGHTBOX ===== */
.media-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.2s ease;
  padding: 2rem;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.lightbox-content {
  position: relative;
  max-width: 95vw;
  max-height: 95vh;
  animation: scaleIn 0.3s ease;
}

@keyframes scaleIn {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.lightbox-content img,
.lightbox-content video {
  max-width: 100%;
  max-height: 90vh;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

.lightbox-close {
  position: absolute;
  top: -50px;
  right: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
}

.lightbox-close:hover {
  background: rgba(255, 68, 68, 0.9);
  transform: scale(1.1);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .dj-detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  .tier-label {
    width: 50px;
    font-size: 1.8rem;
  }

  .tier-drop-zone {
    padding: 0.75rem;
  }

  .glass-modal {
    padding: 1.5rem;
  }

  .dj-detail-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--glass-border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-primary);
}
