/* General Reset */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Montserrat', sans-serif;
    color: #fff;
    background-color: #0f1215;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
}

/* Background Image */
.ambient-background {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1;
    
    /* UPDATED: Now looks inside the images folder */
    background-image: url('images/room-background.png'); 
    
    background-position: center center;
    background-size: cover;
    background-attachment: scroll; 
    background-color: rgba(0, 0, 0, 0.4); 
    background-blend-mode: overlay;
}

/* Return Button */
.back-link {
    position: absolute;
    top: 20px;
    left: 20px;
    color: #D4AF37;
    text-decoration: none;
    font-size: 0.85rem; 
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 100;
    background: rgba(0,0,0,0.3);
    padding: 8px 12px;
    border-radius: 4px;
    backdrop-filter: blur(4px);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 15px 40px; 
    text-align: center;
}

/* Header */
.room-header h1 {
    font-weight: 300; 
    font-size: 1.8rem;
    margin-bottom: 10px;
    letter-spacing: 1px;
    text-transform: uppercase; 
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* Header Text Space */
.room-header p {
    font-weight: 300; 
    font-size: 1rem; 
    color: #ccc; 
    margin-bottom: 40px; 
}

/* Video Grid */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 10px 0;
}

/* Thumbnail Card */
.video-card {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    height: auto; 
    display: flex;
    flex-direction: column;
}

.thumbnail-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    overflow: hidden;
    background: #000;
}

.thumbnail-wrapper img {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover;
}

.card-info { 
    padding: 15px; 
    text-align: left;
    background: rgba(0,0,0,0.2);
    flex-grow: 1;
}

.card-info h3 { 
    font-size: 1rem; 
    font-weight: 400; 
    color: #fff; 
    line-height: 1.4;
}

/* --- MODAL (POPUP) STYLES --- */
.modal {
    display: none; position: fixed; z-index: 1000; 
    left: 0; top: 0; width: 100%; height: 100%;
    background: transparent; 
    transition: visibility 0.5s;
    visibility: hidden;
}

.modal::before {
    content: '';
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1;
    
    /* UPDATED: Now looks inside the images folder */
    background-image: url('images/room-background.png');
    
    background-size: cover;
    background-position: center;
    filter: blur(30px) brightness(0.2);
    transform: scale(1.2);
    opacity: 0;
    transition: opacity 0.6s ease;
}

.modal-content {
    position: absolute; top: 50%; left: 50%;
    width: 95%;
    max-width: 900px; text-align: center;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
    transition: all 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.modal.show { visibility: visible; }
.modal.show::before { opacity: 1; }
.modal.show .modal-content {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.video-wrapper {
    position: relative; padding-bottom: 56.25%; height: 0;
    background: #000; border-radius: 12px; overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.8);
}
.modal.show .video-wrapper {
     box-shadow: 0 40px 80px rgba(0,0,0,1), 0 0 40px rgba(212, 175, 55, 0.15);
}
.video-wrapper iframe {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
}

.close-btn {
    position: absolute; top: -50px; right: 10px; color: #fff;
    font-size: 40px; font-weight: 300; cursor: pointer;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}
#modalTitle {
    margin-top: 15px; font-weight: 300; font-size: 1.1rem; color: #fff;
    display: none; 
}

/* MEDIA QUERY FOR TABLET/DESKTOP */
@media (min-width: 768px) {
    .ambient-background { background-attachment: fixed; } 
    .video-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
    #modalTitle { display: block; } 
}