:root {
    --bg-dark: #0f172a;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --accent-color: #8b5cf6;
    --success: #10b981;
    --warning: #f59e0b;
    --hover-bg: rgba(255, 255, 255, 0.1);
    --input-bg: rgba(255, 255, 255, 0.05);
    --modal-bg: rgba(0, 0, 0, 0.6);
}

body.light-mode {
    --bg-dark: #f8fafc;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(0, 0, 0, 0.1);
    --hover-bg: rgba(0, 0, 0, 0.05);
    --input-bg: rgba(255, 255, 255, 0.9);
    --modal-bg: rgba(255, 255, 255, 0.4);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Dynamic Background Orbs */
.background-orbs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 20s infinite ease-in-out alternate;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: var(--primary-color);
    top: -100px;
    left: -100px;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: var(--accent-color);
    bottom: -200px;
    right: -100px;
    animation-delay: -5s;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: #3b82f6;
    top: 40%;
    left: 60%;
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 50px) scale(1.1); }
}

/* Glassmorphism Utilities */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

/* Layout */
.app-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 30px;
    min-height: calc(100vh - 80px);
    display: flex;
    flex-direction: column;
    gap: 40px;
    overflow: hidden;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--glass-border);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 8px;
    display: inline-block;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.user-profile:hover {
    opacity: 0.8;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* Auth Section UI */
.user-auth-section {
    display: flex;
    align-items: center;
    position: relative;
}

#nav-user-menu button:hover {
    background: rgba(255, 255, 255, 0.1) !important;
}

/* Modal Additions */
/* Hero Section */
.hero-section {
    text-align: center;
    padding: 40px 30px;
    position: relative;
    overflow: hidden;
    border-radius: 20px;
}

.hero-section.has-banner {
    min-height: 260px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.hero-banner {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    max-width: 100%;
    display: block;
}

.hero-banner-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15,23,42,0.4) 0%, rgba(15,23,42,0.88) 100%);
}

.hero-section h2 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 16px;
    background: linear-gradient(to right, #fff, #cbd5e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    z-index: 1;
}

.hero-section p {
    color: var(--text-secondary);
    font-size: 1.2rem;
    position: relative;
    z-index: 1;
}

/* Search Bar */
.search-bar {
    display: flex;
    gap: 20px;
    padding: 24px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-width: 200px;
}

.input-group label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.input-group input,
.input-group select {
    background: var(--input-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 12px 16px;
    color: var(--text-primary);
    font-size: 1.15rem;
    outline: none;
    transition: all 0.3s ease;
}

.input-group select option {
    background: var(--bg-dark);
}

.input-group input:focus,
.input-group select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border: none;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 48px;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.3;
    text-align: center;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-outline {
    background: var(--input-bg);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 48px;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.3;
    text-align: center;
}

.btn-outline:hover {
    background: var(--hover-bg);
    border-color: var(--glass-border);
    transform: translateY(-2px);
}

.btn-outline:active {
    transform: translateY(0);
}

/* Room Grid */
.room-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

/* Room Card */
.room-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
}

.room-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.2);
}

.room-image {
    height: 200px;
    background-color: rgba(0,0,0,0.3);
    position: relative;
    overflow: hidden;
}

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

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

.room-status {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.status-available {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-booked {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.room-details {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.room-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.room-meta {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 16px;
    display: flex;
    gap: 12px;
}

.room-amenities {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.amenity-tag {
    background: var(--input-bg);
    border: 1px solid var(--glass-border);
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.book-btn {
    margin-top: auto;
    width: 100%;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--modal-bg);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    width: 100%;
    max-width: 500px;
    padding: 40px;
    position: relative;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-btn:hover {
    color: white;
}

.modal-content h3 {
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.modal-subtitle {
    color: var(--text-secondary);
    margin-bottom: 24px;
    font-size: 0.95rem;
}

.booking-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.form-group input,
.form-group select {
    background: var(--input-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 12px 16px;
    color: var(--text-primary);
    font-size: 1.15rem;
    outline: none;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--primary-color);
}

.form-group select option {
    background: var(--bg-dark);
}

.form-group input.input-error {
    border-color: var(--warning);
    box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.3);
}

.form-error {
    color: var(--warning);
    font-size: 0.9rem;
    padding: 10px;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 8px;
    display: none;
    margin-bottom: -10px;
}

.form-row {
    display: flex;
    gap: 20px;
}

.form-row .form-group {
    flex: 1;
}

.full-width {
    width: 100%;
    margin-top: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .app-container {
        margin: 20px;
        padding: 20px;
    }
    
    .hero-section h2 {
        font-size: 2.2rem;
    }
    
    .search-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .btn-primary {
        width: 100%;
    }
}

/* Language Selector */
.lang-selector { position: relative; display: inline-block; cursor: pointer; margin-right: 15px; }
.lang-current { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; margin: 0; background: var(--hover-bg); border: 1px solid var(--glass-border); border-radius: 50%; color: var(--text-primary); font-size: 1.1rem; transition: all 0.2s ease; cursor: pointer; flex-shrink: 0; }
.lang-current:hover { background: var(--hover-bg); }
.lang-flag { display: inline-flex; justify-content: center; align-items: center; font-size: 1.2rem; line-height: 1; }
.lang-dropdown { position: absolute; top: 120%; right: 0; background: var(--glass-bg); backdrop-filter: blur(20px); border: 1px solid var(--glass-border); border-radius: 12px; min-width: 140px; display: none; flex-direction: column; padding: 8px; z-index: 1000; }
.lang-selector:hover .lang-dropdown { display: flex; }
.lang-option { display: flex; align-items: center; gap: 10px; padding: 8px 12px; color: var(--text-primary); text-decoration: none; border-radius: 8px; transition: background 0.2s; font-size: 0.9rem; }
.lang-option:hover { background: var(--hover-bg); }
