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

option {
    background-color: #16213e;
}

/* User badge in top right corner */
.user-badge {
  position: fixed;
  top: 1rem;
  right: 1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(15, 17, 34, 0.9);
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  z-index: 150;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.user-avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #333;
  font-size: 1rem;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.user-name {
  font-size: 0.87rem;
  color: #fff;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.user-menu-toggle {
  display: none;
}

.user-menu {
  position: fixed;
}

.user-menu-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  background: rgba(15, 17, 34, 0.95);
  border-radius: 0.75rem;
  padding: 0.5rem;
  min-width: 160px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-5px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.user-menu.open .user-menu-dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.user-menu-dropdown form {
  margin: 0;
}

.user-menu-dropdown button {
  width: 100%;
  padding: 0.6rem 0.75rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 0.9rem;
  text-align: left;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

.user-menu-dropdown button:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* Logo in top left corner */
.logo-link {
  position: fixed;
  top: 1rem;
  left: 1rem;
  text-decoration: none;
  z-index: 100;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 2px 10px rgba(29, 185, 84, 0.5);
}

.logo-icon {
  font-size: 2rem;
  animation: pulse 2s ease-in-out infinite;
}

.logo-text {
  background: linear-gradient(135deg, #159141 0%, #1ed760 50%, #fff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.logo-link:hover .logo-icon {
  animation: bounce 0.5s ease;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* Main logo on start page */
.main-logo {
  font-size: 3rem;
  text-shadow: 0 4px 20px rgba(29, 185, 84, 0.4);
  margin-bottom: 2.5rem;
}

.main-logo .logo-icon {
  font-size: 3rem;
}

.main-logo .logo-text {
  font-size: 3rem;
}

/* Page title with top margin for logo space */
.page-title {
  margin-top: 2rem;
}

/* Screens with logo need extra top padding */
.host-screen,
.game-screen {
  padding-top: 4rem;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: #fff;
  min-height: 100vh;
}

.container {
  max-width: 480px;
  margin: 0 auto;
  padding: 5rem 1rem 2rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
}

.site-footer {
  position: fixed;
  bottom: 1rem;
  left: 0;
  right: 0;
  text-align: center;
  padding: 0.5rem;
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.subtitle {
  color: #aaa;
  margin-bottom: 2rem;
}

.btn {
  margin: 5px;
  display: inline-block;
  padding: 1rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, opacity 0.2s;
}

.btn:hover {
  transform: scale(1.05);
}

.btn:active {
  transform: scale(0.98);
}

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

.btn-spotify {
  background: #159141;
  color: #fff;
}

.btn-secondary {
  background: rgba(255,255,255,0.1);
  color: #fff;
  margin-top: 1rem;
}

.info {
  color: #b0b0b0;
  font-size: 0.85rem;
  margin-top: 1rem;
}

/* Action groups for start page */
.action-group {
  margin-bottom: 1.5rem;
}

.btn-large {
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
}

.hint {
  color: #888;
  font-size: 0.8rem;
  margin-top: 0.5rem;
}

.link-subtle {
  color: #888;
  font-size: 0.9rem;
  text-decoration: none;
  margin-top: 1rem;
  display: inline-block;
}

.link-subtle:hover {
  color: #b0b0b0;
}

/* About and FAQ pages */
.page-content {
  max-width: 700px;
  margin: 0 auto;
  text-align: left;
  color: #ccc;
  line-height: 1.6;
}

.page-content h2 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: #fff;
}

.page-content h3 {
  color: #1DB954;
  margin-bottom: 0.5rem;
}

.page-content section {
  margin-bottom: 2.5rem;
}

.page-content ul,
.page-content ol {
  margin-left: 1.5rem;
  margin-top: 0.5rem;
}

.page-content li {
  margin-bottom: 0.5rem;
}

.page-content a {
  color: #1DB954;
  text-decoration: none;
}

.page-content a:hover {
  text-decoration: underline;
}

.page-footer {
  text-align: center;
  margin-top: 3rem;
}

.main-logo-link {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

/* Categories */
.category-list {
  width: 100%;
  margin-bottom: 1rem;
}

.category-card {
  display: block;
  background: rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 0.75rem;
  text-decoration: none;
  color: #fff;
  text-align: left;
  transition: background 0.2s;
}

.category-card:hover {
  background: rgba(255,255,255,0.15);
}

.category-card h2 {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

.category-card p {
  color: #aaa;
  font-size: 0.9rem;
}

/* Countdown */
.countdown-screen .instruction {
  font-size: 1.25rem;
  color: #aaa;
  margin-bottom: 2rem;
}

.countdown {
  font-size: 6rem;
  font-weight: bold;
  color: #159141;
}

/* Game */
.game-screen {
  justify-content: flex-start;
  padding-top: 4rem;
}

.state {
  width: 100%;
}

.hidden {
  display: none !important;
}

/* Music animation */
.music-animation {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  height: 60px;
  gap: 6px;
  margin: 2rem 0;
}

.music-animation span {
  width: 8px;
  background: #159141;
  border-radius: 4px;
  animation: bounce 1s ease-in-out infinite;
}

.music-animation span:nth-child(1) { height: 20px; animation-delay: 0s; }
.music-animation span:nth-child(2) { height: 40px; animation-delay: 0.1s; }
.music-animation span:nth-child(3) { height: 30px; animation-delay: 0.2s; }
.music-animation span:nth-child(4) { height: 50px; animation-delay: 0.3s; }

@keyframes bounce {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(1.5); }
}

#timer {
  font-size: 3rem;
  font-weight: bold;
  color: #159141;
}

/* Guess */
#year-input {
  width: 100%;
  max-width: 200px;
  padding: 1rem;
  font-size: 1.5rem;
  text-align: center;
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: 12px;
  background: rgba(255,255,255,0.05);
  color: #fff;
  margin: 1.5rem 0;
}

#year-input:focus {
  outline: none;
  border-color: #159141;
}

/* Answer */
#result-icon {
  font-size: 4rem;
  margin-bottom: 0.5rem;
}

.track-info {
  background: rgba(255,255,255,0.05);
  border-radius: 16px;
  padding: 1.5rem;
  margin: 1.5rem 0;
}

#album-cover {
  width: 120px;
  height: 120px;
  border-radius: 8px;
  margin-bottom: 1rem;
  object-fit: cover;
}

#track-name {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

#track-artist {
  color: #aaa;
  margin-bottom: 1rem;
}

.year {
  font-size: 1.1rem;
}

.year strong {
  color: #159141;
  font-size: 1.5rem;
}

#guess-result {
  color: #aaa;
  margin-top: 0.5rem;
}

/* Results */
.results-screen {
  justify-content: flex-start;
  padding-top: 2rem;
}

.results-screen h1 {
  margin-bottom: 1.5rem;
}

.empty-state {
  color: #aaa;
  margin: 2rem 0;
}

.stats {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.stat {
  background: rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 1rem 1.5rem;
  text-align: center;
}

.stat-value {
  display: block;
  font-size: 2rem;
  font-weight: bold;
  color: #159141;
}

.stat-label {
  font-size: 0.85rem;
  color: #aaa;
}

.results-list {
  width: 100%;
  margin-bottom: 1.5rem;
}

.result-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(255,255,255,0.05);
  border-radius: 12px;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  text-align: left;
  border-left: 4px solid #666;
}

.result-card.correct {
  border-left-color: #159141;
}

.result-card.close {
  border-left-color: #f0a500;
}

.result-album {
  width: 50px;
  height: 50px;
  border-radius: 6px;
  object-fit: cover;
}

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

.result-info h3 {
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.result-artist {
  font-size: 0.8rem;
  color: #aaa;
  margin-bottom: 0.25rem;
}

.result-years {
  display: flex;
  gap: 0.75rem;
  font-size: 0.8rem;
  align-items: center;
}

.correct-year strong,
.guessed-year strong {
  color: #fff;
}

.diff-badge {
  background: rgba(255,255,255,0.1);
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
  font-size: 0.75rem;
}

.diff-badge.perfect {
  background: #159141;
  color: #fff;
}

.btn-danger {
  background: #e74c3c;
  color: #fff;
  margin-top: 0.5rem;
}

/* Compact results list */
.results-list.compact {
  width: 100%;
  margin-bottom: 1rem;
}

.result-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255,255,255,0.05);
  border-radius: 8px;
  padding: 0.5rem;
  margin-bottom: 0.35rem;
  border-left: 3px solid #666;
}

.result-row.correct {
  border-left-color: #159141;
}

.result-row.close {
  border-left-color: #f0a500;
}

.play-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: #159141;
  color: #fff;
  font-size: 0.9rem;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.play-btn:hover {
  background: #1ed760;
}

.result-thumb {
  width: 36px;
  height: 36px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
}

.result-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  text-align: left;
}

.result-title {
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.result-artist-small {
  font-size: 0.7rem;
  color: #aaa;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.result-score {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex-shrink: 0;
  min-width: 45px;
}

.year-correct {
  font-size: 0.9rem;
  font-weight: bold;
  color: #159141;
}

.diff-small {
  font-size: 0.7rem;
  color: #aaa;
}

.diff-small.perfect {
  color: #159141;
  font-weight: bold;
}

/* ============ MULTIPLAYER STYLES ============ */

/* Forms */
.create-form,
.join-form {
  width: 100%;
  max-width: 320px;
}

.form-group {
  margin-bottom: 1rem;
  text-align: left;
}

.form-group label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
  color: #aaa;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 0.75rem;
  font-size: 1rem;
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
  color: #fff;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #159141;
}

.form-row {
  display: flex;
  gap: 1rem;
}

.form-row .form-group {
  flex: 1;
}

.device-input-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.device-input-row select {
  flex: 1;
}

.icon-btn {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s, border-color 0.2s;
}

.icon-btn:hover {
  transform: scale(1.05);
  background: rgba(29, 185, 84, 0.2);
  border-color: #1ed760;
}

.icon-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.form-hint {
  display: inline-block;
  margin-top: 0.35rem;
  font-size: 0.85rem;
  color: #888;
}

.form-hint.success {
  color: #1ed760;
}

.form-hint.error {
  color: #ff7676;
}

.error-msg {
  color: #e74c3c;
  margin-bottom: 1rem;
}

/* Host screen */
.host-screen {
  justify-content: flex-start;
  padding-top: 2rem;
}

.game-code-box {
  margin: 1.5rem 0;
}

.game-code-box p {
  color: #aaa;
  font-size: 0.9rem;
}

.game-code {
  font-size: 4rem;
  font-weight: bold;
  letter-spacing: 0.5rem;
  color: #159141;
}

.qr-box {
  margin-bottom: 1.5rem;
}

.qr-code {
  width: 150px;
  height: 150px;
  border-radius: 8px;
}

.join-url {
  font-size: 0.75rem;
  color: #aaa;
  word-break: break-all;
  margin: 0.5rem 0;
}

.btn-small {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

.players-box {
  width: 100%;
  margin-bottom: 1.5rem;
}

.players-box h3 {
  margin-bottom: 0.75rem;
}

.player-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.player-chip {
  background: rgba(255,255,255,0.1);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
}

/* Player screen */
.player-screen {
  justify-content: flex-start;
  padding-top: 5rem;
}

.waiting-box {
  margin: 2rem 0;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255,255,255,0.1);
  border-top-color: #159141;
  border-radius: 50%;
  margin: 0 auto 1rem;
  animation: spin 1s linear infinite;
}

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

.player-name {
  font-size: 1.25rem;
  color: #159141;
  margin-top: 1rem;
}

/* Round info */
.round-info {
  display: flex;
  justify-content: flex-end;
  width: 100%;
  margin-bottom: 1.5rem;
  margin-top: 3em;
  font-size: 0.9rem;
  color: #aaa;
}

.timer {
  color: #159141;
  font-weight: bold;
}

/* Guess form */
.guess-form {
  width: 100%;
}

.guess-form h2 {
  margin-bottom: 1rem;
}

.guess-form input {
  width: 100%;
  max-width: 200px;
  padding: 1rem;
  font-size: 2rem;
  text-align: center;
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: 12px;
  background: rgba(255,255,255,0.05);
  color: #fff;
  margin-bottom: 1rem;
}

.btn-large {
  padding: 1.25rem 3rem;
  font-size: 1.25rem;
}

.guess-sent {
  text-align: center;
}

.check-icon {
  font-size: 4rem;
  color: #159141;
}

.guess-display {
  font-size: 2rem;
  font-weight: bold;
  color: #159141;
}

/* Guess progress */
.guess-progress {
  font-size: 1.1rem;
  margin: 1.5rem 0;
  color: #aaa;
}

/* Track reveal */
.track-reveal {
  margin: 1.5rem 0;
}

.reveal-album {
  width: 120px;
  height: 120px;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.reveal-year strong {
  color: #159141;
  font-size: 1.5rem;
}

/* Round results */
.round-results {
  width: 100%;
  margin: 1rem 0;
}

.round-results .result-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
}

.result-rank {
  width: 24px;
  font-weight: bold;
  color: #aaa;
}

.result-name {
  flex: 1;
  text-align: left;
}

.result-guess {
  color: #aaa;
}

.result-points {
  color: #159141;
  font-weight: bold;
}

/* My result */
.my-result {
  background: rgba(255,255,255,0.05);
  border-radius: 12px;
  padding: 1rem;
  margin: 1rem 0;
}

.my-guess strong {
  color: #fff;
}

.my-diff {
  font-size: 1.25rem;
  margin: 0.5rem 0;
}

.my-points {
  color: #159141;
  font-size: 1.5rem;
  font-weight: bold;
}

.my-rank {
  color: #aaa;
  font-size: 0.9rem;
}

.waiting-next {
  color: #aaa;
  font-size: 0.9rem;
}

/* Leaderboard */
.leaderboard {
  width: 100%;
  margin: 1rem 0;
}

.leaderboard-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: rgba(255,255,255,0.05);
  border-radius: 8px;
  margin-bottom: 0.5rem;
}

.leaderboard-row.winner {
  background: rgba(29, 185, 84, 0.2);
  border: 2px solid #159141;
}

.leaderboard-row.me {
  border: 2px solid #fff;
}

.lb-rank {
  width: 30px;
  font-size: 1.25rem;
}

.lb-name {
  flex: 1;
  text-align: left;
  font-weight: 500;
}

.lb-score {
  font-weight: bold;
  color: #159141;
}

.my-final-rank {
  margin: 1rem 0;
  font-size: 1.1rem;
}

.my-final-rank strong {
  color: #159141;
}

/* Device selector */
.device-list {
  width: 100%;
  margin: 1rem 0;
}

.device-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  background: rgba(255,255,255,0.08);
  border: 2px solid transparent;
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 0.75rem;
  color: #fff;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s;
}

.device-card:hover {
  background: rgba(255,255,255,0.15);
}

.device-card.device-active {
  border-color: #159141;
}

.device-card.device-selected {
  background: rgba(29, 185, 84, 0.2);
}

.device-icon {
  font-size: 2rem;
}

.device-name {
  flex: 1;
  font-weight: 600;
}

.device-status {
  font-size: 0.75rem;
  color: #159141;
  background: rgba(29, 185, 84, 0.2);
  padding: 0.25rem 0.5rem;
  border-radius: 1rem;
}

.loading-spinner {
  text-align: center;
  padding: 2rem;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255,255,255,0.2);
  border-top-color: #159141;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

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

.device-dropdown {
  width: 100%;
  padding: 1rem;
  font-size: 1rem;
  border-radius: 8px;
  border: 2px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.1);
  color: #fff;
  margin-bottom: 0.5rem;
}

.device-dropdown option {
  background: #1a1a1a;
  color: #fff;
}

.btn-link {
  background: none;
  border: none;
  color: #159141;
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0.5rem;
  text-decoration: underline;
}

.btn-link:hover {
  color: #1ed760;
}

div#gameend-state {
    padding-top: 4rem;
}

/* Score info button */
.score-info-btn {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: #aaa;
  font-size: 1.2rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s;
}

.score-info-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background: #1a1a2e;
  border-radius: 1rem;
  padding: 2rem;
  max-width: 400px;
  width: 90%;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-close {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  background: none;
  border: none;
  color: #888;
  font-size: 1.5rem;
  cursor: pointer;
}

.modal-close:hover {
  color: #fff;
}

.modal-content h3 {
  margin-bottom: 1rem;
  color: #159141;
}

.score-formula {
  background: rgba(21, 145, 65, 0.2);
  padding: 1rem;
  border-radius: 0.5rem;
  font-family: monospace;
  font-size: 1rem;
  text-align: center;
  margin-bottom: 1rem;
  color: #fff;
}

.score-examples {
  list-style: none;
  font-size: 0.9rem;
}

.score-examples li {
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.score-examples li:last-child {
  border-bottom: none;
}

div#roundend-state {
    padding-top: 3rem;
}

/* ===== DISPLAY MODE ===== */
.display-body {
  background: radial-gradient(circle at top, rgba(29,185,84,0.25), transparent 45%), #0d1024;
  color: #fff;
  min-height: 100vh;
  font-family: 'Montserrat', 'Segoe UI', sans-serif;
}

.display-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 3rem 1rem;
}

.display-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.display-logo {
  gap: 0.4rem;
  font-size: 2rem;
}

.display-logo .logo-text {
  font-size: 1.8rem;
}

.display-title {
  font-size: 3rem;
  letter-spacing: 0.05em;
}

.display-label {
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  color: #80ffd2;
}

.display-code-block {
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 1.25rem;
  padding: 1rem 2rem;
  background: rgba(9,12,28,0.6);
  text-align: center;
}

.display-game-code {
  font-size: clamp(3rem, 5vw, 5rem);
  font-weight: 700;
  letter-spacing: 0.4em;
  color: #1ed760;
}

.display-container {
  padding: 1rem 3rem 3rem;
}

.display-connection {
  text-align: center;
  margin-bottom: 1rem;
  color: #ffb347;
}

.display-section {
  margin-bottom: 2rem;
}

.display-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1.5rem;
  width: 100%;
}

.display-card {
  background: rgba(11, 13, 30, 0.85);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 1.5rem;
  padding: 1.5rem;
  box-shadow: 0 25px 50px rgba(0,0,0,0.45);
}

.display-card.focus {
  border-color: rgba(29,185,84,0.4);
  box-shadow: 0 15px 45px rgba(29,185,84,0.25);
}

.display-card.compact {
  width: 240px;
}

.display-card.small {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 1rem;
}

.display-card.small.dimmed {
  opacity: 0.45;
}

.display-qr-img {
  width: 220px;
  height: 220px;
  margin: 0 auto 1rem;
  border-radius: 1rem;
  background: #fff;
}

.display-join-options {
  list-style: decimal;
  padding-left: 1.8rem;
  font-size: 1.2rem;
  line-height: 1.6;
  color: #d7e0ff;
}

.display-join-options li + li {
  margin-top: 0.75rem;
}

.display-url {
  font-weight: 600;
  font-size: 1.3rem;
  color: #fff;
  word-break: break-all;
}

.display-join-url {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  word-break: break-all;
}

.display-hint {
  color: #b5c7ff;
  margin-top: 0.5rem;
}

.display-player-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.display-chip {
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
}

.display-chip.disconnected {
  opacity: 0.4;
}

.display-playing-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.display-player-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
}

.display-chip-icon {
  font-size: 1.5rem;
}

.display-status-icon {
  font-size: 1.35rem;
  margin-right: 0.5rem;
  line-height: 1;
}

.display-status-icon.status-active {
  color: #60a5fa;
  text-shadow: 0 0 10px rgba(96,165,250,0.6);
}

.display-status-icon.status-answered {
  color: #34d399;
  text-shadow: 0 0 12px rgba(52,211,153,0.75);
}

.display-status-icon.status-offline {
  color: #f87171;
  opacity: 0.5;
}

.display-player-name {
  font-size: 1.1rem;
  font-weight: 600;
}

.display-progress {
  width: 100%;
  height: 6px;
  background: rgba(255,255,255,0.1);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 0.5rem;
}

.display-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #1db954, #1ed760);
}

.display-reveal-cover {
  width: 260px;
  height: 260px;
  object-fit: cover;
  border-radius: 1.5rem;
  margin: 1rem auto;
  display: block;
}

.display-sub {
  color: #a6b4d0;
  margin-bottom: 0.5rem;
}

.display-correct-year {
  font-size: 1.2rem;
  color: #80ffd2;
}

.display-results {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.display-result-row {
  display: grid;
  grid-template-columns: 60px 1fr 100px 100px;
  align-items: center;
  padding: 0.85rem 1rem;
  background: rgba(255,255,255,0.05);
  border-radius: 1rem;
}

.display-result-row .rank {
  font-size: 1.3rem;
}

.display-result-row .points {
  text-align: right;
  font-weight: 600;
  color: #1ed760;
}

.display-result-row.perfect {
  background: rgba(29,185,84,0.18);
  border: 1px solid rgba(29,185,84,0.5);
}

.display-footer {
  display: flex;
  justify-content: center;
  padding: 1rem 0 2rem;
  color: #94a3ff;
}

@media (min-width: 1200px) {
  .display-body {
    font-size: 1.25rem;
  }

  .display-card {
    padding: 2.25rem;
  }

  .display-player-name {
    font-size: 1.3rem;
  }

  .display-qr-img {
    width: 280px;
    height: 280px;
  }
}