/* Global Styles */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600&family=Playfair+Display:wght@600&display=swap');

:root {
    --primary-gold: #D4AF37;
    --primary-dark: #121212;
    --secondary-dark: #1E1E1E;
    --text-light: #F5F5F5;
    --text-muted: #A0A0A0;
    --success: #28a745;
    --error: #dc3545;
    --pending: #ffc107;
    --glass-bg: rgba(30, 30, 30, 0.85);
    --glass-border: 1px solid rgba(212, 175, 55, 0.3);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--primary-dark);
    color: var(--text-light);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-image: radial-gradient(circle at top left, #2a2a2a, #121212);
}

.container {
    width: 100%;
    max-width: 600px;
    padding: 2rem;
    perspective: 1000px;
}

/* Glassmorphism Card */
.card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    border: var(--glass-border);
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

h1,
h2,
h3 {
    font-family: 'Playfair Display', serif;
    color: var(--primary-gold);
    text-align: center;
    margin-bottom: 0.5rem;
}

.subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 2rem;
    letter-spacing: 1px;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    word-wrap: break-word;
    /* Prevent overflow */
}

input,
select,
textarea {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-light);
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-gold);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.2);
    background: rgba(255, 255, 255, 0.1);
}

/* Fix for dropdown visibility on mobile/desktop */
option {
    background-color: var(--secondary-dark);
    color: var(--text-light);
}

/* Fallback for browsers offering white background only */
@media (hover: none) and (pointer: coarse) {
    option {
        color: #000;
        background-color: #fff;
    }
}

/* Room Selection */
.room-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 1.5rem;
}

.room-option {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.room-option:hover,
.room-option.active {
    background: var(--primary-gold);
    color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.room-price-info {
    font-size: 0.8rem;
    color: var(--primary-gold);
    text-align: center;
    margin-top: -1rem;
    margin-bottom: 1.5rem;
    height: 1.2em;
    /* fixed height to prevent jump */
}


/* Time Display Trigger */
.time-display {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.time-display.active {
    border-color: var(--primary-gold);
    background: rgba(255, 255, 255, 0.1);
}

.time-display.has-value {
    color: var(--primary-gold);
    font-weight: bold;
}

.time-display::after {
    content: '\f078';
    /* FontAwesome Chevron Down */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    transition: transform 0.3s;
    font-size: 0.8rem;
}

.time-display.active::after {
    transform: rotate(180deg);
}

/* Time Selection Grid */
.time-slots-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 0.5rem;
    background: rgba(0, 0, 0, 0.2);
    padding: 10px;
    border-radius: 8px;
    animation: slideDown 0.3s ease-out;
}

.time-slot {
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-light);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.time-slot:hover,
.time-slot.active {
    background: var(--primary-gold);
    color: var(--primary-dark);
    font-weight: bold;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.time-slot.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-muted);
    pointer-events: none;
}

.time-separator {
    grid-column: 1 / -1;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-gold);
    font-size: 0.8rem;
    margin-top: 5px;
    margin-bottom: 5px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

/* Buttons */
.btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(45deg, var(--primary-gold), #F0E68C);
    color: var(--primary-dark);
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--text-muted);
    color: var(--text-muted);
}

.btn-secondary:hover {
    border-color: var(--text-light);
    color: var(--text-light);
}

/* Message Toggle */
.message-toggle {
    text-align: center;
    margin-bottom: 1rem;
    color: var(--primary-gold);
    cursor: pointer;
    font-size: 0.9rem;
    text-decoration: underline;
}

.message-box {
    display: none;
    animation: slideDown 0.3s ease-out;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: var(--secondary-dark);
    border: 2px solid var(--primary-gold);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    max-width: 400px;
    position: relative;
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-muted);
}

/* Admin Specific */
.admin-container {
    max-width: 95vw;
    /* Use almost full screen width */
    width: 100%;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.filters {
    display: flex;
    gap: 10px;
    margin-bottom: 1.5rem;
}

.filter-btn {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--primary-gold);
    color: var(--primary-dark);
}

.reservations-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
    overflow: hidden;
}

.reservations-table th,
.reservations-table td {
    padding: 10px 8px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.9rem;
    word-break: break-word;
    /* Allow text to wrap if needed */
}

/* Row background colors based on status */
.reservations-table tr.row-pending {
    background: rgba(255, 193, 7, 0.15);
    /* Yellow tint for pending */
}

.reservations-table tr.row-confirmed {
    background: rgba(40, 167, 69, 0.08);
    /* Subtle green for confirmed */
}

.reservations-table tr.row-cancelled {
    background: rgba(220, 53, 69, 0.08);
    /* Subtle red for cancelled */
}

.reservations-table tbody tr:hover {
    background: rgba(212, 175, 55, 0.1) !important;
    /* Gold on hover */
}

.reservations-table th {
    background: rgba(212, 175, 55, 0.1);
    color: var(--primary-gold);
}

/* ID column width */
.reservations-table th:first-child,
.reservations-table td:first-child {
    min-width: 60px;
    width: 60px;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    /* Prevent vertical wrapping */
    display: inline-block;
}

.status-pending {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
}

.status-confirmed {
    background: rgba(40, 167, 69, 0.2);
    color: #28a745;
}

.status-cancelled {
    background: rgba(220, 53, 69, 0.2);
    color: #dc3545;
}

.action-btn {
    padding: 5px 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 5px;
    font-size: 0.8rem;
}

.btn-confirm {
    background: var(--success);
    color: white;
}

.btn-cancel {
    background: var(--error);
    color: white;
}

.btn-resend {
    background: #ffc107;
    color: var(--primary-dark);
}

@media (max-width: 768px) {
    body {
        justify-content: flex-start;
        /* Align top on mobile to avoid centering issues */
        align-items: flex-start;
        padding-top: 20px;
        background-attachment: scroll;
        /* Fix background scrolling on mobile */
    }

    .container {
        padding: 10px;
        width: 100%;
        max-width: 100%;
        perspective: none;
        /* Remove 3D effect on mobile */
    }

    .card {
        padding: 1rem;
        width: 100%;
        margin: 0;
        border-radius: 12px;
    }

    .reservations-table {
        display: block;
        overflow-x: auto;
    }

    /* Mobile Improvements */
    .room-options {
        grid-template-columns: repeat(3, 1fr);
        gap: 5px;
    }

    .room-option {
        padding: 8px 4px;
        font-size: 0.85rem;
    }

    .room-option i {
        font-size: 1.2rem;
        margin-bottom: 4px;
    }

    .time-slots-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    h1 {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 5px;
        /* Minimal padding */
    }

    .card {
        padding: 0.8rem;
        /* Minimize internal padding */
    }

    .time-slots-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    input,
    select {
        font-size: 16px;
        /* Prevent zoom on iOS */
    }
}