/* Oscars Trivia Game - Main Styles */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --gold: #ffd700;
  --gold-dark: #c5a000;
  --gold-light: #ffe870;
  --black: #0a0a0a;
  --gray-dark: #18181b;
  --gray-medium: #27272a;
  --gray-light: #a1a1aa;
  --white: #fafafa;
  --red: #ef4444;
  --green: #22c55e;
  --blue: #3b82f6;
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 25px -3px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 20px 40px -5px rgba(0, 0, 0, 0.6);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: radial-gradient(ellipse at top, #1a1a1a 0%, #0a0a0a 100%);
  color: var(--white);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header */
.header {
  text-align: center;
  padding: 3rem 1rem 2.5rem;
  background: linear-gradient(180deg, rgba(26, 26, 26, 0.8) 0%, transparent 100%);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 215, 0, 0.1);
}

.header h1 {
  font-size: 3rem;
  font-weight: 700;
  color: var(--gold);
  text-shadow: 0 2px 20px rgba(255, 215, 0, 0.4);
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.tagline {
  color: var(--gray-light);
  font-size: 1.15rem;
  font-weight: 400;
  letter-spacing: 0.01em;
}

/* Main Content */
.main-content {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem 1rem;
}

/* Screens */
.screen {
  display: none;
  width: 100%;
  max-width: 800px;
  animation: fadeIn 0.5s ease-in;
}

.screen.active {
  display: block;
}

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

/* Cards */
.card {
  background: linear-gradient(135deg, rgba(39, 39, 42, 0.95) 0%, rgba(24, 24, 27, 0.95) 100%);
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow: var(--shadow-xl);
  border: 1px solid rgba(255, 215, 0, 0.15);
  backdrop-filter: blur(20px);
}

.card h2 {
  color: var(--gold);
  margin-bottom: 2rem;
  font-size: 2rem;
  font-weight: 600;
  text-align: center;
  letter-spacing: -0.01em;
}

/* Form Elements */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--gold-light);
  font-weight: 600;
}

.form-group select {
  width: 100%;
  padding: 0.875rem 1rem;
  border-radius: 10px;
  border: 1.5px solid rgba(255, 215, 0, 0.2);
  background: rgba(24, 24, 27, 0.6);
  color: var(--white);
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all 0.2s ease;
}

.form-group select:hover {
  border-color: rgba(255, 215, 0, 0.4);
  background: rgba(24, 24, 27, 0.8);
}

.form-group select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1);
}

/* Buttons */
.btn {
  padding: 0.875rem 2.25rem;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: var(--black);
  box-shadow: 0 4px 14px rgba(255, 215, 0, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255, 215, 0, 0.5);
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 100%);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 4px 14px rgba(255, 215, 0, 0.4);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Make Start Quiz button bigger (15% larger) */
#start-button {
  font-size: 1.15rem;
  padding: 1rem 2.6rem;
  font-weight: 700;
  margin-top: 0.5rem;
}

.btn-secondary {
  background: var(--gray-medium);
  color: var(--gold);
  border: 2px solid var(--gold-dark);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  margin-top: 1rem;
}

.btn-secondary:hover {
  background: var(--gray-dark);
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(255, 215, 0, 0.3);
}

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

/* Progress Bar */
.progress-bar {
  position: relative;
  width: 100%;
  height: 8px;
  background: rgba(24, 24, 27, 0.6);
  border-radius: 999px;
  margin-bottom: 2rem;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold), var(--gold-light));
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 999px;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.progress-text {
  display: block;
  text-align: center;
  margin-top: 0.75rem;
  margin-bottom: 0.5rem;
  color: var(--gray-light);
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
}

/* Quiz Card */
.quiz-card {
  position: relative;
  min-height: 400px;
}

.question-text {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--white);
}

.question-meta {
  color: var(--gray-light);
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

/* Multiple Choice Options */
.options-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 2rem;
}

.option-btn {
  padding: 1.25rem 1.5rem;
  background: rgba(24, 24, 27, 0.6);
  border: 1.5px solid rgba(255, 215, 0, 0.2);
  border-radius: 12px;
  color: var(--white);
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  line-height: 1.6;
  word-spacing: 0.1em;
  backdrop-filter: blur(10px);
}

.option-btn:hover:not(:disabled) {
  background: rgba(39, 39, 42, 0.8);
  border-color: rgba(255, 215, 0, 0.5);
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.2);
}

.option-btn.selected {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.2) 0%, rgba(197, 160, 0, 0.2) 100%);
  border-color: var(--gold);
  color: var(--gold-light);
  box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1);
}

.option-btn:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

/* Open Form Input */
.open-form-container {
  margin-top: 2rem;
}

.answer-input {
  width: 100%;
  padding: 1rem 1.25rem;
  border: 1.5px solid rgba(255, 215, 0, 0.2);
  border-radius: 12px;
  background: rgba(24, 24, 27, 0.6);
  color: var(--white);
  font-size: 1.1rem;
  font-family: 'Inter', sans-serif;
  margin-bottom: 1rem;
  transition: all 0.2s ease;
}

.answer-input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1);
  background: rgba(24, 24, 27, 0.8);
}

.answer-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Feedback */
.feedback-container {
  animation: slideIn 0.5s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.feedback-message {
  margin-bottom: 2rem;
}

.feedback-correct h3 {
  color: var(--green);
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

.feedback-incorrect h3 {
  color: var(--red);
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

.film-info {
  color: var(--gray-light);
  font-style: italic;
  margin-top: 0.5rem;
}

.similarity-note {
  color: var(--blue);
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

/* Image Container */
.image-container {
  display: flex;
  justify-content: center;
  margin: 2rem 0;
}

/* Score Display */
.score-display {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 1.3rem;
  color: var(--gold);
  font-weight: 600;
}

/* Results Screen */
.results-card {
  text-align: center;
}

.final-score {
  margin: 2rem 0;
}

.score-label {
  font-size: 1.2rem;
  color: var(--gray-light);
  margin-bottom: 0.5rem;
}

.score-value {
  font-size: 3rem;
  color: var(--gold);
  font-weight: 700;
  margin: 1rem 0;
}

.percentage {
  font-size: 2rem;
  color: var(--gold-light);
  font-weight: 600;
}

.performance-message {
  font-size: 1.3rem;
  margin: 2rem 0;
  padding: 1.5rem;
  background: var(--gray-dark);
  border-radius: 8px;
  border: 2px solid var(--gold-dark);
}

/* Loading Screen */
.loading-screen {
  text-align: center;
}

.spinner {
  width: 60px;
  height: 60px;
  border: 6px solid var(--gray-dark);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

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

/* Utility Classes */
.hidden {
  display: none !important;
}

/* Footer */
.footer {
  text-align: center;
  padding: 2rem 1.5rem;
  background: linear-gradient(180deg, transparent 0%, rgba(24, 24, 27, 0.6) 100%);
  color: var(--gray-light);
  font-size: 0.95rem;
  border-top: 1px solid rgba(255, 215, 0, 0.1);
  backdrop-filter: blur(10px);
}

/* Responsive Design */
@media (max-width: 768px) {
  .header h1 {
    font-size: 2rem;
  }

  .tagline {
    font-size: 1rem;
  }

  .card {
    padding: 1.5rem;
  }

  .question-text {
    font-size: 1.2rem;
  }

  .score-value {
    font-size: 2.5rem;
  }
}

@media (max-width: 480px) {
  .header h1 {
    font-size: 1.5rem;
  }

  .card {
    padding: 1rem;
  }

  .btn {
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
  }
}

/* Archive Screen Styles */
.archive-card {
  max-width: 1200px;
  width: 100%;
}

.archive-filters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}

.archive-content {
  max-height: 600px;
  overflow-y: auto;
  padding: 1rem;
  background: var(--gray-dark);
  border-radius: 8px;
  margin-bottom: 2rem;
}

.year-section {
  margin-bottom: 3rem;
}

.year-heading {
  color: var(--gold);
  font-size: 1.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--gold-dark);
}

.winners-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

.winner-card {
  background: var(--gray-medium);
  padding: 1rem;
  border-radius: 6px;
  border-left: 4px solid var(--gold);
  transition: transform 0.2s, box-shadow 0.2s;
}

.winner-card:hover {
  transform: translateX(5px);
  box-shadow: 0 4px 10px rgba(255, 215, 0, 0.2);
}

.winner-category {
  font-size: 0.85rem;
  color: var(--gray-light);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.winner-name {
  color: var(--white);
  font-size: 1.1rem;
  font-weight: 500;
}

.film-name {
  color: var(--gold-light);
  font-style: italic;
  font-size: 0.95rem;
}

.loading-text,
.no-results,
.error-text {
  text-align: center;
  color: var(--gray-light);
  padding: 2rem;
  font-size: 1.1rem;
}

.error-text {
  color: var(--red);
}

/* Archive responsive */
@media (max-width: 768px) {
  .archive-filters {
    grid-template-columns: 1fr;
  }

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

  .archive-content {
    max-height: 500px;
  }
}

/* Updated Archive Table Styles */
.archive-summary {
  text-align: center;
  color: var(--gold-light);
  font-size: 1.1rem;
  margin-bottom: 2rem;
  padding: 1rem;
  background: var(--gray-medium);
  border-radius: 6px;
}

.winners-table {
  background: var(--gray-medium);
  border-radius: 8px;
  overflow: hidden;
}

.winner-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 1rem;
  padding: 1rem;
  border-bottom: 1px solid var(--gray-dark);
  transition: background 0.2s;
}

.winner-row:last-child {
  border-bottom: none;
}

.winner-row:hover {
  background: var(--gray-dark);
}

.category-label {
  color: var(--gold);
  font-weight: 600;
  font-size: 0.95rem;
}

.winner-info {
  color: var(--white);
  font-size: 1rem;
}

.winner-name {
  font-weight: 500;
}

/* Archive table responsive */
@media (max-width: 768px) {
  .winner-row {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .category-label {
    font-size: 0.85rem;
  }
}
