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

/* Loading Screen */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

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

.spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 20px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    color: #fff;
    font-size: 1.2rem;
    font-family: 'IM Fell English', serif;
    letter-spacing: 2px;
}

body {
    font-family: 'IM Fell English', serif;
    overflow: hidden;
    width: 100vw;
    height: 100vh;
}

#app {
    position: relative;
    width: 100%;
    height: 100%;
}

.screen {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

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

.background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #1a1a2e; /* Fallback color */
}

.background-image.loading {
    filter: blur(10px);
    transition: filter 0.3s ease;
}

.background-image.loaded {
    filter: blur(0);
}

/* Entry Screen Styles */
#entry-screen {
    display: flex;
    align-items: center;
    justify-content: center;
}

.passcode-container {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.ornamental-border {
    background: rgba(20, 15, 10, 0.85);
    backdrop-filter: blur(10px);
    border: 3px solid #d4af37;
    border-radius: 8px;
    padding: 50px 60px;
    box-shadow: 
        0 0 30px rgba(212, 175, 55, 0.3),
        inset 0 0 20px rgba(0, 0, 0, 0.5);
    position: relative;
    text-align: center;
    max-width: 500px;
    width: 90vw;
}

.ornamental-border::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    bottom: 15px;
    border: 1px solid #d4af37;
    border-radius: 4px;
    opacity: 0.5;
    pointer-events: none;
}

.title {
    font-family: 'Cinzel', serif;
    font-size: 2.5rem;
    color: #d4af37;
    margin-bottom: 15px;
    letter-spacing: 3px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.subtitle {
    font-family: 'IM Fell English', serif;
    font-size: 1.1rem;
    color: #e8d4a0;
    margin-bottom: 35px;
    font-style: italic;
    letter-spacing: 1px;
}

.passcode-input {
    width: 100%;
    padding: 15px 20px;
    font-family: 'IM Fell English', serif;
    font-size: 1.3rem;
    text-align: center;
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid #8b7355;
    border-radius: 4px;
    color: #e8d4a0;
    letter-spacing: 8px;
    margin-bottom: 25px;
    transition: all 0.3s ease;
}

.passcode-input:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
}

.passcode-input::placeholder {
    color: #8b7355;
    letter-spacing: 2px;
    font-size: 1rem;
}

.enter-button {
    width: 100%;
    padding: 15px;
    font-family: 'Cinzel', serif;
    font-size: 1.2rem;
    letter-spacing: 2px;
    background: linear-gradient(145deg, #d4af37, #b8941f);
    border: none;
    border-radius: 4px;
    color: #1a1410;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.enter-button:hover {
    background: linear-gradient(145deg, #e8c04a, #d4af37);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.5);
    transform: translateY(-2px);
}

.enter-button:active {
    transform: translateY(0);
}

.error-message {
    color: #ff6b6b;
    font-size: 0.9rem;
    margin-top: 15px;
    min-height: 20px;
    font-style: italic;
}

/* Hall Screen Styles */
#hall-screen {
    display: flex;
    align-items: center;
    justify-content: center;
}

.hall-content {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 20px;
}

.hall-title {
    font-family: 'Cinzel', serif;
    font-size: 4rem;
    color: #d4af37;
    margin-bottom: 20px;
    letter-spacing: 4px;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.8);
    animation: fadeInTitle 1.5s ease-out;
}

.hall-subtitle {
    font-family: 'IM Fell English', serif;
    font-size: 1.5rem;
    color: #e8d4a0;
    font-style: italic;
    letter-spacing: 2px;
    animation: fadeInTitle 2s ease-out;
}

@keyframes fadeInTitle {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Interactive Orbs */
.orb-container {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 15;
    pointer-events: none;
}

.orb {
    position: absolute;
    transform: translate(-50%, -50%);
    cursor: pointer;
    pointer-events: auto;
    transition: transform 0.3s ease;
    animation: float 3s ease-in-out infinite;
}

.orb:hover {
    transform: translate(-50%, -50%) scale(1.15);
}

@keyframes float {
    0%, 100% {
        transform: translate(-50%, -50%) translateY(0px);
    }
    50% {
        transform: translate(-50%, -50%) translateY(-10px);
    }
}

.orb:hover .orb-glow {
    box-shadow: 
        0 0 40px rgba(212, 175, 55, 0.8),
        0 0 80px rgba(212, 175, 55, 0.6),
        0 0 120px rgba(212, 175, 55, 0.4),
        inset 0 0 30px rgba(212, 175, 55, 0.5);
}

.orb-glow {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, 
        rgba(255, 230, 150, 0.9) 0%,
        rgba(212, 175, 55, 0.7) 30%,
        rgba(212, 175, 55, 0.4) 60%,
        rgba(212, 175, 55, 0.1) 100%
    );
    box-shadow: 
        0 0 30px rgba(212, 175, 55, 0.6),
        0 0 60px rgba(212, 175, 55, 0.4),
        0 0 90px rgba(212, 175, 55, 0.2),
        inset 0 0 20px rgba(255, 255, 255, 0.3);
    animation: pulse 2s ease-in-out infinite;
    position: relative;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.8;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
}

.orb-core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%,
        #fff 0%,
        #ffe699 20%,
        #d4af37 50%,
        #b8941f 100%
    );
    box-shadow: 
        inset -5px -5px 10px rgba(0, 0, 0, 0.3),
        inset 5px 5px 10px rgba(255, 255, 255, 0.5);
}

.orb-label {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 15px;
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    color: #d4af37;
    white-space: nowrap;
    text-shadow: 
        2px 2px 4px rgba(0, 0, 0, 0.9),
        0 0 10px rgba(212, 175, 55, 0.5);
    letter-spacing: 2px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    background: rgba(0, 0, 0, 0.6);
    padding: 8px 16px;
    border-radius: 4px;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.orb:hover .orb-label {
    opacity: 1;
}

/* Individual orb entrance animations */
.gallery-orb {
    animation: float 3s ease-in-out infinite, fadeInOrb 1s ease-out 0.5s both;
}

.travelogue-orb {
    animation: float 3s ease-in-out infinite 0.5s, fadeInOrb 1s ease-out 1s both;
}

.rooftop-orb {
    animation: float 3s ease-in-out infinite 1s, fadeInOrb 1s ease-out 1.5s both;
}

.cinema-orb {
    animation: float 3s ease-in-out infinite 1.5s, fadeInOrb 1s ease-out 2s both;
}

.library-orb {
    animation: float 3s ease-in-out infinite 2s, fadeInOrb 1s ease-out 2.5s both;
}

@keyframes fadeInOrb {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Sparkle effect */
.orb-glow::before,
.orb-glow::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, 
        rgba(255, 255, 255, 0.8) 0%,
        rgba(255, 255, 255, 0) 70%
    );
}

.orb-glow::before {
    width: 20px;
    height: 20px;
    top: 15%;
    left: 25%;
    animation: sparkle 2s ease-in-out infinite;
}

.orb-glow::after {
    width: 12px;
    height: 12px;
    top: 60%;
    left: 70%;
    animation: sparkle 2s ease-in-out infinite 1s;
}

@keyframes sparkle {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* Transition Overlay */
.transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: black;
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
    pointer-events: none;
    transition: opacity 1s ease;
}

.transition-overlay.active {
    visibility: visible;
    pointer-events: auto;
}

/* Room Screens */
.room-screen {
    position: absolute;
    width: 100%;
    height: 100%;
}

.room-screen .background-image {
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 1;
}

.room-screen .back-button {
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 100;
}

/* Rooftop Video */
.rooftop-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 1;
}

/* Back Button */
.back-button {
    position: absolute;
    top: 30px;
    left: 30px;
    z-index: 20;
    padding: 12px 24px;
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    letter-spacing: 1px;
    background: rgba(20, 15, 10, 0.8);
    backdrop-filter: blur(10px);
    border: 2px solid #d4af37;
    border-radius: 6px;
    color: #d4af37;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.back-button:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: #e8c04a;
    color: #e8c04a;
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
    transform: translateX(-5px);
}

.back-button:active {
    transform: translateX(-3px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .title {
        font-size: 2rem;
    }
    
    .ornamental-border {
        padding: 40px 30px;
    }
    
    .passcode-input {
        font-size: 1.1rem;
        letter-spacing: 6px;
    }
    
    .hall-title {
        font-size: 2.5rem;
    }
    
    .hall-subtitle {
        font-size: 1.2rem;
    }
    
    /* Smaller orbs on tablets */
    .orb-glow {
        width: 60px;
        height: 60px;
    }
    
    .orb-core {
        width: 30px;
        height: 30px;
    }
    
    .orb-label {
        font-size: 0.85rem;
        margin-top: 10px;
        padding: 6px 12px;
    }
    
    /* Back button on tablets */
    .back-button {
        top: 20px;
        left: 20px;
        font-size: 0.9rem;
        padding: 10px 20px;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 1.6rem;
        letter-spacing: 2px;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .ornamental-border {
        padding: 30px 20px;
    }
    
    .enter-button {
        font-size: 1rem;
    }
    
    .hall-title {
        font-size: 1.8rem;
        letter-spacing: 2px;
    }
    
    .hall-subtitle {
        font-size: 1rem;
    }
    
    /* Even smaller orbs on mobile */
    .orb-glow {
        width: 50px;
        height: 50px;
    }
    
    .orb-core {
        width: 25px;
        height: 25px;
    }
    
    .orb-label {
        font-size: 0.75rem;
        margin-top: 8px;
        padding: 5px 10px;
        letter-spacing: 1px;
    }
    
    /* Adjust orb positions for mobile portrait */
    .gallery-orb {
        left: 15% !important;
        top: 40% !important;
    }
    
    .travelogue-orb {
        left: 28% !important;
        top: 50% !important;
    }
    
    .rooftop-orb {
        left: 50% !important;
        top: 30% !important;
    }
    
    .cinema-orb {
        left: 72% !important;
        top: 50% !important;
    }
    
    .library-orb {
        left: 85% !important;
        top: 40% !important;
    }
    
    /* Back button on mobile */
    .back-button {
        top: 15px;
        left: 15px;
        font-size: 0.85rem;
        padding: 8px 16px;
    }
}
