:root {
    --primary: #c5a880; /* Elegant gold/bronze */
    --primary-dark: #a68b64;
    --bg-dark: #121212;
    --bg-card: #1e1e1e;
    --text-main: #f5f5f5;
    --text-muted: #aaaaaa;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Outfit', sans-serif;
    --transition: all 0.3s ease;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 500;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(18, 18, 18, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--primary);
    font-weight: 700;
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.95rem;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary);
}

/* Buttons */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-primary {
    background: var(--primary);
    color: #000;
    border: none;
    padding: 0.8rem 1.5rem;
    font-family: var(--font-body);
    font-weight: 600;
    cursor: pointer;
    border-radius: 2px;
    transition: var(--transition);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-primary.large {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
    padding: 0.6rem 1.2rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-outline:hover {
    background: var(--primary);
    color: #000;
}

/* Hero Section */
.hero {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 20px;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, rgba(18,18,18,1) 100%);
    z-index: -1;
}

.hero-content {
    max-width: 800px;
    animation: fadeInUp 1s ease forwards;
}

.hero-content h1 {
    font-size: 4.5rem;
    margin-bottom: 1rem;
    color: #fff;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.5);
}

.hero-content p {
    font-size: 1.2rem;
    color: #eaeaea;
    margin-bottom: 2.5rem;
    font-weight: 300;
}

/* Sections */
.section {
    padding: 6rem 5%;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.8rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Grid layout for Rooms */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.card {
    background: var(--bg-card);
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.4);
    border-color: rgba(197, 168, 128, 0.3);
}

.card-img-wrapper {
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.card:hover .card-img-wrapper img {
    transform: scale(1.05);
}

.card-content {
    padding: 2rem;
}

.card-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.card-content p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    line-height: 1.6;
}

.card-content .btn-primary {
    width: 100%;
}

/* Split Layouts for Dining/Spa */
.split-layout {
    display: flex;
    align-items: center;
    gap: 4rem;
    margin-bottom: 4rem;
}

.split-layout.reverse {
    flex-direction: row-reverse;
}

.split-content {
    flex: 1;
}

.split-content h2 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.split-content p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.amenity-features {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.amenity-features li {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
    padding-left: 1.25rem;
    position: relative;
}

.amenity-features li::before {
    content: '✦';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-size: 0.7rem;
    top: 0.2rem;
}

.amenity-features strong {
    color: var(--text-main);
}

.split-image {
    flex: 1;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.split-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.8s ease;
}

.split-image:hover img {
    transform: scale(1.03);
}

/* Footer */
.footer {
    background: #0a0a0a;
    padding: 4rem 5% 2rem;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3rem;
}

.footer-brand h3 {
    color: var(--primary);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-bottom {
    text-align: center;
    color: #555;
    font-size: 0.8rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.05);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 3rem;
    }
    .split-layout, .split-layout.reverse {
        flex-direction: column;
    }
    .nav-links {
        display: none;
    }
}

/* Fallback Chat Widget */
#fallback-chat-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 380px;
    height: 500px;
    background: rgba(30, 30, 30, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(197, 168, 128, 0.2);
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.6);
    display: flex;
    flex-direction: column;
    z-index: 10000;
    transition: opacity 0.3s ease, transform 0.3s ease, border-color 0.35s ease, box-shadow 0.35s ease, background 0.35s ease;
    font-family: var(--font-body);
    overflow: hidden;
}

#fallback-chat-widget.chat-mode-assistant {
    border-color: rgba(197, 168, 128, 0.38);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(197, 168, 128, 0.08);
}

#fallback-chat-widget.chat-mode-live {
    background: rgba(20, 32, 30, 0.92);
    border-color: rgba(72, 168, 148, 0.5);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(72, 168, 148, 0.12);
}

#fallback-chat-widget.fallback-chat-hidden {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
}

.chat-header {
    background: rgba(18, 18, 18, 0.9);
    padding: 1rem 1.2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.35s ease, border-color 0.35s ease;
}

.chat-mode-assistant .chat-header {
    background: linear-gradient(135deg, rgba(36, 32, 24, 0.98), rgba(18, 18, 18, 0.95));
    border-bottom-color: rgba(197, 168, 128, 0.22);
}

.chat-mode-live .chat-header {
    background: linear-gradient(135deg, rgba(24, 44, 40, 0.98), rgba(16, 26, 24, 0.96));
    border-bottom-color: rgba(72, 168, 148, 0.28);
}

.chat-mode-live .chat-header-info h4 {
    color: #d4f0ea;
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.chat-avatar {
    font-size: 1.5rem;
}

.chat-header-info h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    margin: 0;
}

.chat-status-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    margin-top: 0.1rem;
}

.status-line {
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    line-height: 1.2;
}

.status-line[hidden],
.chat-live-banner[hidden] {
    display: none !important;
}

.status-assistant-line {
    color: var(--primary);
    font-weight: 500;
}

.status-typing-line {
    color: var(--text-muted);
    font-style: italic;
}

.status-typing-line:not([hidden]) {
    animation: chat-typing-pulse 1.2s ease-in-out infinite;
}

.status-live-line {
    color: #6fd4c0;
    font-weight: 600;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-dot-assistant {
    background-color: var(--primary);
}

.status-dot-live {
    background-color: #6fd4c0;
    box-shadow: 0 0 6px rgba(111, 212, 192, 0.65);
}

.chat-live-banner {
    padding: 0.55rem 1rem;
    background: rgba(72, 168, 148, 0.16);
    border-bottom: 1px solid rgba(72, 168, 148, 0.3);
    color: #9ee8d8;
    font-size: 0.78rem;
    line-height: 1.4;
    text-align: center;
}

.chat-mode-assistant .chat-footer {
    border-top-color: rgba(197, 168, 128, 0.12);
}

.chat-mode-live .chat-footer {
    border-top-color: rgba(72, 168, 148, 0.2);
}

.chat-mode-live #chat-send-btn {
    background: #48a894;
    color: #0a1412;
}

.chat-mode-live #chat-send-btn:hover {
    background: #6fd4c0;
}

.chat-live-banner strong {
    font-weight: 600;
}

@keyframes chat-typing-pulse {
    0%, 100% { opacity: 0.55; }
    50% { opacity: 1; }
}

.chat-header-actions {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    flex-shrink: 0;
}

#chat-refresh-btn,
#chat-close-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    line-height: 1;
    padding: 0.25rem 0.35rem;
    border-radius: 4px;
}

#chat-refresh-btn {
    font-size: 1.2rem;
}

#chat-close-btn {
    font-size: 1.5rem;
}

#chat-refresh-btn:hover,
#chat-close-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

.chat-km {
    font-family: 'Noto Sans Khmer', 'Khmer OS', 'Leelawadee UI', system-ui, sans-serif;
    line-height: 1.45;
}

.chat-messages {
    flex: 1;
    padding: 1.2rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message {
    max-width: 80%;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.message.bot {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    align-self: flex-start;
    border-bottom-left-radius: 2px;
    border: 1px solid rgba(255, 255, 255, 0.02);
}

.message.bot.chat-rooms,
.message.bot.chat-amenities {
    max-width: 94%;
    padding: 0.65rem;
}

.chat-amenities-intro {
    margin-bottom: 0.75rem;
    line-height: 1.55;
    font-size: 0.9rem;
    font-family: var(--font-heading);
    color: var(--primary);
}

.chat-amenity-card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    padding: 0.55rem;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(197, 168, 128, 0.18);
}

.chat-amenity-img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
}

.chat-amenity-title {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    color: var(--primary);
    margin-bottom: 0.2rem;
}

.chat-amenity-details {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.45;
}

.chat-amenities-footer {
    margin-top: 0.35rem;
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.45;
}

.chat-rooms-intro {
    margin-bottom: 0.75rem;
    line-height: 1.55;
    font-size: 0.86rem;
}

.chat-room-card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    padding: 0.55rem;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(197, 168, 128, 0.18);
}

.chat-room-img {
    width: 100%;
    height: 108px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
}

.chat-room-title {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    color: var(--primary);
    margin-bottom: 0.2rem;
}

.chat-room-price {
    font-size: 0.84rem;
    margin-bottom: 0.25rem;
}

.chat-room-was {
    text-decoration: line-through;
    opacity: 0.55;
    margin-right: 0.15rem;
}

.chat-room-details {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.45;
}

.chat-room-cta,
.chat-booking-submit {
    display: block;
    margin-top: 0.35rem;
    padding: 0.55rem 0.85rem;
    background: var(--primary);
    color: #000;
    font-weight: 600;
    font-size: 0.82rem;
    text-align: center;
    text-decoration: none;
    border-radius: 6px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
    width: 100%;
}

.chat-room-cta:hover,
.chat-booking-submit:hover {
    background: var(--primary-dark);
    color: #000;
}

.message.bot.chat-booking {
    max-width: 94%;
}

.chat-booking-title {
    font-family: var(--font-heading);
    color: var(--primary);
    margin-bottom: 0.35rem;
}

.chat-booking-sub,
.chat-booking-hint,
.chat-booking-demo {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
}

.chat-booking-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin-top: 0.65rem;
}

.chat-booking-btn {
    background: transparent;
    border: 1px solid rgba(197, 168, 128, 0.45);
    color: var(--primary);
    border-radius: 6px;
    padding: 0.55rem 0.65rem;
    font-size: 0.8rem;
    font-family: var(--font-body);
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: var(--transition);
}

.chat-booking-btn:hover:not(:disabled) {
    background: rgba(197, 168, 128, 0.12);
    color: #fff;
}

.chat-booking-btn:disabled {
    opacity: 0.55;
    cursor: default;
}

.chat-booking-form {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin-top: 0.55rem;
}

.booking-field-label {
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}

.booking-field {
    width: 100%;
    padding: 0.5rem 0.65rem;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.25);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 0.82rem;
}

.booking-field-row {
    display: flex;
    gap: 0.45rem;
}

.booking-field-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.chat-booking-divider {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin: 0.5rem 0;
}

.chat-booking-total {
    font-size: 1rem;
    color: var(--primary);
}

.message.user {
    background: var(--primary);
    color: #000;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
    font-weight: 500;
}

.chat-quick-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.85rem;
}

.chat-quick-btn {
    background: transparent;
    border: 1px solid rgba(197, 168, 128, 0.45);
    color: var(--primary);
    border-radius: 6px;
    padding: 0.55rem 0.75rem;
    font-size: 0.82rem;
    font-family: var(--font-body);
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: var(--transition);
}

.chat-quick-btn:hover {
    background: rgba(197, 168, 128, 0.12);
    border-color: var(--primary);
    color: #fff;
}

.chat-live-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.85rem;
}

.chat-live-btn {
    flex: 1 1 calc(50% - 0.25rem);
    min-width: 8.5rem;
    background: transparent;
    border: 1px solid rgba(197, 168, 128, 0.45);
    color: var(--primary);
    border-radius: 6px;
    padding: 0.55rem 0.65rem;
    font-size: 0.8rem;
    font-family: var(--font-body);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.chat-live-btn:hover:not(:disabled) {
    background: rgba(197, 168, 128, 0.12);
    border-color: var(--primary);
    color: #fff;
}

.chat-live-btn:disabled {
    opacity: 0.55;
    cursor: default;
}

.message.agent {
    border-color: rgba(197, 168, 128, 0.35);
}

.message.agent .agent-label {
    color: var(--primary);
    font-weight: 600;
}

.message.system {
    align-self: center;
    max-width: 92%;
    padding: 0.35rem 0.5rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-style: italic;
    text-align: center;
}

.chat-footer {
    background: rgba(18, 18, 18, 0.9);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.chat-input-area {
    padding: 1rem 1rem 0.5rem;
    display: flex;
    gap: 0.5rem;
}

.chat-powered-by {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.35rem 1rem 0.75rem;
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    color: rgba(197, 168, 128, 0.65);
}

.chat-powered-by-logo {
    width: 18px;
    height: 18px;
    object-fit: contain;
    opacity: 0.9;
}

#chat-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 0.6rem 0.8rem;
    color: #fff;
    font-family: var(--font-body);
    font-size: 0.9rem;
}

#chat-input:focus {
    outline: none;
    border-color: var(--primary);
}

#chat-send-btn {
    background: var(--primary);
    color: #000;
    border: none;
    padding: 0.6rem 1.2rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 4px;
    transition: var(--transition);
}

#chat-send-btn:hover {
    background: var(--primary-dark);
}

@media (max-width: 480px) {
    #fallback-chat-widget {
        bottom: 0;
        right: 0;
        width: 100%;
        height: 100%;
        border-radius: 0;
        border: none;
    }
}
