/* Global Styles */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;700&display=swap');

:root {
    --bg-color: #F9F7F2;
    /* Softer Cream/White */
    --card-bg: #FFFFFF;
    --primary-wood: #8D6E63;
    /* Warm Wood */
    --dark-wood: #6D4C41;
    /* Hover State */
    --text-main: #4E342E;
    /* Dark Brown Text */
    --text-muted: #8D8D8D;
    --shadow-soft: 0 4px 20px rgba(78, 52, 46, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* Main Container */
.container {
    text-align: center;
    width: 100%;
    max-width: 480px;
    padding: 2rem;
}

/* Logo */
.logo {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

/* Button Group */
.button-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Button Styling */
.btn {
    display: block;
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 500;
    text-decoration: none;
    color: white;
    background-color: var(--primary-wood);
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(141, 110, 99, 0.2);
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: var(--dark-wood);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(109, 76, 65, 0.3);
}

.btn:active {
    transform: translateY(0);
}

/* Secondary Button Style (Optional lighter variant if needed later) */
.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary-wood);
    color: var(--primary-wood);
}

.btn-outline:hover {
    background-color: var(--primary-wood);
    color: white;
}

/* Seat Selection Styles */
:root {
    /* ... existing vars ... */
    --seat-available: #A5D6A7;
    /* Pastel Green */
    --seat-reserved: #CFD8DC;
    /* Blue Grey */
    --seat-hover: #81C784;
    /* Darker Green for hover */
}

.seat {
    height: 80px;
    background-color: var(--seat-reserved);
    /* Default to reserved color if unknown */
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-main);
    cursor: default;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.seat.available {
    background-color: var(--seat-available);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.2);
}

.seat.available:hover {
    background-color: var(--seat-hover);
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.seat.reserved {
    background-color: var(--seat-reserved);
    color: var(--text-muted);
    cursor: pointer;
    /* Changed from not-allowed to allow cancellation */
}

/* Modal Styles */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: 16px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.time-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
    text-align: left;
}

.time-option {
    padding: 1rem;
    border: 2px solid #E0E0E0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.time-option:hover {
    border-color: var(--primary-wood);
    background-color: #FAFAFA;
}

.time-option input[type="radio"] {
    accent-color: var(--primary-wood);
    width: 20px;
    height: 20px;
}

.time-label {
    flex: 1;
    font-weight: 500;
}

.time-price {
    font-weight: 700;
    color: var(--primary-wood);
}

/* Seat Page Specifics */
.seat-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.seat-header {
    text-align: center;
    margin-bottom: 2rem;
}

.seat-legend {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
}

.seat-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
    margin-top: 1rem;
}

@media (max-width: 600px) {
    .seat-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1rem;
    }
}

/* ============================================
   MOBILE RESPONSIVE STYLES
============================================ */

/* Mobile-first adjustments */
@media (max-width: 768px) {
    .container {
        padding: 1.5rem 1rem;
        max-width: 100%;
    }

    .logo {
        font-size: 2rem;
        margin-bottom: 2rem;
    }

    .btn {
        padding: 0.9rem;
        font-size: 1rem;
        border-radius: 10px;
        /* Larger touch target */
        min-height: 48px;
    }

    .seat-container {
        padding: 1rem;
    }

    .seat-legend {
        flex-wrap: wrap;
        gap: 1rem;
        justify-content: center;
    }

    .modal-content {
        margin: 1rem;
        padding: 1.5rem;
        max-width: calc(100% - 2rem);
    }

    .modal-title {
        font-size: 1.3rem;
    }

    .time-options {
        gap: 0.75rem;
    }

    .time-option {
        padding: 0.85rem;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    body {
        padding: 0;
    }

    .container {
        padding: 1rem;
    }

    .logo {
        font-size: 1.75rem;
        margin-bottom: 1.5rem;
    }

    .btn {
        font-size: 0.95rem;
        padding: 0.85rem;
    }

    .button-group {
        gap: 0.75rem;
    }

    .seat-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
    }

    .seat {
        height: 60px;
        font-size: 1rem;
        border-radius: 8px;
    }

    .seat-legend {
        font-size: 0.85rem;
    }

    .legend-color {
        width: 16px;
        height: 16px;
    }
}

/* Form elements touch-friendly */
@media (max-width: 768px) {

    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="tel"],
    input[type="number"],
    select,
    textarea {
        font-size: 16px !important;
        /* Prevents iOS zoom on focus */
        padding: 0.85rem;
        min-height: 48px;
    }

    .form-group {
        margin-bottom: 1.25rem;
    }

    .form-input {
        padding: 0.85rem;
    }
}

/* Safe area for notched devices */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    body {
        padding-bottom: env(safe-area-inset-bottom);
    }
}