/* =======================================================
   JD'S CINEMA — Complete Stylesheet
   ======================================================= */

/* --- Reset & Base --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    color: #222;
    line-height: 1.6;
}

a {
    color: #562ed8;
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

.text-muted {
    color: #888;
    font-size: 14px;
}

/* =======================================================
   NAVIGATION
   ======================================================= */
.navbar {
    background: rgba(10, 10, 10, 0.92);
    backdrop-filter: blur(10px);
    padding: 0 24px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: 64px;
    display: flex;
    align-items: center;
}

.nav-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-size: 22px;
    font-weight: 800;
    color: #fff !important;
    text-decoration: none !important;
    letter-spacing: -0.5px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 24px;
    align-items: center;
}

.nav-links a {
    color: #ccc;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
    text-decoration: none;
    padding: 6px 0;
}

.nav-links a:hover,
.nav-links a.active {
    color: #fff;
}

.nav-links a.active {
    border-bottom: 2px solid #562ed8;
}

.nav-cta {
    background: #562ed8;
    color: #fff !important;
    padding: 8px 18px !important;
    border-radius: 6px;
    font-weight: 600 !important;
    font-size: 13px !important;
}
.nav-cta:hover {
    background: #6d3ef0 !important;
}

/* =======================================================
   HOME PAGE — Hero
   ======================================================= */
body:not(.auth-page):not(.dash-page) {
    background: #0a0a0a;
    min-height: 100vh;
}

.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 24px 80px;
    text-align: center;
    background: linear-gradient(135deg, rgba(10,10,10,0.8) 0%, rgba(26,26,46,0.75) 50%, rgba(10,10,10,0.85) 100%),
                url(cm.jpg.jpeg) center/cover no-repeat fixed;
}

.hero-content {
    max-width: 700px;
}

.hero-content h1 {
    font-size: 52px;
    font-weight: 800;
    color: #fff;
    line-height: 1.15;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.hero-content p {
    font-size: 18px;
    color: rgba(255,255,255,0.7);
    margin-bottom: 36px;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* =======================================================
   BUTTONS
   ======================================================= */
.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none !important;
    transition: all 0.25s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: #562ed8;
    color: #fff;
}
.btn-primary:hover {
    background: #6d3ef0;
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255,255,255,0.3);
}
.btn-outline:hover {
    border-color: #fff;
    background: rgba(255,255,255,0.08);
}

.btn-small {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 6px;
    background: #562ed8;
    color: #fff;
}
.btn-small:hover {
    background: #6d3ef0;
}

/* =======================================================
   SECTIONS
   ======================================================= */
.section-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 60px 24px;
}

.section-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 36px;
    color: #fff;
    text-align: center;
}

/* =======================================================
   MOVIE GRID
   ======================================================= */
.movies-section {
    background: #111;
}

.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.movie-card {
    background: #1c1c1c;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.movie-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(86,46,216,0.2);
}

.movie-poster {
    height: 180px;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 12px;
    position: relative;
    background-color: #2a1a5e;
}

/* Movie-specific poster gradients */
.poster-bp {
    background: linear-gradient(135deg, #1a0a2e 0%, #3d1a6e 40%, #6b3fa0 100%);
}

.poster-wk {
    background: linear-gradient(135deg, #8b4513 0%, #d2691e 40%, #f4a460 100%);
}

.poster-avatar {
    background: linear-gradient(135deg, #0a2a3a 0%, #1a6b5a 40%, #3dceb0 100%);
}

.poster-fastx {
    background: linear-gradient(135deg, #1a0a00 0%, #cc3300 40%, #ff6633 100%);
}

.poster-spider {
    background: linear-gradient(135deg, #1a002e 0%, #cc0033 40%, #ff6600 100%);
    position: relative;
    overflow: hidden;
}
.poster-spider::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 40%, rgba(255,100,100,0.3) 0%, transparent 50%),
                radial-gradient(circle at 70% 60%, rgba(100,100,255,0.3) 0%, transparent 50%);
    animation: spider-shimmer 3s ease-in-out infinite;
}
@keyframes spider-shimmer {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.poster-mi {
    background: linear-gradient(135deg, #0a0a1a 0%, #1a1a3a 40%, #cc0000 100%);
    position: relative;
    overflow: hidden;
}
.poster-mi::after {
    content: '☢';
    position: absolute;
    bottom: -10px;
    right: -10px;
    font-size: 80px;
    opacity: 0.15;
    transform: rotate(15deg);
}

.movie-rating {
    background: rgba(0,0,0,0.6);
    color: #ffcc00;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
}

.movie-info {
    padding: 16px;
}

.movie-info h3 {
    color: #fff;
    font-size: 17px;
    margin-bottom: 6px;
}

.movie-meta {
    color: #aaa;
    font-size: 13px;
    display: block;
    margin-bottom: 12px;
}

/* =======================================================
   CINEMA CARDS
   ======================================================= */
.cinemas-section {
    background: #0a0a0a;
}

.cinema-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.cinema-card {
    background: #1c1c1c;
    border-radius: 10px;
    padding: 28px 24px;
    text-align: center;
    transition: transform 0.25s ease;
}
.cinema-card:hover {
    transform: translateY(-4px);
}

.cinema-card-icon {
    font-size: 36px;
    margin-bottom: 12px;
}

.cinema-card h3 {
    color: #fff;
    font-size: 18px;
    margin-bottom: 8px;
}

.cinema-card p {
    color: #aaa;
    font-size: 14px;
    margin-bottom: 12px;
}

.cinema-status {
    display: inline-block;
    background: #562ed8;
    color: #fff;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

/* =======================================================
   FOOTER
   ======================================================= */
.footer {
    background: #0a0a0a;
    border-top: 1px solid #222;
    padding: 28px 24px;
    text-align: center;
}

.footer-container p {
    color: #666;
    font-size: 13px;
}

.footer-powered {
    margin-top: 4px;
    font-size: 12px;
    color: #555;
}

/* =======================================================
   AUTH PAGES (Sign Up / Sign In)
   ======================================================= */
.auth-page {
    min-height: 100vh;
    background: linear-gradient(135deg, rgba(10,10,10,0.85) 0%, rgba(26,26,46,0.8) 100%),
                url(cm.jpg.jpeg) center/cover no-repeat fixed;
    display: flex;
    flex-direction: column;
}

.auth-page .navbar {
    position: relative;
    background: rgba(10, 10, 10, 0.98);
}

.auth-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.login-container {
    background: white;
    padding: 40px 30px;
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 500px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    color: #050404;
    margin-bottom: 8px;
    font-size: 28px;
}

.login-header p {
    color: #888;
    font-size: 15px;
}

/* --- Form Elements --- */
.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    outline: none;
    background: #fff;
}

.form-group input:focus {
    border-color: #0dbfeb;
    box-shadow: 0 0 0 3px rgba(13, 191, 235, 0.1);
}

.form-group label {
    position: absolute;
    left: 15px;
    top: 14px;
    color: #999;
    font-size: 15px;
    pointer-events: none;
    transition: all 0.3s ease;
    background: white;
    padding: 0 5px;
}

.form-group input:focus ~ label,
.form-group input:valid ~ label,
.form-group input:not(:placeholder-shown) ~ label {
    top: -8px;
    font-size: 12px;
    color: rgba(255, 123, 0);
}

/* Form row (side-by-side fields) */
.form-row {
    display: flex;
    gap: 16px;
}

.form-row .form-group {
    flex: 1;
}

/* Radio & Checkbox */
.options {
    color: #444;
    margin-top: 12px;
    font-size: 15px;
}

.checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 4px 0;
}

.checkbox input[type="radio"],
.checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #562ed8;
}

.cinema {
    font-size: 17px;
    margin: 16px 0 6px;
    font-weight: 600;
    color: #333;
}

/* Form message (validation / server feedback) */
.form-message {
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 14px;
    display: none;
}

.form-message.error {
    display: block;
    background: #fee;
    color: #c33;
    border: 1px solid #fcc;
}

.form-message.success {
    display: block;
    background: #efe;
    color: #2a7;
    border: 1px solid #afa;
}

/* Submit button */
button[type="submit"] {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    background: #562ed8;
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.25s ease;
    margin-top: 8px;
}

button[type="submit"]:hover {
    background: #039ffa;
}

button[type="submit"]:disabled {
    background: #999;
    cursor: not-allowed;
}

/* Auth toggle (switch between signup/signin) */
.auth-toggle {
    text-align: center;
    margin-top: 20px;
    color: #444;
    font-size: 14px;
}

.auth-toggle a {
    color: #562ed8;
    font-weight: 600;
    margin-left: 5px;
}

.auth-toggle a:hover {
    text-decoration: underline;
}

/* =======================================================
   DASHBOARD PAGE
   ======================================================= */
.dash-page {
    min-height: 100vh;
    background: #f5f5f5;
}

.dash-page .navbar {
    position: relative;
    background: rgba(10, 10, 10, 0.98);
}

.dash-container {
    max-width: 960px;
    margin: 0 auto;
    padding: 80px 20px 40px;
}

.dash-header {
    margin-bottom: 36px;
}

.dash-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: #222;
}

.dash-header p {
    color: #666;
    font-size: 16px;
    margin-top: 4px;
}

/* Dashboard card grid */
.dash-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.dash-card {
    background: #fff;
    border-radius: 10px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.dash-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.dash-card-icon {
    font-size: 28px;
    margin-bottom: 12px;
}

.dash-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #333;
}

.dash-card p {
    color: #777;
    font-size: 14px;
    margin-bottom: 10px;
}

/* Booking history */
.bookings-list {
    background: #fff;
    border-radius: 10px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.bookings-list h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #333;
}

.booking-item {
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
}

.booking-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.booking-item-header strong {
    font-size: 15px;
    color: #333;
}

.booking-status {
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
}
.booking-status.confirmed {
    background: #efe;
    color: #2a7;
}

.bookings-list .text-muted {
    color: #888;
    font-size: 14px;
}

/* =======================================================
   BOOKING PAGE
   ======================================================= */
.booking-form {
    background: #fff;
    border-radius: 10px;
    padding: 32px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.booking-step {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid #eee;
}

.booking-step:last-of-type {
    border-bottom: none;
}

.booking-step h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #333;
}

.option-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.option-card {
    display: block;
    cursor: pointer;
}

.option-card input {
    display: none;
}

.option-card-content {
    display: block;
    padding: 14px 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.option-card input:checked + .option-card-content {
    border-color: #562ed8;
    background: rgba(86,46,216,0.06);
    box-shadow: 0 0 0 1px #562ed8;
}

.option-card:hover .option-card-content {
    border-color: #562ed8;
}

.option-movie-thumb {
    display: block;
    height: 80px;
    border-radius: 6px;
    margin-bottom: 10px;
    width: 100%;
    background-color: #2a1a5e;
}

.option-title {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: #222;
}

.option-desc {
    display: block;
    font-size: 13px;
    color: #888;
    margin-top: 2px;
}

/* --- Seat Grid --- */
.seat-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 8px;
    max-width: 400px;
    margin: 0 auto 16px;
}

.seat {
    width: 100%;
    aspect-ratio: 1;
    border: none;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.seat.available {
    background: #e0e7ff;
    color: #444;
}
.seat.available:hover {
    background: #562ed8;
    color: #fff;
    transform: scale(1.1);
}

.seat.selected {
    background: #562ed8;
    color: #fff;
}

.seat.booked {
    background: #ddd;
    color: #aaa;
    cursor: not-allowed;
}

#seat-count {
    text-align: center;
    margin-top: 8px;
    font-size: 14px;
    color: #666;
}

/* =======================================================
   RESPONSIVE
   ======================================================= */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 32px;
    }
    .hero-content p {
        font-size: 16px;
    }
    .nav-links {
        gap: 12px;
    }
    .nav-links a {
        font-size: 13px;
    }
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    .movie-grid {
        grid-template-columns: 1fr;
    }
    .option-grid {
        grid-template-columns: 1fr 1fr;
    }
    .seat-grid {
        grid-template-columns: repeat(8, 1fr);
        gap: 4px;
    }
    .seat {
        font-size: 9px;
    }
    .dash-container {
        padding: 80px 16px 40px;
    }
}

@media (max-width: 480px) {
    .option-grid {
        grid-template-columns: 1fr;
    }
    .seat-grid {
        grid-template-columns: repeat(6, 1fr);
    }
    .navbar {
        padding: 0 12px;
    }
    .nav-logo {
        font-size: 17px;
    }
}
