:root {
    --primary: #A34A2A; /* Deep Terracotta */
    --secondary: #D4A373; /* Muted Gold */
    --accent: #F0EAD2; /* Light Cream */
    --bg: #FDFBF8; /* Off-White Background */
    --surface: #FFFFFF; /* White Surface */
    --text: #333333; /* Dark Grey Text */
    --muted: #6B7280; /* Muted Grey */
    --radius: 8px;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 8px 20px rgba(0, 0, 0, 0.15);
}

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

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    color: var(--primary);
    margin-bottom: 0.8em;
    line-height: 1.2;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
p { margin-bottom: 1em; }

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s ease;
}
a:hover { color: var(--secondary); }

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

.section-padded {
    padding: 4rem 0;
}

.text-center {
    text-align: center;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--muted);
    margin-bottom: 2rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    border-radius: var(--radius);
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--surface);
}
.btn-primary:hover {
    background-color: #8C3E22;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-secondary {
    background-color: var(--secondary);
    color: var(--text);
}
.btn-secondary:hover {
    background-color: #C29260;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}
.btn-outline:hover {
    background-color: var(--primary);
    color: var(--surface);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn:active { transform: scale(0.97); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Header */
.site-header {
    background-color: var(--surface);
    padding: 1rem 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
}

.main-nav .nav-list {
    display: flex;
    list-style: none;
}

.main-nav .nav-list li {
    margin-left: 2rem;
}

.main-nav .nav-list a {
    color: var(--text);
    font-weight: 700;
    padding: 0.5rem 0;
    position: relative;
}

.main-nav .nav-list a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: width 0.3s ease;
}

.main-nav .nav-list a:hover::after,
.main-nav .nav-list a.active::after {
    width: 100%;
}

.hamburger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.hamburger-menu .bar {
    width: 100%;
    height: 3px;
    background-color: var(--text);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    background: url('https://picsum.photos/seed/hotel-lobby/1920/1080') no-repeat center center/cover;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--surface);
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding: 2rem;
}

.hero-content h1 {
    color: var(--surface);
    margin-bottom: 0.5em;
}

.hero-content p {
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    margin-bottom: 2rem;
}

/* Room Listings */
.date-selection-container {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-end;
}

.form-group {
    margin-bottom: 1rem;
    flex: 1;
    min-width: 200px;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 700;
    color: var(--primary);
}

.form-input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid #ddd;
    border-radius: var(--radius);
    font-size: 1rem;
    color: var(--text);
    background-color: var(--surface);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb, 163, 74, 42), 0.2);
    outline: none;
}

.date-selection-container .btn {
    margin-top: 1rem;
    flex-shrink: 0;
}

.grid-3-col {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.room-card {
    background-color: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.room-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.room-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.room-card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.room-card-content h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.room-card-content p {
    font-size: 0.95rem;
    color: var(--muted);
    margin-bottom: 1rem;
    flex-grow: 1;
}

.room-card-price {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
}

.room-card-price span {
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--muted);
}

.room-card .btn {
    width: 100%;
    margin-top: auto; /* Pushes button to the bottom */
}

.loading-message, #no-rooms-message {
    grid-column: 1 / -1;
    text-align: center;
    font-size: 1.2rem;
    color: var(--muted);
}

.hidden {
    display: none !important;
}

/* Footer */
.site-footer {
    background-color: var(--text);
    color: var(--surface);
    padding: 2rem 0;
    text-align: center;
    margin-top: auto;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: var(--surface);
    padding: 2rem;
    border-radius: var(--radius);
    max-width: 500px;
    width: 90%;
    position: relative;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.modal.active .modal-content {
    transform: translateY(0);
}

.modal-content h3 {
    margin-top: 0;
    color: var(--primary);
}

.modal-content .close-button {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--muted);
}

#modal-room-details p {
    margin-bottom: 0.5rem;
}

#modal-room-details .total-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-top: 1rem;
    margin-bottom: 1.5rem;
}

.error-message {
    color: #dc3545;
    font-size: 0.9em;
    margin-top: 0.25em;
    display: none;
}

/* Admin Panel Specific Styles */
.admin-main {
    padding: 4rem 0;
}

#password-prompt {
    max-width: 400px;
    margin: 2rem auto;
    padding: 2rem;
    text-align: center;
}

.tabs {
    display: flex;
    margin-bottom: 2rem;
    border-bottom: 1px solid #ddd;
}

.tab-button {
    padding: 1rem 1.5rem;
    background-color: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--muted);
    transition: all 0.3s ease;
}

.tab-button:hover {
    color: var(--primary);
}

.tab-button.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-content {
    margin-top: 2rem;
}

.table-responsive {
    overflow-x: auto;
    margin-top: 1.5rem;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
    background-color: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.data-table th,
.data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.data-table th {
    background-color: var(--primary);
    color: var(--surface);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.data-table tbody tr:hover {
    background-color: #f9f9f9;
}

.status-badge {
    display: inline-block;
    padding: 0.3em 0.6em;
    border-radius: var(--radius);
    font-size: 0.85em;
    font-weight: 700;
    text-transform: capitalize;
}

.status-pending { background-color: #ffc107; color: #343a40; }
.status-paid { background-color: #28a745; color: #fff; }
.status-confirmed { background-color: #007bff; color: #fff; }
.status-cancelled { background-color: #dc3545; color: #fff; }

.table-actions .btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    margin-right: 0.5rem;
}

#add-room-btn {
    margin-bottom: 1.5rem;
}

/* Payment Success Page */
.success-title {
    color: #28a745;
    margin-bottom: 1rem;
}

.success-message {
    font-size: 1.2rem;
    color: var(--text);
    margin-bottom: 1.5rem;
}

.muted-text {
    color: var(--muted);
    font-size: 0.9rem;
    margin-top: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-wrap: wrap;
    }

    .main-nav {
        order: 3;
        width: 100%;
        display: none;
        flex-direction: column;
        background-color: var(--surface);
        box-shadow: var(--shadow);
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        padding: 1rem 0;
    }

    .main-nav.active {
        display: flex;
    }

    .main-nav .nav-list {
        flex-direction: column;
        align-items: center;
    }

    .main-nav .nav-list li {
        margin: 0.5rem 0;
    }

    .hamburger-menu {
        display: flex;
    }

    .hero-content h1 { font-size: 2.5rem; }
    .hero-content p { font-size: 1.1rem; }

    .date-selection-container {
        flex-direction: column;
        align-items: stretch;
    }

    .date-selection-container .btn {
        width: 100%;
    }

    .data-table th,
    .data-table td {
        padding: 0.8rem;
        font-size: 0.9rem;
    }

    .table-actions .btn {
        margin-right: 0.2rem;
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .logo {
        font-size: 1.5rem;
    }

    .section-padded {
        padding: 2rem 0;
    }

    .hero-content h1 { font-size: 2rem; }
    .hero-content p { font-size: 1rem; }

    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }

    .modal-content {
        padding: 1.5rem;
    }

    .modal-content .close-button {
        font-size: 1.5rem;
    }

    .tab-button {
        padding: 0.8rem 1rem;
        font-size: 1rem;
    }
}