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

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    Helvetica, Arial, sans-serif;
  line-height: 1.5;
  color: #f5f5f5;
  background-color: #141414;
}

/* Theme colour definitions for each movie club member */
:root {
  --color-ishan: #ff7043; /* warm coral */
  --color-raghav: #42a5f5; /* sky blue */
  --color-vibhas: #66bb6a; /* fresh green */
}

/* Top bar container */
.top-bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 700px;
  margin: 1rem auto;
  padding: 0 1rem;
}

/* Search container */
.search-container {
  position: relative;
  flex: 1;
  max-width: 600px;
}

.search-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid #333;
  border-radius: 8px;
  background-color: #1e1e1e;
  color: #f5f5f5;
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-input:focus {
  border-color: #ffd54f;
  box-shadow: 0 0 0 3px rgba(255, 213, 79, 0.1);
}

.search-input::placeholder {
  color: #888;
}

/* Search results dropdown */
.search-results {
  position: absolute;
  top: 100%;
  left: 1rem;
  right: 1rem;
  background-color: #1e1e1e;
  border: 1px solid #333;
  border-top: none;
  border-radius: 0 0 8px 8px;
  max-height: 400px;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.search-results.hidden {
  display: none;
}

.search-result {
  display: flex;
  align-items: center;
  padding: 0.75rem;
  cursor: pointer;
  transition: background-color 0.15s ease;
  border-bottom: 1px solid #333;
}

.search-result:last-child {
  border-bottom: none;
}

.search-result:hover,
.search-result.active {
  background-color: #2a2a2a;
}

.search-result-poster {
  width: 40px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
  margin-right: 0.75rem;
  flex-shrink: 0;
}

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

.search-result-title {
  font-weight: 600;
  color: #f5f5f5;
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-meta {
  font-size: 0.875rem;
  color: #b0bec5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-no-results {
  padding: 1rem;
  text-align: center;
  color: #888;
  font-style: italic;
}

/* Responsive search */
@media (max-width: 768px) {
  .search-container {
    margin: 0.5rem;
    padding: 0;
  }
  
  .search-input {
    font-size: 16px; /* Prevent zoom on iOS */
  }
  
  .search-results {
    left: 0;
    right: 0;
  }
  
  .search-result-poster {
    width: 35px;
    height: 52px;
    margin-right: 0.5rem;
  }
  
  .search-result {
    padding: 0.5rem;
  }
}

/* Navigation bar */
.nav-bar {
  background: #1e1e1e;
  border-bottom: 1px solid #333;
  padding: 0.5rem 0;
  position: sticky;
  top: 0;
  z-index: 999;
}

.nav-list {
  display: flex;
  justify-content: center;
  list-style: none;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

.nav-item {
  cursor: pointer;
  font-weight: 600;
  color: #b0bec5;
  position: relative;
  padding: 0.25rem 0;
  transition: color 0.2s ease;
}

.nav-item:hover {
  color: #e1bee7;
}

.nav-item.active {
  color: #ffd54f;
}

.nav-item.active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.25rem;
  height: 2px;
  background: #ffd54f;
}

/* Sub-navigation styles */
.sub-nav-bar {
  background: rgba(55, 55, 55, 0.4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sub-nav-list {
  display: flex;
  justify-content: center;
  gap: 2rem;
  list-style: none;
  padding: 0.5rem 1rem;
  margin: 0;
  max-width: 1200px;
  margin: 0 auto;
}

.sub-nav-item {
  position: relative;
  color: #b0b0b0;
  font-weight: 500;
  cursor: pointer;
  padding: 0.4rem 0.8rem;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
}

.sub-nav-item:hover {
  color: #e0e0e0;
  background: rgba(255, 255, 255, 0.05);
}

.sub-nav-item.active {
  color: #ffd54f;
  background: rgba(255, 213, 79, 0.1);
}

/* Mobile responsiveness for sub-nav */
@media (max-width: 768px) {
  .sub-nav-list {
    gap: 1rem;
  }
  
  .sub-nav-item {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
  }
}

/* View container defaults */
#viewContainer {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* Timeline view styles */
.timeline-year {
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-size: 1.8rem;
  font-weight: 700;
  color: #ffd54f;
  text-align: left;
  padding: 1rem;
  background: linear-gradient(135deg, rgba(81, 45, 168, 0.3), rgba(81, 45, 168, 0.1));
  border-radius: 0.75rem;
  border: 2px solid rgba(255, 255, 255, 0.1);
  user-select: none;
  transition: background-color 0.2s ease;
}

.timeline-year:hover {
  background: linear-gradient(135deg, rgba(81, 45, 168, 0.4), rgba(81, 45, 168, 0.2));
}

.timeline-month {
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
  font-weight: 500;
  color: #c5cae9;
  user-select: none;
  transition: background-color 0.2s ease;
  padding: 0.5rem;
  border-radius: 4px;
}

.timeline-month:hover {
  background-color: rgba(197, 202, 233, 0.05);
}

.expand-icon {
  display: inline-block;
  transition: transform 0.2s ease;
  margin-right: 0.5rem;
  font-size: 0.8em;
}

/* Removed timeline-month-row as it's now using grid-container */

.timeline-card {
  background: #2a2a2a;
  border-radius: 0.5rem;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 1px solid #444;
}

.timeline-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  border-color: #512da8;
}

.timeline-poster {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  aspect-ratio: 2/3;
}

.timeline-info {
  padding: 0.75rem;
}

.timeline-card-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 0.5rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.timeline-card-meta {
  font-size: 0.75rem;
  color: #b0bec5;
  line-height: 1.2;
}

/* Sticky columns for mobile tables */
@media (max-width: 768px) {
  .table-container {
    max-height: calc(100vh - 200px);
  }
  
  th:nth-child(1),
  td:nth-child(1) {
    position: sticky;
    background-color: #141414;
    z-index: 15;
    border-right: 1px solid #333;
    left: 0;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.3);
  }
  
  /* Ensure sticky headers have proper background and higher z-index */
  th:nth-child(1) {
    background-color: #1e1e1e;
    z-index: 25;
  }
}

/* Mobile timeline adjustments */
@media (max-width: 768px) {
  .timeline-year {
    font-size: 1.5rem;
    margin-top: 2rem;
    padding: 0.75rem;
  }
  
  .timeline-poster {
    height: auto;
    aspect-ratio: 2/3;
  }
  
  .timeline-info {
    padding: 0.6rem;
  }
  
  .timeline-card-title {
    font-size: 0.85rem;
  }
  
  /* Table adjustments for mobile */
  table td img.table-thumb {
    width: 40px;
    height: 60px;
  }
}

/* Table view styles */
.table-container {
  overflow-x: auto;
  position: relative;
  max-height: 80vh;
  overflow-y: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  position: relative;
}

thead {
  position: sticky;
  top: 0;
  z-index: 20;
}

th, td {
  padding: 0.6rem 0.5rem;
  border-bottom: 1px solid #333;
  border-right: 1px solid #333;
  text-align: center;
}

th:last-child, td:last-child {
  border-right: none;
}

th {
  cursor: pointer;
  color: #ffd54f;
  background-color: #1e1e1e;
  user-select: none;
  white-space: nowrap;
  min-width: fit-content;
}

/* Sort icons are now handled inline in JavaScript */

tr:hover {
  background: #2a2a2a;
}

/* Thumbnail images in table */
table td img.table-thumb {
  width: 50px;
  height: 75px;
  object-fit: cover;
  border-radius: 4px;
  display: block;
  margin: 0 auto;
}


/* Sidebar overlay */
.sidebar-overlay {
  position: fixed;
  top: 0;
  right: 0;
  width: 0;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  overflow: hidden;
  transition: width 0.3s ease;
  z-index: 2000;
}

.sidebar-overlay.open {
  width: 100%;
}

.sidebar {
  position: absolute;
  top: 0;
  right: 0;
  width: 320px;
  max-width: 90%;
  height: 100%;
  background: #1e1e1e;
  box-shadow: -2px 0 8px rgba(0, 0, 0, 0.5);
  padding: 1rem;
  overflow-y: auto;
}

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

/* Back button used in picker pages */
.back-btn {
  background: #512da8;
  color: #ffffff;
  border: none;
  border-radius: 4px;
  padding: 0.5rem 1rem;
  cursor: pointer;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  transition: background 0.2s ease;
}

.back-btn:hover {
  background: #673ab7;
}

/* New movie card design */
.sidebar-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}

.sidebar-content .movie-card {
  width: 100%;
  max-width: 280px;
  background: #1e1e1e;
  border-radius: 8px;
  overflow: hidden;
}

.sidebar-content .movie-poster {
  width: 100%;
  height: auto;
  object-fit: contain;
  aspect-ratio: 2/3;
  display: block;
  cursor: pointer;
  border-radius: 8px 8px 0 0;
}

.sidebar-content .movie-info {
  padding: 1.5rem 1rem 1rem;
  color: white;
  background: #1e1e1e;
}

.sidebar-content .detail-title {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.75rem;
  line-height: 1.2;
  text-transform: none;
  letter-spacing: normal;
}

.sidebar-content .detail-meta {
  font-size: 1rem;
  color: #b0bec5;
  margin-bottom: 1.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-content .picker-name {
  font-weight: 700;
}

.sidebar-content .picker-name.vibes,
.sidebar-content .picker-name.vibhas {
  color: #66bb6a; /* Green */
}

.sidebar-content .picker-name.ishan {
  color: #ff7043; /* Orange */
}

.sidebar-content .picker-name.raghav {
  color: #42a5f5; /* Blue */
}

.sidebar-content .rating-badges {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.sidebar-content .rating-row {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  flex-wrap: nowrap;
}

.sidebar-content .rating-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.9rem;
  color: #000;
  white-space: nowrap;
  min-width: fit-content;
  flex-shrink: 0;
}

.sidebar-content .rating-badge.ishan {
  background: #ff7043; /* Orange */
  color: #000;
}

.sidebar-content .rating-badge.raghav {
  background: #42a5f5; /* Blue */
  color: #000;
}

.sidebar-content .rating-badge.vibhas {
  background: #66bb6a; /* Green */
  color: #000;
}

.sidebar-content .rating-badge.total {
  background: #ffd54f; /* Yellow */
  width: 140px;
  justify-content: space-between;
  padding: 0.5rem 1rem;
}

/* Legacy rating display for backward compatibility */
.sidebar-content .detail-ratings {
  display: none;
}

/* Lightbox overlay styles for full-size poster view */
.lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 3000;
}
.lightbox-overlay.hidden {
  display: none;
}
.lightbox-overlay.open {
  display: flex;
}
.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  justify-content: center;
  align-items: center;
}
.lightbox-content img {
  /* Constrain the image so it never exceeds the viewport height.
     Width will adjust automatically to maintain aspect ratio. */
  max-width: 90vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}
.close-lightbox {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: none;
  border: none;
  color: #ffffff;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Colour coding in sidebar detail view */
.detail-ratings .rating-row.ishan .rating-value {
  color: var(--color-ishan);
}
.detail-ratings .rating-row.raghav .rating-value {
  color: var(--color-raghav);
}
.detail-ratings .rating-row.vibhas .rating-value {
  color: var(--color-vibhas);
}

/* Person signature colors - used everywhere names appear */
.person-ishan,
.stat-card .ishan {
  color: #ff7043 !important; /* Orange */
  font-weight: 600;
}

.person-raghav,
.stat-card .raghav {
  color: #42a5f5 !important; /* Blue */
  font-weight: 600;
}

.person-vibes,
.person-vibhas,
.stat-card .vibhas {
  color: #66bb6a !important; /* Green */
  font-weight: 600;
}

/* Table rating badges */
table td.rating-cell {
  text-align: center;
  padding: 0.5rem;
}

table td .table-rating-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.6rem;
  border-radius: 15px;
  font-weight: 600;
  font-size: 0.8rem;
  color: #000;
  min-width: 35px;
  justify-content: center;
}

table td .table-rating-badge.ishan {
  background: #ff7043; /* Orange */
}

table td .table-rating-badge.raghav {
  background: #42a5f5; /* Blue */
}

table td .table-rating-badge.vibhas {
  background: #66bb6a; /* Green */
}

table td .table-rating-badge.total {
  background: #ffd54f; /* Yellow */
}

/* Hidden utility class */
.hidden {
  display: none;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Hero section styling */
.hero {
  position: relative;
  width: 100%;
  height: 45vh;
  overflow: hidden;
}

/* The cover image fills the hero while being cropped if necessary */
.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(70%);
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 1rem;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.5rem;
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.6);
}

.hero-subtitle {
  font-size: 1rem;
  font-weight: 400;
  color: #d1c4e9;
  max-width: 600px;
}

main {
  padding: 2rem 1rem;
}

/* Stats section */
.stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: rgba(30, 30, 30, 0.6);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  min-width: 140px;
  text-align: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
}

.stat-card h3 {
  font-size: 0.8rem;
  margin-bottom: 0.4rem;
  color: #b0bec5;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
}

.stat-card p {
  font-size: 1.2rem;
  font-weight: 600;
  color: #f5f5f5;
}

/* Info icon and tooltip */
.info-icon {
  display: inline-block;
  position: absolute;
  top: -2px;
  right: -8px;
  font-size: 0.65rem;
  color: #999;
  cursor: help;
  font-style: normal;
  font-weight: normal;
  transition: color 0.2s ease;
}

.info-icon:hover {
  color: #ffd54f;
}

/* Tooltip */
.info-icon::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 5px;
  background: #2a2a2a;
  color: #f5f5f5;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 0.75rem;
  white-space: normal;
  width: 220px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  text-transform: none;
  letter-spacing: normal;
  line-height: 1.4;
  text-align: left;
}

.info-icon:hover::after {
  opacity: 1;
}

/* Mobile tooltip - show on tap */
@media (max-width: 768px) {
  /* Hide info icon on mobile */
  .info-icon {
    display: none;
  }
  
  /* Make stat card clickable on mobile */
  .stat-card.with-info {
    cursor: pointer;
    position: relative;
  }
  
  /* Show tooltip on stat card click */
  .stat-card.with-info:active::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 5px;
    background: #2a2a2a;
    color: #f5f5f5;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: normal;
    width: 180px;
    opacity: 1;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    text-transform: none;
    letter-spacing: normal;
    line-height: 1.4;
    text-align: left;
  }
}

/* Chart section */
.chart-section {
  margin-bottom: 2rem;
  padding: 1rem 0;
}

.chart-section h2 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: #ffd54f;
  text-align: center;
}

.chart {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 1rem;
  padding: 1rem 0;
  max-width: 800px;
  margin: 0 auto;
}

.bar {
  width: 60px;
  position: relative;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, #9575cd, #512da8);
  transition: height 0.3s ease;
}

.bar:hover::after {
  content: attr(data-label);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  white-space: nowrap;
  font-size: 0.75rem;
  margin-bottom: 0.25rem;
}

.bar-label {
  text-align: center;
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

/* Movies grid */
.movies-grid h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  text-align: center;
  color: #ffd54f;
}

.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
  justify-content: center;
  margin: 0 auto;
}

.movie-card {
  background: #1e1e1e;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-4px);
}

.movie-poster {
  width: 100%;
  height: auto;
  object-fit: contain;
  aspect-ratio: 2/3;
}

.movie-info {
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.movie-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #ffffff;
}

.movie-meta {
  font-size: 0.9rem;
  color: #b0bec5;
}

/* Ratings layout inside movie cards */
/* Ratings container within movie cards */
.ratings-container {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

/* Generic rating row layout */
.rating-row {
  display: flex;
  justify-content: space-between;
  width: 100%;
}

/* Individual ratings row inside cards */
.rating-row.individual-row .rating-item {
  flex: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
}

/* Summary row (avg/total) */
.rating-row.summary-row .rating-item {
  flex: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
}

/* Label (for initials or summary labels) */
.rating-label {
  font-size: 0.6rem;
  color: #b0bec5;
}

/* Numeric value inside rating rows */
.rating-num {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
}

/* Value for average and total stats in summary row */
.rating-value {
  font-size: 0.85rem;
  font-weight: 600;
  color: #ffd54f;
}

/* Colour-coding for each member inside movie cards */
.rating-item.ishan .rating-num {
  color: var(--color-ishan);
  background: rgba(255, 112, 67, 0.15);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}
.rating-item.raghav .rating-num {
  color: var(--color-raghav);
  background: rgba(66, 165, 245, 0.15);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}
.rating-item.vibhas .rating-num {
  color: var(--color-vibhas);
  background: rgba(102, 187, 106, 0.15);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

/* Summary values (Avg, Total) within cards */
.rating-row.summary-row .rating-value {
  color: #ffd54f;
  font-weight: 600;
  font-size: 0.8rem;
}

footer {
  text-align: center;
  padding: 1rem 0;
  font-size: 0.8rem;
  color: #8d8d8d;
  background: #0d0d0d;
  margin-top: 2rem;
}

/* Music button */
.music-button {
  position: relative;
  width: 36px;
  height: 36px;
  margin-left: 0.75rem;
  background: transparent;
  border: none;
  color: #ffd54f;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease;
  z-index: 1001;
  flex-shrink: 0;
  border-radius: 6px;
}

.music-button:hover {
  opacity: 0.7;
}

.music-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.music-icon {
  display: block;
  border-radius: 2px;
}

/* Loading spinner for music button */
.music-loading-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 213, 79, 0.3);
  border-top: 2px solid #ffd54f;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  display: none;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Rotating animation for playing state */
@keyframes rotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.music-icon.rotating {
  animation: rotate 2s linear infinite;
}

/* Hidden iframe container for SoundCloud */
.hidden-soundcloud {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  z-index: -1;
}

/* Music sidebar */
.music-sidebar-overlay {
  display: none !important;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: -1;
  opacity: 0;
  pointer-events: none;
}

.music-sidebar {
  display: none !important;
}

.close-music-sidebar {
  display: none !important;
}

.music-sidebar-content {
  display: none !important;
}

.music-sidebar-content iframe {
  display: none !important;
}

/* Responsive tweaks */
@media (max-width: 768px) {
  .grid-container {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
    padding: 0 0.5rem;
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .grid-container {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    padding: 0 1rem;
    justify-items: center;
  }
  
}

@media (max-width: 600px) {
  .hero-title {
    font-size: 1.75rem;
  }
  .hero-subtitle {
    font-size: 0.85rem;
  }
  .stat-card {
    min-width: 95px;
    flex: 1;
    max-width: none;
    padding: 0.6rem 0.4rem;
  }
  
  .stat-card h3 {
    font-size: 0.55rem;
    margin-bottom: 0.25rem;
  }
  
  .stat-card p {
    font-size: 0.95rem;
  }
  
  .stats {
    gap: 0.5rem;
  }
  .bar {
    width: 40px;
  }
  .movie-poster {
    height: auto;
    aspect-ratio: 2/3;
  }
}