:root {
    --schedule-hero-gradient: linear-gradient(135deg, rgba(14, 165, 233, 0.65), rgba(56, 189, 248, 0.4));
}

.schedule-page {
    background: var(--page-bg);
    color: var(--page-text);
}

.ratio-2x3 {
    --bs-aspect-ratio: calc(3 / 2 * 100%);
}

.schedule-hero {
    padding: clamp(2.75rem, 6vw, 4.25rem);
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: radial-gradient(circle at top left, rgba(14, 165, 233, 0.35), transparent 55%),
        radial-gradient(circle at bottom right, rgba(37, 99, 235, 0.28), transparent 60%),
        linear-gradient(120deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.92));
}

.schedule-hero__overlay {
    position: absolute;
    inset: 0;
    background: var(--schedule-hero-gradient);
    mix-blend-mode: screen;
    opacity: 0.6;
}

.schedule-hero__content {
    max-width: 720px;
}

.schedule-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    background: rgba(56, 189, 248, 0.16);
    color: #bae6fd;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.schedule-alert {
    background: rgba(250, 204, 21, 0.08);
    border: 1px solid rgba(250, 204, 21, 0.2);
    color: #fde68a;
}

.schedule-alert__icon {
    width: 2.5rem;
    height: 2.5rem;
    background: rgba(250, 204, 21, 0.18);
    color: #facc15;
}

.legend-dot {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #38bdf8, #2563eb);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2);
}

/* Calendar Week View */
.schedule-calendar {
    margin-top: 3.5rem;
}

.calendar-header {
    margin-bottom: 2rem;
}

.calendar-week {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-bottom: 3rem;
}

.calendar-day {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
    background: rgba(15, 23, 42, 0.65);
    border: 2px solid rgba(148, 163, 184, 0.12);
    border-radius: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.calendar-day:hover {
    border-color: rgba(56, 189, 248, 0.4);
    background: rgba(8, 47, 73, 0.75);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(14, 165, 233, 0.2);
}

.calendar-day.is-active {
    border-color: rgba(56, 189, 248, 0.8);
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.25), rgba(37, 99, 235, 0.2));
    box-shadow: 0 12px 32px rgba(14, 165, 233, 0.3);
}

.calendar-day.is-today::before {
    content: "";
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #38bdf8, #2563eb);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.3);
}

.calendar-day__name {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(226, 232, 240, 0.6);
    margin-bottom: 0.5rem;
}

.calendar-day__date {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.calendar-day__month {
    font-size: 0.85rem;
    color: rgba(226, 232, 240, 0.7);
    margin-bottom: 0.75rem;
}

.calendar-day__count {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    background: rgba(30, 64, 175, 0.3);
    color: #bfdbfe;
    font-weight: 600;
}

.calendar-day.is-active .calendar-day__count {
    background: rgba(56, 189, 248, 0.3);
    color: #bae6fd;
}

/* Movies List */
.calendar-movies {
    position: relative;
    min-height: 400px;
}

.movies-list {
    display: none;
    animation: fadeIn 0.4s ease;
}

.movies-list.is-visible {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.movies-list__header {
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.movies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

/* Movie Card */
.movie-card {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative; /* anchor absolute children like rating */
}

.movie-card:hover {
    border-color: rgba(56, 189, 248, 0.4);
    box-shadow: 0 12px 32px rgba(14, 165, 233, 0.2);
    transform: translateY(-4px);
}

.movie-card__poster {
    position: relative;
    background: rgba(15, 23, 42, 0.55);
    overflow: hidden;
    display: block;
    text-decoration: none;
}

.movie-card__poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.movie-card:hover .movie-card__poster img {
    transform: scale(1.05);
}

.movie-card__rating {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.28rem 0.5rem; /* slightly tighter to avoid expanding poster area */
    border-radius: 0.5rem;
    background: rgba(2,6,23,0.6);
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    z-index: 30;
    pointer-events: none;
    user-select: none;
    box-shadow: 0 6px 18px rgba(2,6,23,0.45);
    border: 1px solid rgba(255,255,255,0.06);
    max-width: calc(100% - 1rem); /* avoid overflow */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.movie-card__rating i {
    color: #facc15;
}

.movie-card__body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex: 1;
}

.movie-card__title {
    font-size: 1.1rem;
    font-weight: 700;
    color: inherit;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
}

.movie-card__title:hover {
    color: var(--brand-secondary);
}

.movie-card__genres {
    margin: 0;
    font-size: 0.85rem;
    color: rgba(226, 232, 240, 0.6);
}

.movie-card__overview {
    margin: 0;
    color: rgba(226, 232, 240, 0.7);
    font-size: 0.9rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-card__showtimes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.showtime-btn {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 0.5rem;
    padding: 0.5rem 0.85rem;
    color: inherit;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.showtime-btn:hover {
    border-color: rgba(56, 189, 248, 0.5);
    background: rgba(14, 165, 233, 0.15);
    color: #bae6fd;
}

.showtime-btn__time {
    letter-spacing: 0.05em;
}

.movie-card__actions {
    margin-top: auto;
    padding-top: 0.75rem;
}

.movie-card__actions .btn-outline-light {
    border-color: rgba(56, 189, 248, 0.3);
    color: #bae6fd;
    font-weight: 600;
    transition: all 0.25s ease;
}

.movie-card__actions .btn-outline-light:hover {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.2), rgba(37, 99, 235, 0.15));
    border-color: rgba(56, 189, 248, 0.6);
    color: #bae6fd;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.25);
}

/* Empty State */
.empty-day-state {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 1rem;
}

.empty-day-icon {
    font-size: 3rem;
    color: rgba(148, 163, 184, 0.4);
}

.empty-state {
    background: rgba(15, 23, 42, 0.7);
}

.empty-state .empty-icon {
    font-size: 3rem;
    color: rgba(148, 163, 184, 0.6);
}

/* Responsive */
@media (max-width: 991.98px) {
    .schedule-hero {
        text-align: center;
    }

    .schedule-hero__content {
        margin-inline: auto;
    }

    .calendar-week {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 0.75rem;
    }

    .calendar-day {
        padding: 1.25rem 0.75rem;
    }

    .calendar-day__date {
        font-size: 1.75rem;
    }

    .movies-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 575.98px) {
    .calendar-week {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
        gap: 0.5rem;
    }

    .calendar-day {
        padding: 1rem 0.5rem;
    }

    .calendar-day__date {
        font-size: 1.5rem;
    }

    .calendar-day__count {
        font-size: 0.7rem;
        padding: 0.2rem 0.5rem;
    }

    .movies-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .movie-card__showtimes {
        gap: 0.4rem;
    }

    .showtime-btn {
        padding: 0.4rem 0.7rem;
        font-size: 0.85rem;
    }
}
