/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* Christmas Scavenger Hunt Styles */

:root {
  --christmas-red: #c41e3a;
  --christmas-green: #165b33;
  --christmas-gold: #ffd700;
  --snow-white: #ffffff;
  --night-blue: #1a1a2e;
  --soft-gray: #f5f5f5;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(135deg, var(--christmas-red) 0%, var(--christmas-green) 100%);
  min-height: 100vh;
  padding: 20px;
  color: var(--night-blue);
}

.hunt-container {
  max-width: 800px;
  margin: 0 auto;
  background: var(--snow-white);
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

/* Header */
.hunt-header {
  text-align: center;
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 3px solid var(--christmas-gold);
}

.hunt-header h1 {
  color: var(--christmas-red);
  font-size: 2.5em;
  margin-bottom: 10px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.hunt-dates {
  color: var(--christmas-green);
  font-size: 1.2em;
  font-weight: 600;
}

/* Timeline */
.timeline {
  display: flex;
  justify-content: space-between;
  margin-bottom: 40px;
  padding: 20px 0;
  position: relative;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 35px;
  left: 8%;
  right: 8%;
  height: 3px;
  background: #ddd;
  z-index: 0;
}

.timeline-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.day-circle {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  border: 3px solid var(--snow-white);
  position: relative;
  transition: all 0.3s ease;
}

.timeline-day.completed .day-circle {
  background: var(--christmas-green);
  color: var(--snow-white);
}

.timeline-day.current .day-circle {
  background: linear-gradient(135deg, #8B0000, #c41e3a);
  color: var(--snow-white);
  box-shadow: 0 0 25px rgba(139, 0, 0, 0.8);
  animation: pulse 2s infinite;
  border: 4px solid var(--christmas-gold);
  transform: scale(1.15);
}

.timeline-day.locked .day-circle {
  background: #ccc;
  color: #999;
}

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

.day-circle .checkmark {
  position: absolute;
  font-size: 1.5em;
  color: var(--snow-white);
}

.day-label {
  font-size: 0.85em;
  color: var(--night-blue);
  font-weight: 600;
}

/* Game Content */
.game-content {
  background: var(--soft-gray);
  border-radius: 15px;
  padding: 30px;
  min-height: 400px;
}

/* State Styles */
.state-waiting,
.state-locked,
.state-completed,
.state-active {
  text-align: center;
}

.state-waiting h2,
.state-locked h2,
.state-completed h2 {
  color: var(--christmas-red);
  font-size: 2em;
  margin-bottom: 20px;
}

.state-waiting .countdown-container {
  margin-top: 30px;
}

.state-waiting .countdown-container > p {
  color: var(--christmas-green);
  font-size: 1.1em;
  font-weight: 600;
  margin-bottom: 20px;
}

.state-active .hint-day-badge {
  display: inline-block;
  background: var(--christmas-green);
  color: var(--snow-white);
  padding: 8px 20px;
  border-radius: 20px;
  font-weight: bold;
  margin-bottom: 20px;
}

/* Countdown */
.countdown {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 30px 0;
}

.countdown-segment {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--snow-white);
  padding: 20px;
  border-radius: 10px;
  min-width: 80px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.countdown-value {
  font-size: 2.5em;
  font-weight: bold;
  color: var(--christmas-red);
  line-height: 1;
}

.countdown-label {
  font-size: 0.9em;
  color: var(--night-blue);
  margin-top: 5px;
  text-transform: uppercase;
  font-weight: 600;
}

.unlock-message,
.next-unlock-message {
  color: var(--christmas-green);
  font-size: 1.1em;
  font-weight: 600;
  margin-top: 20px;
}

/* Riddle */
.riddle-container {
  background: var(--snow-white);
  padding: 30px;
  border-radius: 10px;
  margin-bottom: 30px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.riddle-container h2 {
  color: var(--christmas-green);
  margin-bottom: 20px;
  font-size: 1.5em;
}

.riddle-text {
  font-size: 1.2em;
  line-height: 1.8;
  color: var(--night-blue);
  font-style: italic;
  white-space: pre-line;
}

/* Easier Hint */
.easier-hint-container {
  margin-bottom: 30px;
}

.easier-hint {
  background: #fff3cd;
  border: 2px solid var(--christmas-gold);
  padding: 20px;
  border-radius: 10px;
}

.easier-hint h3 {
  color: var(--christmas-green);
  margin-bottom: 10px;
}

.easier-hint p {
  color: var(--night-blue);
  font-size: 1.1em;
  line-height: 1.6;
}

.easier-hint-timer {
  background: var(--snow-white);
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.easier-hint-timer p {
  color: var(--night-blue);
  margin-bottom: 15px;
  font-size: 1.1em;
}

.hint-countdown {
  font-size: 1.8em;
  font-weight: bold;
  color: var(--christmas-red);
}

/* Code Entry */
.code-entry-container {
  background: var(--snow-white);
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.code-entry-container h3 {
  color: var(--christmas-green);
  margin-bottom: 20px;
  font-size: 1.3em;
}

.code-input-wrapper {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.code-input {
  flex: 1;
  padding: 15px 20px;
  font-size: 1.2em;
  border: 2px solid #ddd;
  border-radius: 10px;
  text-transform: uppercase;
  font-weight: bold;
  transition: border-color 0.3s ease;
}

.code-input:focus {
  outline: none;
  border-color: var(--christmas-gold);
}

.code-submit-btn {
  padding: 15px 40px;
  background: var(--christmas-green);
  color: var(--snow-white);
  border: none;
  border-radius: 10px;
  font-size: 1.2em;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
}

.code-submit-btn:hover {
  background: var(--christmas-red);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.code-message {
  padding: 15px;
  border-radius: 10px;
  font-weight: 600;
  text-align: center;
  margin-top: 15px;
}

.code-message.success {
  background: #d4edda;
  color: #155724;
  border: 2px solid #c3e6cb;
}

.code-message.error {
  background: #f8d7da;
  color: #721c24;
  border: 2px solid #f5c6cb;
}

/* Success State */
.success-message {
  font-size: 1.3em;
  color: var(--christmas-green);
  margin: 20px 0;
}

.next-day-info h3 {
  color: var(--christmas-red);
  font-size: 1.5em;
  margin: 30px 0 20px 0;
}

.next-day-info .countdown-intro {
  color: var(--christmas-green);
  font-size: 1.2em;
  font-weight: 600;
  margin-bottom: 20px;
}

.next-day-info {
  margin-top: 30px;
}

.final-message {
  margin-top: 30px;
  padding: 30px;
  background: linear-gradient(135deg, var(--christmas-red), var(--christmas-green));
  color: var(--snow-white);
  border-radius: 15px;
}

.final-message h3 {
  font-size: 2em;
  margin-bottom: 15px;
}

.final-message p {
  font-size: 1.2em;
  margin: 10px 0;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .hunt-container {
    padding: 20px;
  }

  .hunt-header h1 {
    font-size: 1.8em;
  }

  .timeline {
    padding: 15px 0;
  }

  .timeline::before {
    left: 5%;
    right: 5%;
  }

  .day-circle {
    width: 40px;
    height: 40px;
    font-size: 0.9em;
  }

  .day-label {
    font-size: 0.75em;
  }

  .countdown {
    gap: 10px;
  }

  .countdown-segment {
    padding: 15px 10px;
    min-width: 60px;
  }

  .countdown-value {
    font-size: 2em;
  }

  .riddle-text {
    font-size: 1.1em;
  }

  .code-input-wrapper {
    flex-direction: column;
  }

  .code-submit-btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  body {
    padding: 10px;
  }

  .hunt-header h1 {
    font-size: 1.5em;
  }

  .hunt-dates {
    font-size: 1em;
  }

  .day-circle {
    width: 35px;
    height: 35px;
    font-size: 0.8em;
  }

  .game-content {
    padding: 20px;
  }

  .countdown-value {
    font-size: 1.5em;
  }

  .countdown-label {
    font-size: 0.75em;
  }
}

