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

main {
    margin-top: 5px;
    padding: 2rem 3rem 3rem;
    max-width: 1600px;
    margin-left: auto;
    margin-right: auto;
}

/* Horizontal scroll and card styling */
.category-section {
  margin-bottom: 3rem;
}
.category-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 0 1rem 0.5rem 1rem;
}
.category-title {
  font-size: 1.5rem;
  font-weight: bold;
}
.films-scroll {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding: 1rem;
  scroll-behavior: smooth;
}
.film-card {
  min-width: 180px;
  width: 180px;
  height: 300px;
  position: relative;
  flex-shrink: 0;
  cursor: pointer;
  background-color: #111;
  color: #fff;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.2s ease;
}
.film-card:hover {
  transform: scale(1.05);
}
.film-poster {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  position: relative;
}
.insight-badge {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  background-color: rgba(255,255,255,0.8);
  color: #000;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: bold;
}
.film-info {
  position: absolute;
  inset: auto 0 0 0;
  padding: 0.8rem 0.7rem 0.9rem;
  min-height: 40%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.2));
}

.film-info.is-one-line {
  min-height: 32%;
}

.film-info.is-two-lines {
  min-height: 48%;
}
.film-title {
  font-weight: bold;
  margin-bottom: 0.2rem;
}
.film-meta {
  font-size: 0.85rem;
  color: #ccc;
}


/* Filter bar styling */
.filter-bar {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 1rem;
  padding: 1rem 1.25rem;
  background: #0f0f0f;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.4);
}
.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.sort-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.filter-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #ffffff;
  font-weight: bold;
}
.filter-select {
  padding: 0.65rem 0.9rem;
  border-radius: 10px;
  border: 1px solid #2a2a2a;
  background: #141414;
  color: #ffffff;
  font-weight: 600;
}

.filter-select:focus {
  outline: none;
  border-color: #F04030;
  box-shadow: 0 0 0 2px rgba(240, 64, 48, 0.2);
}


/* Collections Section */
.collections {
    padding: 6rem 3rem;
    max-width: 1400px;
    margin: 0 auto;
}

.collections-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.collection-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 4/3;
    background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.collection-card:hover {
    transform: scale(1.02);
    border-color: rgba(255, 255, 255, 0.2);
}

.collection-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10, 10, 10, 0.95), transparent 60%);
    z-index: 1;
}

.collection-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    z-index: 2;
}

.collection-count {
    font-size: 0.85rem;
    color: #808080;
    margin-bottom: 0.5rem;
}

.collection-title {
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.collection-subtitle {
    font-size: 0.95rem;
    color: #bdbdbd;
    margin-bottom: 0.75rem;
}

.collection-description {
    color: #b0b0b0;
    font-size: 0.9rem;
    line-height: 1.5;
}

@media (max-width: 768px) {
    h1 {
        font-size: 3rem;
    }

    .hero {
        padding: 0 1.5rem;
    }

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

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

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

    .top-insights, .collections {
        padding: 3rem 1.5rem;
    }
}

/* Collections Grid */
.collections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 2rem;
}

.collection-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.collection-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2);
}

.collection-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10, 10, 10, 0.95), transparent 60%);
    z-index: 1;
}

.collection-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    z-index: 2;
}

.collection-type {
    font-size: 0.75rem;
    color: #808080;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 0.5rem;
}

.collection-title {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.collection-subtitle {
    font-size: 1rem;
    color: #bdbdbd;
    margin-bottom: 0.9rem;
}

.collection-description {
    color: #b0b0b0;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.collection-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.85rem;
    color: #808080;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* Horizontal Scroll for Featured */
.collections-scroll {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    padding-bottom: 1rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.collections-scroll::-webkit-scrollbar {
    height: 8px;
}

.collections-scroll::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.collections-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

.collections-scroll .collection-card {
    flex: 0 0 500px;
}

@media (max-width: 1024px) {
    .collections-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

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

    .category-header {
        margin: 0 0 0.5rem;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .filter-bar {
        margin: 0.8rem 0;
        padding: 0.7rem;
    }

    .filter-group,
    .sort-group {
        width: 100%;
    }

    .filter-select {
        width: 100%;
    }

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

    .collection-card {
        min-width: 0;
    }

    .collection-content {
        padding: 1rem;
    }

    .collection-title {
        font-size: 1.2rem;
    }

    .collection-meta {
        gap: 0.7rem;
        flex-wrap: wrap;
    }

    .collections-scroll {
        gap: 0.75rem;
    }

    .collections-scroll .collection-card {
        flex: 0 0 82vw;
    }
}
