/* ── Movie Theater Calendar — Frontend CSS ──────────────────────── */
:root {
    --mtc-bg:        #0a0a0f;
    --mtc-surface:   #13131e;
    --mtc-border:    #2a2a3d;
    --mtc-gold:      #d4a017;
    --mtc-text:      #e8e8f0;
    --mtc-muted:     #888899;
    --mtc-green:     #1a6b3c;
    --mtc-blue:      #1a5599;
    --mtc-purple:    #7e1a7e;
    --mtc-radius:    6px;
    --mtc-radius-lg: 12px;
}

/* ── Navigation ──────────────────────────────────────────────────── */
.mtc-cal-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 100%);
    border-radius: var(--mtc-radius-lg) var(--mtc-radius-lg) 0 0;
    padding: 16px 20px;
    margin-bottom: 0;
}
.mtc-cal-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--mtc-gold);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 2px;
}
.mtc-nav-btn {
    background: transparent !important;
    border: 1px solid var(--mtc-gold) !important;
    color: var(--mtc-gold) !important;
    padding: 6px 14px !important;
    border-radius: var(--mtc-radius) !important;
    cursor: pointer;
    font-size: 14px;
    transition: background .2s, color .2s;
}
.mtc-nav-btn:hover {
    background: var(--mtc-gold) !important;
    color: #000 !important;
}

/* ── Status Badges ───────────────────────────────────────────────── */
.mtc-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: .5px;
    white-space: nowrap;
}
.mtc-badge-now_playing    { background: var(--mtc-green);  color: #fff; }
.mtc-badge-coming_soon    { background: var(--mtc-blue);   color: #fff; }
.mtc-badge-special_event  { background: var(--mtc-purple); color: #fff; }

.mtc-cal-legend {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    padding: 10px 20px;
    background: var(--mtc-surface);
    border-left: 1px solid var(--mtc-border);
    border-right: 1px solid var(--mtc-border);
}

/* ── Calendar Grid ───────────────────────────────────────────────── */
.mtc-calendar-wrap {
    font-family: inherit;
    background: var(--mtc-bg);
    border-radius: var(--mtc-radius-lg);
    overflow: hidden;
    border: 1px solid var(--mtc-border);
    box-shadow: 0 4px 20px rgba(0,0,0,.6);
}
.mtc-cal-grid {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    background: var(--mtc-bg);
}
.mtc-cal-grid th {
    background: var(--mtc-surface);
    color: var(--mtc-muted);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 10px 4px;
    text-align: center;
    border-bottom: 1px solid var(--mtc-border);
}
.mtc-cal-day {
    vertical-align: top;
    padding: 6px 4px;
    min-height: 80px;
    border: 1px solid var(--mtc-border);
    width: 14.28%;
    background: var(--mtc-bg);
    transition: background .15s;
}
.mtc-cal-day:hover { background: #111120; }
.mtc-cal-empty     { background: #060609; border: 1px solid var(--mtc-border); }
.mtc-today         { background: #13131e !important; outline: 2px solid var(--mtc-gold); outline-offset: -2px; }

.mtc-day-number {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--mtc-muted);
    margin-bottom: 4px;
}
.mtc-today .mtc-day-number { color: var(--mtc-gold); }

.mtc-day-events {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.mtc-event-pill {
    display: block;
    width: 100%;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 5px;
    border-radius: 3px;
    border: none;
    cursor: pointer;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: opacity .15s, transform .1s;
}
.mtc-event-pill:hover { opacity: .85; transform: translateY(-1px); }

/* ── List View / Movie Cards ─────────────────────────────────────── */
.mtc-list-wrap,
.mtc-events-list {
    font-family: inherit;
}
.mtc-list-wrap { background: var(--mtc-bg); border-radius: var(--mtc-radius-lg); overflow: hidden; border: 1px solid var(--mtc-border); }
.mtc-list-grid  { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; padding: 20px; background: var(--mtc-bg); }
.mtc-events-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }

.mtc-movie-card {
    background: var(--mtc-surface);
    border: 1px solid var(--mtc-border);
    border-radius: var(--mtc-radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform .2s, box-shadow .2s;
}
.mtc-movie-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,.5);
}

.mtc-movie-poster {
    position: relative;
    aspect-ratio: 2/3;
    overflow: hidden;
    background: #0d0d15;
    max-height: 200px;
}
.mtc-movie-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.mtc-poster-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 48px;
    color: var(--mtc-border);
    min-height: 140px;
}
.mtc-status-badge {
    position: absolute;
    top: 8px;
    left: 8px;
}
.mtc-rating-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0,0,0,.75);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,.3);
}

.mtc-movie-info {
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}
.mtc-movie-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
}
.mtc-movie-title a {
    color: var(--mtc-text);
    text-decoration: none;
}
.mtc-movie-title a:hover { color: var(--mtc-gold); }

.mtc-movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.mtc-meta-chip {
    background: rgba(255,255,255,.07);
    color: var(--mtc-muted);
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 20px;
    white-space: nowrap;
}
.mtc-chip-genre  { background: rgba(212,160,23,.12); color: var(--mtc-gold); }
.mtc-chip-screen { background: rgba(26,85,153,.2);   color: #7aadff; }

.mtc-movie-credits {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 12px;
    color: var(--mtc-muted);
}
.mtc-movie-synopsis {
    font-size: 13px;
    color: var(--mtc-muted);
    margin: 0;
    line-height: 1.5;
}

/* ── Showtimes ───────────────────────────────────────────────────── */
.mtc-showtime-list {
    font-size: 12px;
    color: var(--mtc-text);
}
.mtc-showtime-list strong { color: var(--mtc-gold); font-size: 11px; text-transform: uppercase; letter-spacing: .5px; }
.mtc-showtime-list ul { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.mtc-showtime-list li {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255,255,255,.06);
    border-radius: 4px;
    padding: 3px 8px;
}
.mtc-st-hl { background: rgba(212,160,23,.2); border: 1px solid var(--mtc-gold); }
.mtc-st-date { color: var(--mtc-muted); font-size: 11px; }
.mtc-st-time { font-weight: 600; }
.mtc-st-fmt  { background: rgba(212,160,23,.15); color: var(--mtc-gold); font-size: 10px; padding: 1px 5px; border-radius: 3px; }

/* ── Card Actions ────────────────────────────────────────────────── */
.mtc-card-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    padding-top: 4px;
}
.mtc-ticket-price { font-size: 14px; font-weight: 700; color: var(--mtc-gold); }
.mtc-btn {
    display: inline-block;
    padding: 6px 14px;
    border-radius: var(--mtc-radius);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: opacity .15s;
    white-space: nowrap;
}
.mtc-btn:hover { opacity: .85; }
.mtc-btn-primary  { background: var(--mtc-gold); color: #000; }
.mtc-btn-secondary { background: rgba(255,255,255,.1); color: var(--mtc-text); border: 1px solid var(--mtc-border); }
.mtc-btn-trailer  { background: rgba(255,60,60,.2); color: #ff9090; border: 1px solid rgba(255,60,60,.3); }

/* ── Modal ───────────────────────────────────────────────────────── */
#mtc-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.75);
    z-index: 9998;
    backdrop-filter: blur(3px);
}
#mtc-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    width: min(90vw, 680px);
    max-height: 85vh;
    overflow-y: auto;
    background: var(--mtc-surface);
    border: 1px solid var(--mtc-border);
    border-radius: var(--mtc-radius-lg);
    box-shadow: 0 20px 60px rgba(0,0,0,.8);
}
.mtc-modal-inner { padding: 24px; position: relative; }
.mtc-modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: transparent;
    border: none;
    color: var(--mtc-muted);
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 4px;
    transition: color .15s, background .15s;
}
.mtc-modal-close:hover { color: var(--mtc-text); background: rgba(255,255,255,.08); }
#mtc-modal .mtc-movie-card {
    border: none;
    background: transparent;
    flex-direction: row;
    gap: 20px;
    transform: none !important;
    box-shadow: none !important;
}
#mtc-modal .mtc-movie-poster { min-width: 160px; max-height: 240px; border-radius: var(--mtc-radius); flex-shrink: 0; }

/* ── Loading ─────────────────────────────────────────────────────── */
.mtc-loading {
    text-align: center;
    color: var(--mtc-muted);
    padding: 40px;
    font-size: 16px;
}
.mtc-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--mtc-border);
    border-top-color: var(--mtc-gold);
    border-radius: 50%;
    animation: mtc-spin 0.8s linear infinite;
    vertical-align: middle;
    margin-left: 10px;
}
@keyframes mtc-spin { to { transform: rotate(360deg); } }
.mtc-no-events { color: var(--mtc-muted); text-align: center; padding: 30px; }

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .mtc-cal-grid th,
    .mtc-cal-day { font-size: 10px; padding: 3px 2px; min-height: 50px; }
    .mtc-event-pill { font-size: 9px; }
    .mtc-list-grid, .mtc-events-list { grid-template-columns: 1fr; }
    #mtc-modal .mtc-movie-card { flex-direction: column; }
    #mtc-modal .mtc-movie-poster { min-width: 0; max-height: 200px; }
}
