* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    min-height: 100vh;
    color: #fff;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.movie-info {
    text-align: center;
    margin-bottom: 30px;
}

.movie-info h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    background: linear-gradient(90deg, #ffffff, #e0e0e0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.movie-info p {
    color: #a0a0a0;
    font-size: 1.1rem;
}

.cinema-container {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
    justify-content: center;
}

.cinema-hall {
    flex: 1;
    min-width: 300px;
}

.screen {
    background: linear-gradient(180deg, #064e3b 0%, #059669 100%);
    height: 60px;
    margin: 20px 0 40px;
    transform: perspective(300px) rotateX(-5deg);
    border-radius: 10px;
    box-shadow: 0 20px 50px rgba(5, 150, 105, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.screen span {
    color: white;
    font-weight: bold;
    font-size: 14px;
    letter-spacing: 3px;
}

.seats-grid {
    display: grid;
    gap: 8px;
    justify-content: center;
}

.row {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.seat {
    width: 35px;
    height: 35px;
    border: none;
    border-radius: 8px 8px 12px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    background: #2d2d44;
}

.seat::before {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 5px;
    background: inherit;
    border-radius: 0 0 5px 5px;
}

.seat-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 15px;
    font-weight: bold;
    color: white;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.seat.selected .seat-label,
.seat.selected-release .seat-label,
.seat.previously-selected .seat-label {
    opacity: 1;
}

.seat.unavailable {
    background: #1a1a2e;
    border: 2px solid #2a2a3e;
    opacity: 0.3;
}

.seat.unavailable.disabled {
    pointer-events: none;
}

.seat-placeholder {
    width: 35px;
    height: 35px;
    margin: 0;
    border-radius: 8px;
    background: transparent;
    border: none;
}

.seat:hover:not(.occupied):not(.unavailable) {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.5);
}

.seat.available {
    background: #2d2d44;
    border: 2px solid #4a4a6a;
}

.seat.available:hover {
    background: #3d3d54;
}

.seat.selected {
    background: linear-gradient(135deg, #10b981, #34d399);
    border: 2px solid #6ee7b7;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.6);
}

.seat.previously-selected {
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
    border: 2px solid #93c5fd;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.6);
}

.seat.occupied.previously-selected {
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
    border: 2px solid #93c5fd;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.6);
    opacity: 1;
}

.seat.occupied {
    background: #1a1a2e;
    border: 2px solid #2a2a3e;
    cursor: not-allowed;
    opacity: 0.5;
}

.seat.selected-release {
    background: linear-gradient(135deg, #ef4444, #f87171);
    border: 2px solid #fca5a5;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.6);
}

.seat.occupied.previously-selected.selected-release {
    background: linear-gradient(135deg, #ef4444, #f87171);
    border: 2px solid #fca5a5;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.6);
    opacity: 1;
}

.booking-panel {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 30px;
    min-width: 300px;
    height: fit-content;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.booking-panel h2 {
    margin-bottom: 20px;
    font-size: 1.5rem;
    color: #10b981;
}

.legend {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.legend-seat {
    width: 20px;
    height: 20px;
    border-radius: 4px;
}

.legend-seat.available {
    background: #2d2d44;
    border: 2px solid #4a4a6a;
}

.legend-seat.selected {
    background: linear-gradient(135deg, #10b981, #34d399);
}

.legend-seat.occupied {
    background: #1a1a2e;
    border: 2px solid #2a2a3e;
    opacity: 0.5;
}

.legend-seat.selected-release {
    background: linear-gradient(135deg, #ef4444, #f87171);
}

.selected-seats {
    margin-bottom: 20px;
}

.selected-seats h3 {
    margin-bottom: 10px;
    font-size: 1.1rem;
    color: #a0a0a0;
}

.seats-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 40px;
}

.seat-tag {
    background: linear-gradient(135deg, #10b981, #34d399);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.no-seats {
    color: #666;
    font-style: italic;
}

.total-price {
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 10px;
}

.total-price h3 {
    margin-bottom: 5px;
    font-size: 1.1rem;
    color: #a0a0a0;
}

.price {
    font-size: 2rem;
    font-weight: bold;
    color: #10b981;
}

.book-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #10b981, #34d399);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.book-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.4);
}

.book-btn:disabled {
    background: #444;
    cursor: not-allowed;
    opacity: 0.5;
}

.book-btn.release-mode {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #ef4444, #f87171);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.book-btn.release-mode:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(239, 68, 68, 0.4);
}

.mode-toggle {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.mode-btn {
    flex: 1;
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #a0a0a0;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mode-btn.active {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border-color: #10b981;
}

.mode-btn:not(.active):hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.row-label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 25px;
    font-size: 0.8rem;
    color: #666;
    font-weight: bold;
}

.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: rgba(30, 30, 50, 0.95);
    color: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    min-width: 300px;
    max-width: 90vw;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}

.toast.show {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
}

.toast.error {
    background: rgba(239, 68, 68, 0.95);
}

.toast.error h3 {
    color: #ef4444;
}

.toast h3 {
    margin: 0 0 15px 0;
    font-size: 1.2rem;
}

.toast p {
    margin: 0 0 20px 0;
    font-size: 1rem;
    opacity: 0.9;
    line-height: 1.5;
    white-space: pre-wrap;
}

.toast-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #10b981, #34d399);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.toast-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(16, 185, 129, 0.4);
}

.toast-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
}

.toast-overlay.show {
    display: block;
}

.notification-toast {
    position: fixed;
    top: 20px;
    right: -400px;
    background: rgba(30, 30, 50, 0.95);
    color: white;
    padding: 20px 30px;
    border-radius: 15px;
    text-align: center;
    min-width: 250px;
    max-width: 350px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    transition: all 0.4s ease;
}

.notification-toast.error {
    color: #ef4444;
}

.notification-toast.show {
    opacity: 1;
    right: 20px;
}

.notification-toast.hide {
    opacity: 0;
    right: -400px;
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .cinema-container {
        flex-direction: column;
        gap: 20px;
    }

    .cinema-hall {
        min-width: unset;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .seats-grid {
        min-width: max-content;
    }

    .seat {
        width: 35px;
        height: 35px;
    }

    .seat-placeholder {
        width: 35px;
        height: 35px;
    }

    .seat-label {
        font-size: 18px;
    }

    .row-label {
        width: 18px;
        font-size: 0.7rem;
    }

    .booking-panel {
        padding: 15px;
        width: 100%;
        box-sizing: border-box;
    }

    .movie-info h1 {
        font-size: 1.4rem;
    }

    .row {
        gap: 4px;
    }

    .seats-grid {
        gap: 4px;
    }
}

/* Admin Styles */
.admin-container {
    max-width: 800px;
    margin: 0 auto;
}

.admin-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid #333;
}

.admin-header h1 {
    font-size: 2rem;
    margin-bottom: 10px;
    color: #10b981;
}

.back-link {
    display: inline-block;
    margin-bottom: 20px;
    color: #a0a0a0;
    text-decoration: none;
}

.back-link:hover {
    color: #10b981;
}

.settings-panel {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 30px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.setting-item {
    margin-bottom: 25px;
}

.setting-item label {
    display: block;
    margin-bottom: 8px;
    color: #a0a0a0;
    font-size: 0.9rem;
}

.setting-item input {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid #333;
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
}

.setting-item input:focus {
    outline: none;
    border-color: #10b981;
}

.save-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #10b981, #34d399);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.4);
}

.message {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: none;
}

.message.success {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #22c55e;
    color: #10b981;
}

.message.error {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #ef4444;
    color: #ef4444;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid #333;
}

.tab {
    padding: 12px 24px;
    background: transparent;
    border: none;
    color: #a0a0a0;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.tab:hover {
    color: #10b981;
}

.tab.active {
    color: #10b981;
    border-bottom-color: #10b981;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

