/* Reset and Base Styles */
* {
  margin: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #0a0a0a;
  --accent-red: #EA6C6D;
  --accent-green: #6CBF43;
  --accent-purple: #9E75C7;
  --accent-blue: #025BD6;
  --text-light: #666;
  --background: #F8F9FA;
  --surface: #ffffff;
  --border: #e5e5e5;

  --date-font-size: 1rem;
  --movie-title-font-size: 0.9rem;
  --movie-times-font-size: 0.8rem;
  --filter-item-font-size: 0.9rem;
}

body {
  font-family: "JetBrains Mono", monospace, -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
  color: var(--primary-color);
  background: var(--background);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
}

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
}

header h1 {
  display: flex;
  align-items: center;
}

.view-modes {
  display: flex;
  /* gap: 0.25rem; */
  align-items: stretch;
}

.view-mode {
  display: flex;
  align-items: center;
  padding: 0 1rem;
}

/* Container */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem;
}

main {
  margin-top: 1rem;
}

/* View Sections */
.view {
  display: none;
}

.view.active {
  display: block;
}

/* Controls */

.filter-group {
  text-align: center;
}

.theater-filters {
  display: flex;
  gap: 1rem;
  justify-content: center;
  padding-top: 0.5rem;
}

.theater-filter,
.view-mode {
  font-size: var(--filter-item-font-size);
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-light);
  white-space: nowrap;
  position: relative;
  font-family: inherit;
  text-decoration: none;
}

.theater-filter:hover,
.view-mode:hover {
  color: var(--primary-color);
}

.theater-filter.active {
  color: var(--background);
  background-color: var(--accent-blue);
}

.view-mode.active {
  color: var(--background);
  background-color: var(--accent-purple)
}

/* Main Content */
.main {
  position: relative;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Showtime Cards */
.showtime {
  background: var(--surface);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  position: relative;
}

.showtime.hidden {
  display: none;
}

.showtime-header {
  padding: 2rem;
}

.film-title {
  font-size: var(--movie-title-font-size);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 1rem;
  color: var(--primary-color);
  text-align: center;
}

.film-title a {
  color: inherit;
  text-decoration: none;
  display: block;
}

.film-title a:hover {
  color: var(--accent-purple);
}

.separator {
  color: var(--border);
  font-weight: 300;
}

.datetime {
  font-weight: 400;
  color: var(--text-light);
  text-align: center;
}

/* Movie Grid (Now Playing page) */
.movie-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(500px, 1fr));
  gap: 1rem;
  margin-bottom: 3rem;
}

/* Generated Content Styles */
.day-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.day-item {
  text-align: center;
  background: var(--surface);
  border: 2px solid var(--border);
}

.day-header {
  font-size: var(--date-font-size);
  font-weight: 500;
  color: var(--primary-color);
  text-align: center;
  border-bottom: 2px solid var(--border);
  padding: 0.25rem;
}

.day-showtimes {
  list-style: none;
  padding: 0.5rem;
  margin: 0;
  text-align: center;
  line-height: 1rem;
}

.movie-item {
  text-align: center;
  padding: 0.5rem;
}

.movie-title {
  font-size: var(--movie-title-font-size);
  font-weight: 600;
  color: var(--primary-color);
  text-align: center;
}

.movie-item a {
  color: inherit;
  text-decoration: none;
}

.movie-item a:hover {
  color: var(--accent-red);
}

.movie-times {
  font-size: var(--movie-times-font-size);
  color: var(--text-light);
  text-align: center;
}

.showtime-date-row {
  display: flex;
  gap: 0.5rem;
  font-size: var(--movie-times-font-size);
  color: var(--text-light);
  justify-content: space-between;
}

.movie-card {
  text-align: center;
  background: var(--surface);
  border: 2px solid var(--border);
}

.movie-card-title {
  font-size: var(--movie-title-font-size);
  font-weight: 600;
  color: var(--primary-color);
  text-align: center;
  border-bottom: 2px solid var(--border);
  padding: 0.25rem;
}

.movie-card-title a {
  color: inherit;
  text-decoration: none;
}

.movie-card-title a:hover {
  color: var(--accent-purple);
}

.movie-card-body {
  display: flex;
  gap: 1rem;
  padding: 1rem;
}

.movie-poster {
  width: 200px;
  height: 112px;
  object-fit: cover;
  flex-shrink: 0;
}

.movie-theaters {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
}

.theater-showtimes {
  text-align: left;
}

.theater-name {
  font-size: var(--movie-times-font-size);
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 0.25rem;
}

.theater-name a {
  color: inherit;
  text-decoration: none;
}

.theater-name a:hover {
  color: var(--accent-red);
}

.showtime-dates {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

/* About View */
.about-content {
  margin-bottom: 2rem;
}

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

.theater-about-card {
  background: var(--surface);
  border: 2px solid var(--border);
  padding: 1rem;
  text-align: left;
}

.theater-about-name {
  font-size: var(--movie-title-font-size);
  font-weight: 600;
  color: var(--primary-color);
}

.theater-about-name a {
  color: inherit;
  text-decoration: none;
}

.theater-about-name a:hover {
  color: var(--accent-purple);
}

.theater-about-description {
  font-size: var(--movie-times-font-size);
  color: var(--text-light);
  line-height: 1.5;
  font-style: italic;
  padding-left: 0.75rem;
  margin: 0.75rem 0 0 0;
}

.theater-about-address {
  font-size: var(--movie-times-font-size);
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.theater-about-address a {
  color: inherit;
  text-decoration: none;
}

.theater-about-address a:hover {
  color: var(--accent-red);
}

/* Responsive Design - All media queries at the end */
@media (max-width: 1200px) {
  .showtimes {
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  }
}

@media (max-width: 768px) {
  .container {
    padding: 1rem;
  }

  .divider {
    height: 2.5rem;
  }

  .showtimes {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .showtime-header {
    padding: 1.5rem;
  }

  .theater-filters {
    flex-wrap: wrap;
    justify-content: center;
    max-width: 300px;
    margin: 0 auto;
    gap: 0.5rem;
  }

  .day-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .view-modes {
    display: flex;
    align-items: stretch;
    width: 100%;
  }

  .view-mode {
    padding: 0.5rem 0;
    width: 100%;
    justify-content: center;
    align-items: center;
  }

  header h1 {
    display: none
  }

  .movie-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .movie-card-body {
    flex-direction: column;
  }

  .movie-poster {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .theater-showtimes {
    text-align: center;
    width: 100%;
  }

  .showtime-date-row {
    justify-content: space-between;
  }

  .theaters-about {
    grid-template-columns: 1fr;
  }

  .theater-about-card {
    text-align: center;
  }

  .theater-about-description {
    border-left: none;
    border-top: 2px solid var(--border);
    padding-left: 0;
    padding-top: 0.75rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 1rem;
  }

  .brand {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }

  .divider {
    width: 3rem;
    height: 1px;
  }

  .showtime-header {
    padding: 1.25rem;
  }
}
