:root {
    --primary-color: #8B5CF6;
    --primary-hover: #7C3AED;
    --bg-dark: #0F172A;
    --card-bg: #1E293B;
    --text-main: #F8FAFC;
    --text-muted: #94A3B8;
    --seat-available: #334155;
    --seat-selected: #8B5CF6;
    --seat-occupied: #F43F5E;
    --glass-bg: rgba(30, 41, 59, 0.7);
}

.performance-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 100px 20px;
    color: var(--text-main);
}

.performance-header {
    text-align: center;
    margin-bottom: 60px;
}

.performance-header h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #fff 0%, #8B5CF6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.performance-header-details {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-top: 5px;
    font-weight: 500;
}

.performance-details {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 60px;
    margin-bottom: 80px;
    align-items: start;
}

.poster-gallery {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.poster-item {
    border-radius: 0;
    overflow: visible;
    box-shadow: none !important;
    background: transparent;
}

.poster-item.second {
    margin-top: 20px;
}

.poster-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.poster-item:hover img {
    transform: scale(1.03);
}

.info-content {
    position: sticky;
    top: 120px;
}

.info-content h2 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 2rem;
    color: var(--text-main);
}


.info-grid {
    display: grid;
    gap: 1.5rem;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.info-item .icon {
    width: 24px;
    color: var(--primary-color);
}

.info-item .label {
    font-weight: 600;
    color: var(--text-muted);
}

.info-address {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.map-links {
    margin-top: 10px;
    display: flex;
    gap: 8px;
}

.map-link {
    font-size: 0.75rem;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.2s;
}

.map-link:hover {
    transform: translateY(-2px);
}

.map-link.naver { background: #03C75A; }
.map-link.google { background: #4285F4; }

.info-description {
    margin-top: 30px;
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-muted);
}

/* Seat Selection Area */
.booking-section {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.booking-title {
    text-align: center;
    margin-bottom: 30px;
}

.time-btn {
    padding: 12px 24px;
    border-radius: 12px;
    border: 1px solid var(--seat-available);
    background: transparent;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.3s;
}

.time-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.seat-map-container {
    margin: 40px auto;
    max-width: 1000px;
    text-align: center;
    background: rgba(15, 23, 42, 0.5);
    padding: 60px 40px;
    border-radius: 40px;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.theater-hall {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: fit-content;
    margin: 0 auto;
}

.stage-label {
    width: 60%;
    margin: 0 auto 60px;
    padding: 15px;
    background: linear-gradient(180deg, rgba(139, 92, 246, 0.2) 0%, transparent 100%);
    border-top: 4px solid var(--primary-color);
    border-radius: 40px 40px 0 0;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: 0.5rem;
    text-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
}

.seat-sections-wrapper {
    display: flex;
    gap: 60px;
    justify-content: center;
    margin-bottom: 40px;
}

.seat-section {
    flex: 1;
    min-width: 300px;
}

.section-header {
    margin-bottom: 25px;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.section-header .sub {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.seat-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 8px;
    justify-content: center;
}

.lobby-label {
    width: 40%;
    margin: 40px auto 0;
    padding: 10px;
    border-bottom: 2px solid var(--seat-available);
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.3rem;
}

/* Base seat style */
.seat {
    aspect-ratio: 1;
    background: rgba(51, 65, 85, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    -webkit-tap-highlight-color: transparent; /* Remove mobile tap blue highlight */
    touch-action: manipulation; /* Prevent double-tap zoom */
    color: rgba(255, 255, 255, 0.4);
}

/* Click/Touch effect for immediate feedback */
.seat:active {
    transform: scale(0.9) !important;
}

/* Desktop-only hover effects */
@media (pointer: fine) {
    .seat:hover:not(.occupied) {
        color: white !important;
        transform: translateY(-2px) scale(1.05);
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
        z-index: 10;
    }

    .seat.selected:hover, .seat.my-seat:hover {
        box-shadow: 0 0 40px rgba(139, 92, 246, 0.8) !important;
        filter: brightness(1.1);
    }
}

.seat.selected {
    background: var(--seat-selected) !important;
    color: white !important;
    box-shadow: 0 0 25px rgba(139, 92, 246, 0.6);
    border-color: rgba(255, 255, 255, 0.4);
    animation: seatPulse 2s infinite ease-in-out;
}

.seat.my-seat {
    background: #8b5cf6 !important;
    color: white !important;
    border: 2px solid white;
    box-shadow: 0 0 25px rgba(139, 92, 246, 0.6);
}

@keyframes seatPulse {
    0% { box-shadow: 0 0 20px rgba(139, 92, 246, 0.5); }
    50% { box-shadow: 0 0 40px rgba(139, 92, 246, 0.7); }
    100% { box-shadow: 0 0 20px rgba(139, 92, 246, 0.5); }
}

.seat.occupied {
    background: var(--seat-occupied);
    cursor: not-allowed;
    border-color: rgba(255, 255, 255, 0.2);
    opacity: 0.85;
    color: white;
}

/* Admin coordination style for occupied seats */
.seat.occupied.occupied-admin {
    background: linear-gradient(135deg, #ff4757, #ffa502) !important;
    cursor: pointer !important;
    opacity: 0.9 !important;
    border: 2px solid white !important;
    box-shadow: 0 0 15px rgba(255, 71, 87, 0.4);
}

.seat.occupied.occupied-admin:hover {
    transform: scale(1.15) rotate(3deg);
    filter: brightness(1.2);
    z-index: 20;
}

.seat-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.mobile-hint {
    display: none;
    text-align: center;
    margin-top: 20px;
    padding: 10px;
    font-size: 0.85rem;
    color: var(--primary-color);
    background: rgba(139, 92, 246, 0.1);
    border-radius: 12px;
    animation: pulseHint 2s infinite;
}

@keyframes pulseHint {
    0%, 100% { opacity: 0.7; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.02); }
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.legend-box {
    width: 16px;
    height: 16px;
    border-radius: 4px;
}

.booking-form-header {
    margin-bottom: 20px;
    text-align: center;
}

.selected-seats-summary {
    text-align: center;
    margin-bottom: 20px;
    color: var(--primary-color);
    font-weight: 600;
}

.booking-form.visible {
    display: block;
    animation: fadeInUp 0.5s ease-out;
}

.reserve-btn.login-required {
    text-align: center;
    display: block;
    text-decoration: none;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

input {
    width: 100%;
    padding: 14px;
    margin-bottom: 1.25rem;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1rem;
    transition: all 0.3s;
}

input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.1);
}

.reserve-btn {
    width: 100%;
    padding: 16px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.3s;
}

.reserve-btn:hover {
    background: var(--primary-hover);
}

.non-member-notice {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: -10px 0 20px 5px;
    line-height: 1.4;
}

.login-hint {
    text-align: center;
    margin-top: 15px;
    font-size: 0.9rem;
}

.login-hint a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.login-hint a:hover {
    text-decoration: underline;
}

.lookup-link-container {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.lookup-link-container a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 700;
    margin-left: 10px;
    border-bottom: 1px solid var(--primary-color);
}

.lookup-link-container a:hover {
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .performance-container {
        padding: 60px 15px;
    }
    .performance-header {
        margin-bottom: 40px;
    }
    .performance-header h1 {
        font-size: 2.2rem;
        letter-spacing: -1px;
    }
    .performance-details {
        grid-template-columns: 1fr;
        gap: 30px;
        margin-bottom: 50px;
    }
    .poster-gallery {
        gap: 15px;
    }
    .info-content h2 {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
    }
    .booking-section {
        padding: 24px 16px;
        border-radius: 20px;
    }
    .time-selection {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    .time-btn {
        flex: 1;
        min-width: 100px;
        padding: 10px;
        font-size: 0.9rem;
    }
    .seat-map-container {
        padding: 30px 0; /* Remove horizontal padding for bleed */
        margin: 20px 0;
        border-radius: 24px;
        width: 100vw;
        margin-left: calc(-50vw + 50%); /* Center and bleed */
        overflow-x: auto;
    }
    .theater-hall {
        padding: 0 20px;
    }
    .seat-sections-wrapper {
        display: flex;
        flex-direction: row; /* Side-by-side even on mobile */
        gap: 20px;
        width: fit-content;
        margin: 0 auto;
        padding-bottom: 20px;
    }
    .seat-section {
        min-width: 280px; /* Fixed width to prevent squishing */
    }
    .mobile-hint {
        display: block;
    }
    .seat-grid {
        gap: 6px;
        display: grid;
        grid-template-columns: repeat(8, 1fr);
    }
    .seat {
        font-size: 0.7rem;
        border-radius: 6px;
        height: 35px; /* Minimum tap target height */
        width: 35px;
    }
    .stage-label {
        width: 90%;
        margin-bottom: 40px;
        font-size: 1rem;
        letter-spacing: 0.3rem;
    }
    .lobby-label {
        width: 90%;
        margin-top: 30px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .performance-header h1 {
        font-size: 2rem;
    }
    .seat-grid {
        gap: 5px;
    }
    .seat-legend {
        flex-wrap: wrap;
        gap: 10px 20px;
    }
}

/* User Status Banner */
.user-status-banner {
    margin-top: 25px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 0.95rem;
    animation: fadeIn 0.8s ease-out;
}

.user-status-banner.guest {
    background: rgba(148, 163, 184, 0.1);
    border: 1px solid rgba(148, 163, 184, 0.2);
    color: var(--text-main);
}

.user-status-banner.member {
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.2);
    color: var(--primary-color);
}

.status-links {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-left: 10px;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
}

.status-link {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.status-link:hover {
    color: var(--primary-color);
}

.status-link.danger:hover {
    color: var(--seat-occupied);
}

.divider {
    color: rgba(255, 255, 255, 0.2);
    font-size: 0.8rem;
}

.success-message {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 0.95rem;
    margin-bottom: 25px;
    border: 1px solid rgba(16, 185, 129, 0.2);
    text-align: center;
}

/* Form Styles */
.user-status-banner.editing {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    color: #f59e0b; /* Amber/Orange for Editing */
}

.readonly-input {
    background: rgba(15, 23, 42, 0.4);
    border-color: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    cursor: default;
}

.readonly-input:focus {
    border-color: rgba(255, 255, 255, 0.05);
    box-shadow: none;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Closed Banner Styles */
.closed-banner {
    background: var(--card-bg);
    border: 2px dashed var(--text-muted);
    border-radius: 24px;
    padding: 60px 20px;
    text-align: center;
    margin: 40px 0;
    animation: fadeIn 0.8s ease-out;
}

.closed-content {
    max-width: 500px;
    margin: 0 auto;
}

.closed-icon {
    font-size: 4rem;
    display: block;
    margin-bottom: 20px;
}

.closed-banner h3 {
    font-size: 1.8rem;
    color: var(--text-main);
    margin-bottom: 15px;
}

.closed-banner p {
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1.6;
}

.closed-hint {
    margin-top: 25px;
    padding: 10px 20px;
    background: rgba(139, 92, 246, 0.1);
    color: var(--primary-color);
    border-radius: 50px;
    display: inline-block;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Reservation Dashboard Styles */
.my-tickets-dashboard {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.9) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 30px;
    margin: 40px 0;
    color: white;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6),
        inset 0 1px 1px rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: dashboardSlideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.my-tickets-dashboard::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

@keyframes dashboardSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.dashboard-header {
    margin-bottom: 30px;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.dashboard-title-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
}

.ticket-icon {
    font-size: 1.4rem;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(245, 158, 11, 0.2);
    color: #000;
}

.dashboard-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.ticket-count {
    font-size: 0.95rem;
    color: #94a3b8;
    margin: 0;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ticket-count::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #fbbf24;
    border-radius: 50%;
    box-shadow: 0 0 8px #fbbf24;
}

.ticket-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.ticket-item {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 20px;
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.ticket-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
    border-color: rgba(139, 92, 246, 0.4);
}

.ticket-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ticket-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #64748b;
    font-weight: 800;
}

.ticket-time {
    font-weight: 800;
    font-size: 1.4rem;
    color: #f8fafc;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ticket-time::before {
    content: '🕒';
    font-size: 1.1rem;
    filter: sepia(1) saturate(5) hue-rotate(320deg);
}

.ticket-seats {
    background: rgba(139, 92, 246, 0.2);
    padding: 6px 16px;
    border-radius: 10px;
    font-size: 0.9rem;
    color: #c4b5fd;
    width: fit-content;
    border: 1px solid rgba(139, 92, 246, 0.3);
    font-weight: 700;
    margin-top: 4px;
}

.view-ticket-link {
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    padding: 12px 28px;
    border-radius: 14px;
    font-weight: 800;
    font-size: 0.95rem;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.view-ticket-link::after {
    content: '→';
    font-size: 1.1rem;
    transition: transform 0.3s;
}

.view-ticket-link:hover {
    background: var(--primary-hover);
    transform: translateX(4px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.5);
}

.view-ticket-link:hover::after {
    transform: translateX(5px);
}

@media (max-width: 768px) {
    .my-tickets-dashboard {
        padding: 24px;
        margin: 30px 0;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .ticket-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
    }

    .view-ticket-link {
        width: 100%;
        justify-content: center;
    }

    .ticket-time {
        font-size: 1.2rem;
    }
}

