:root {
    --bg-main: #0a0a0c;
    --container-bg: #141418;
    --accent-red: #e50914; /* Netflix/Cinema crvena */
    --accent-red-hover: #f40612;
    --text-light: #f5f5f1;
    --text-muted: #8c8c93;
    --border-color: #2b2b36;
    --card-bg: #1f1f27;
    --card-bg-hover: #2d2d38;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background-color: var(--bg-main);
    color: var(--text-light);
    font-family: 'Montserrat', sans-serif;
    display: flex;
    justify-content: center;
    padding: 30px 15px;
    min-height: 100vh;
}

/* Širi kontejner po ugledu na bioskopske sajtove */
.cinema-container {
    background-color: var(--container-bg);
    width: 100%;
    max-width: 900px; /* Prošireno */
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.9);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

/* Header */
.cinema-header {
    text-align: center;
    padding: 40px 20px 30px;
    background: linear-gradient(to bottom, #1a1a20, var(--container-bg));
    position: relative;
}

.glowing-line {
    position: absolute;
    top: 0; left: 0; right: 0; height: 3px;
    background: var(--accent-red);
    box-shadow: 0 0 15px var(--accent-red);
}

.cinema-header h1 {
    font-family: 'Oswald', sans-serif;
    font-size: 2.5rem;
    letter-spacing: 3px;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 15px;
}

.vip-badge {
    display: inline-block;
    background: var(--accent-red);
    color: white;
    padding: 5px 15px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

/* Info sekcija */
.program-section {
    padding: 0 30px 20px;
}

.location-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    background-color: var(--card-bg);
    padding: 15px 20px;
    border-radius: 8px;
    border-left: 4px solid var(--accent-red);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.intro-text {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    text-align: center;
}

/* Forma */
.vip-form { padding: 20px 30px 40px; }

.question-group {
    margin-bottom: 40px;
    border-top: 1px solid var(--border-color);
    padding-top: 25px;
}

.question-group h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.step-num {
    background: var(--accent-red);
    color: white;
    width: 28px; height: 28px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    font-size: 0.9rem;
    font-weight: bold;
}

/* Generičke Radio Kartice (Termin i Hrana) */
.radio-cards {
    display: grid;
    gap: 15px;
}

.date-cards { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.food-cards { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

.radio-card input[type="radio"], .movie-card input[type="radio"] { display: none; }

.card-content {
    display: block;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 20px 15px;
    text-align: center;
    cursor: pointer;
    transition: 0.3s;
    height: 100%;
}

.card-content strong { font-size: 1.2rem; display: block; margin-top: 5px; }

.radio-card:hover .card-content { border-color: #4a4a5a; }

.radio-card input[type="radio"]:checked + .card-content {
    border-color: var(--accent-red);
    background: rgba(229, 9, 20, 0.1);
}

/* Movie Grid sa Thumbnailovima */
.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.movie-card { cursor: pointer; }

.movie-content {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: 0.3s transform, 0.3s border-color;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.poster-wrapper {
    height: 380px; /* Visina postera */
    overflow: hidden;
    position: relative;
    background: #000;
}

.poster-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s;
    opacity: 0.8;
}

.mystery-box {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 4rem;
    background: linear-gradient(45deg, #1a1a20, #2b2b36);
}

.movie-info { padding: 15px; flex-grow: 1; }

.movie-info h4 { font-size: 1.1rem; margin-bottom: 5px; }
.movie-info .genre { font-size: 0.8rem; color: var(--accent-red); text-transform: uppercase; font-weight: bold; display: block; margin-bottom: 8px; }
.movie-info p { font-size: 0.85rem; color: var(--text-muted); }

.movie-card:hover .movie-content { transform: translateY(-5px); border-color: #4a4a5a; }
.movie-card:hover .poster-wrapper img { transform: scale(1.05); opacity: 1; }

.movie-card input[type="radio"]:checked + .movie-content {
    border-color: var(--accent-red);
    box-shadow: 0 10px 20px rgba(229,9,20,0.2);
}
.movie-card input[type="radio"]:checked + .movie-content img { opacity: 1; }

/* Flatpickr Custom Input */
.custom-date-wrapper { margin-top: 15px; animation: fadeIn 0.3s; }
.custom-date-wrapper input {
    width: 100%;
    background: var(--card-bg);
    border: 2px solid var(--accent-red);
    color: var(--text-light);
    padding: 15px;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    outline: none;
}

/* Dugme */
.submit-btn {
    width: 100%;
    background: var(--accent-red);
    color: white;
    border: none;
    padding: 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.submit-btn:hover { background: var(--accent-red-hover); transform: translateY(-2px); }
.btn-text { font-family: 'Oswald', sans-serif; font-size: 1.5rem; letter-spacing: 1px; }
.btn-subtext { font-size: 0.85rem; opacity: 0.8; margin-top: 5px; }

/* Success Popup */
.hidden { display: none !important; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.success-popup {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(10, 10, 12, 0.95);
    display: flex; justify-content: center; align-items: center; z-index: 1000;
}

.ticket-stub {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 10px;
    border: 2px dashed var(--accent-red);
    text-align: center;
    animation: fadeIn 0.5s;
}

.ticket-stub h2 { color: var(--accent-red); font-family: 'Oswald'; font-size: 2rem; margin-bottom: 20px;}
.success-msg { font-size: 1.2rem; margin-bottom: 20px; }
.barcode { font-family: 'Libre Barcode 39', cursive, sans-serif; font-size: 3rem; letter-spacing: 5px; color: var(--text-muted);}

@media (max-width: 600px) {
    .cinema-header h1 { font-size: 2rem; }
    .location-bar { flex-direction: column; gap: 10px; }
}

/* --- TRAILER DUGME --- */
.play-trailer-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: rgba(229, 9, 20, 0.85); /* Poluprovidna crvena */
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 1px;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 10;
    backdrop-filter: blur(5px); /* Moderni stakleni efekat */
}

/* Pojavljivanje na hover */
.movie-card:hover .play-trailer-btn {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.play-trailer-btn:hover {
    background: var(--accent-red);
    box-shadow: 0 0 15px rgba(229, 9, 20, 0.6);
}

/* --- TRAILER MODAL --- */
.trailer-modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.trailer-modal.hidden {
    opacity: 0;
    pointer-events: none;
    display: flex !important; /* Zadržavamo flex zbog tranzicije, pointer-events sprečava klikove */
}

.trailer-content {
    position: relative;
    width: 90%;
    max-width: 900px;
    aspect-ratio: 16/9; /* Zadržava YouTube proporcije */
    background: #000;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 30px rgba(229, 9, 20, 0.2);
    transform: translateY(0);
    transition: transform 0.3s ease;
}

.trailer-modal.hidden .trailer-content {
    transform: translateY(50px);
}

.close-trailer {
    position: absolute;
    top: -45px;
    right: -10px;
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 3rem;
    cursor: pointer;
    transition: color 0.3s;
    line-height: 1;
}

.close-trailer:hover {
    color: var(--accent-red);
}

/* Container za slučaj kada se učita već popunjena stranica */
.success-page-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 80vh;
}

.ticket-stub.always-visible {
    animation: popIn 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform: scale(1.1); /* Malo veće jer je to jedini sadržaj na ekranu */
}

/* Dugme za Google Kalendar */
.gcal-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    color: #1a1a20;
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 0.95rem;
    padding: 15px 25px;
    border-radius: 8px;
    margin: 25px 0;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.1);
}

.gcal-btn .calendar-icon {
    font-size: 1.2rem;
    margin-right: 10px;
}

.gcal-btn:hover {
    background: #4285F4; /* Google plava boja */
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(66, 133, 244, 0.4);
    transform: translateY(-3px);
}

@keyframes popIn {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1.1); opacity: 1; }
}

.reset-btn {
    display: block;
    margin: 20px auto 0;
    background: transparent;
    color: var(--text-muted);
    border: none;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.reset-btn:hover {
    color: var(--accent-red);
}

/* Modifikacija za popIn animaciju da važi u oba slučaja */
.ticket-stub.always-visible {
    animation: popIn 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform: scale(1.1);
}

/* --- AGENDA TIMELINE DIZAJN (SA VREMENOM) --- */
.agenda-container {
    margin-top: 25px;
    padding: 20px;
    background: var(--card-bg);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.agenda-title {
    font-family: 'Oswald', sans-serif;
    color: var(--text-light);
    font-size: 1.3rem;
    margin-bottom: 25px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
}

.agenda-list {
    list-style: none;
    position: relative;
    padding: 0;
    margin: 0;
}

/* Vertikalna linija */
.agenda-list::before {
    content: '';
    position: absolute;
    top: 15px;
    bottom: 20px;
    left: 32px; /* Pomereno da bude tačno na sredini time-bedža (koji je širok 65px) */
    width: 2px;
    background: var(--border-color);
    z-index: 0;
}

.agenda-item {
    position: relative;
    display: flex;
    align-items: flex-start;
    margin-bottom: 30px;
    padding-left: 85px; /* Više prostora za širi bedž sa vremenom */
    opacity: 0.9;
    transition: all 0.3s ease;
}

.agenda-item:last-child {
    margin-bottom: 0;
}

/* Bedž sa vremenom (Pill shape) */
.agenda-time {
    position: absolute;
    left: 0;
    top: -2px;
    width: 65px; /* Šire da bi stao format HH:MM */
    height: 32px;
    background: var(--container-bg);
    border: 2px solid var(--border-color);
    border-radius: 16px; /* Oblik pilule */
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.9rem;
    font-family: 'Oswald', sans-serif;
    letter-spacing: 1px;
    color: var(--text-muted);
    z-index: 2;
    transition: all 0.3s ease;
}

.agenda-details {
    padding-top: 3px;
}

.agenda-details h4 {
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 6px;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px; /* Razmak između ikonice i teksta */
}

.agenda-details p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Hover animacije */
.agenda-item:hover {
    opacity: 1;
    transform: translateX(5px);
    cursor: pointer;
}

.agenda-item:hover .agenda-time {
    border-color: var(--accent-red);
    color: var(--accent-red);
    
    box-shadow: 0 0 15px rgba(229, 9, 20, 0.3);
    transform: scale(1.05);
}

.agenda-item:hover .agenda-details h4 {
    color: var(--accent-red);
}