/* Import Google Font first */
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

/* Base styles */
@font-face {
  font-family: 'BTTF';
  src: url('BTTF.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
    font-family: "Back to the Future 2002";
    src:
      url("https://manzdev.github.io/twitch-delorean-css/fonts/bttf.woff2") format("woff2"),
      url("https://manzdev.github.io/twitch-delorean-css/fonts/bttf.woff") format("woff"),
      url("https://manzdev.github.io/twitch-delorean-css/fonts/bttf.ttf") format("truetype");
  }

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

body {
  font-family: 'Arial', sans-serif;
  background-color: #000000;
  color: #ffffff;
  min-height: 100vh;
  padding: 20px;
}

/* Main page styles */
.container {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.title {
    font-family: "Back to the Future 2002";
    font-size: 3rem;
    background: linear-gradient(red, orange, gold);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: center;
    margin-bottom: 2rem;
    -webkit-background-clip: text;
    /* filter:
    drop-shadow(2px 2px 0 #fff) drop-shadow(-2px -2px 0 #fff) drop-shadow(2px -2px 0 #fff) drop-shadow(-2px 2px 0 #fff) drop-shadow(1px 1px 2px #000); */
}

.small-stacked {
  font-size: 0.6em;
  display: inline-block;
  line-height: 1;
  vertical-align: middle;
}

/* Time machine styles */
.time-machine-container {
  width: 100%;
  position: relative;
}

.time-machine-canvas {
  width: 100%;
  height: 256px;
  image-rendering: pixelated;
  background-color: transparent;
  position: relative;
  z-index: 10;
  display: block;
}

.stars-bg {
  background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18h1v1h-1z' fill='%23FFFFFF' fillOpacity='0.7'/%3E%3Cpath d='M24 35h1v1h-1z' fill='%23FFFFFF' fillOpacity='0.7'/%3E%3Cpath d='M42 68h1v1h-1z' fill='%23FFFFFF' fillOpacity='0.5'/%3E%3Cpath d='M73 24h1v1h-1z' fill='%23FFFFFF' fillOpacity='0.7'/%3E%3Cpath d='M62 54h1v1h-1z' fill='%23FFFFFF' fillOpacity='0.5'/%3E%3Cpath d='M83 76h1v1h-1z' fill='%23FFFFFF' fillOpacity='0.7'/%3E%3C/svg%3E");
}

/* Control panel styles */
.control-panel {
  margin-top: 32px;
  padding: 24px;
  border: 4px solid #444;
  background-color: #222;
  border-radius: 8px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.panel-title {
  text-align: center;
  margin-bottom: 16px;
  color: #ffcc00;
  font-family: 'Press Start 2P', monospace;
  font-size: 1.5rem;
}

.control-group {
  margin-bottom: 16px;
}

.control-group label {
  display: block;
  margin-bottom: 8px;
  color: #fff;
}

/* Custom select styles */
.select-wrapper {
  position: relative;
  width: 100%;
  margin-bottom: 16px;
}

.select-wrapper::after {
  content: "▼";
  font-size: 0.8rem;
  color: #ffcc00;
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.select {
  width: 100%;
  padding: 12px 16px;
  background-color: #333;
  border: 2px solid #555;
  color: #fff;
  border-radius: 4px;
  font-size: 1rem;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.select:hover {
  border-color: #666;
  background-color: #3a3a3a;
}

.select:focus {
  outline: none;
  border-color: #ffcc00;
  box-shadow: 0 0 0 2px rgba(255, 204, 0, 0.2);
}

.select option {
  background-color: #333;
  color: #fff;
  padding: 12px;
}

/* Remove default arrow in IE */
.select::-ms-expand {
  display: none;
}

.go-button {
  width: 100%;
  background-color: #cc0000;
  color: white;
  border: none;
  padding: 12px;
  font-weight: bold;
  font-size: 1.2rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.go-button:hover:not(:disabled) {
  background-color: #aa0000;
}

.go-button:disabled {
  background-color: #555;
  cursor: not-allowed;
}

/* Event page styles */
.event-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

.back-button {
  display: inline-flex;
  align-items: center;
  background-color: #222;
  color: #ffcc00;
  border: 2px solid #444;
  padding: 10px 16px;
  margin-bottom: 24px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  font-family: 'Press Start 2P', monospace;
  transition: all 0.3s ease;
}

.back-button:hover {
  background-color: #333;
  border-color: #555;
}

.back-button-icon {
  margin-right: 8px;
}

.event-card {
  border: 4px solid #444;
  background-color: #222;
  border-radius: 8px;
  padding: 24px;
}

.event-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.event-year {
  font-size: 2rem;
  font-weight: bold;
  color: #ffcc00;
  font-family: 'Press Start 2P', monospace;
}

.event-name {
  padding: 8px 16px;
  background-color: #cc0000;
  border-radius: 4px;
  color: white;
  font-family: 'Press Start 2P', monospace;
}

.event-image {
  width: 100%;
  height: 300px;
  background-color: #333;
  margin-bottom: 32px;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pixel-art-image {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  image-rendering: pixelated;
}

/* Year-specific backgrounds */
.pixel-art-image[data-year="1985"] {
  background-color: #0066cc;
  background-image: linear-gradient(45deg, #0066cc 25%, #0055aa 25%, #0055aa 50%, #0066cc 50%, #0066cc 75%, #0055aa 75%, #0055aa 100%);
  background-size: 20px 20px;
}

.pixel-art-image[data-year="1995"] {
  background-color: transparent;
  background-image: none;
}

.pixel-art-image[data-year="2005"] {
  background-color: #993399;
  background-image: linear-gradient(45deg, #993399 25%, #772277 25%, #772277 50%, #993399 50%, #993399 75%, #772277 75%, #772277 100%);
  background-size: 20px 20px;
}

.pixel-art-image[data-year="2015"] {
  background-color: #cc6600;
  background-image: linear-gradient(45deg, #cc6600 25%, #aa5500 25%, #aa5500 50%, #cc6600 50%, #cc6600 75%, #aa5500 75%, #aa5500 100%);
  background-size: 20px 20px;
}

.pixel-art-image[data-year="2023"] {
  background-color: #cc0000;
  background-image: linear-gradient(45deg, #cc0000 25%, #aa0000 25%, #aa0000 50%, #cc0000 50%, #cc0000 75%, #aa0000 75%, #aa0000 100%);
  background-size: 20px 20px;
}

.event-details {
  background-color: #333;
  padding: 16px;
  border-radius: 8px;
}

.event-details-title {
  font-size: 1.5rem;
  font-weight: bold;
  color: white;
  margin-bottom: 16px;
  font-family: 'Press Start 2P', monospace;
}

.event-description {
  color: #ccc;
  line-height: 1.6;
}

/* Loading screen */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.loading-text {
  color: #ffcc00;
  font-family: 'Press Start 2P', monospace;
  font-size: 2rem;
  animation: pulse 1.5s infinite;
  text-align: center;
  padding: 0 20px;
}

@keyframes pulse {
  0% { opacity: 0.5; }
  50% { opacity: 1; }
  100% { opacity: 0.5; }
}

/* Error message */
.error-message {
  color: #ff3333;
  font-family: 'Press Start 2P', monospace;
  font-size: 1.5rem;
  text-align: center;
  margin-bottom: 24px;
}

/* Responsive styles */
@media (max-width: 768px) {
  .title {
    font-size: 2rem;
  }
  
  .control-panel {
    padding: 16px;
    margin-top: 24px;
  }

  .container {
    padding: 0 16px;
  }
  
  .event-header {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }
  
  .event-name {
    font-size: 0.8rem;
  }

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

  .back-button {
    padding: 8px 12px;
    font-size: 0.8rem;
  }

  .event-year {
    font-size: 1.5rem;
  }

  .event-name {
    font-size: 0.9rem;
  }

  .event-details-title {
    font-size: 1.2rem;
  }

  /* Make event container wider on mobile */
  .event-container {
    max-width: 100%;
    padding: 0;
  }
}