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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    color: #f5f5f5;
    overflow-x: hidden;
}

/* Screen Management */
.screen {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 100vh;
    z-index: 1;
}

.screen.active {
    display: block;
    z-index: 10;
}

/* Smooth transitions only when active */
.screen.active {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Password Gate */
#password-gate {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    overflow: hidden;
}

#password-gate::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: pulse 20s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.1) rotate(180deg); }
}

.gate-container {
    text-align: center;
    padding: 3rem 2rem;
    max-width: 450px;
    width: 100%;
    position: relative;
    z-index: 1;
}

.gate-logo {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: float 3s ease-in-out infinite;
}

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

.gate-container h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    font-weight: 300;
    letter-spacing: 4px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.95;
    margin-bottom: 2.5rem;
    font-weight: 300;
}

#password-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#password-input {
    padding: 1rem;
    font-size: 1.1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

#password-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.15);
}

#password-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

#password-input.shake {
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

#password-form button {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    background: rgba(255, 255, 255, 0.25);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

#password-form button:hover {
    background: rgba(255, 255, 255, 0.35);
    border-color: rgba(255, 255, 255, 0.7);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

#password-form button:active {
    transform: translateY(0);
}

.password-hint {
    font-size: 0.9rem;
    opacity: 0.7;
    margin-top: 1rem;
    font-style: italic;
}

.error-message {
    color: #ff6b6b;
    font-size: 0.9rem;
    min-height: 1.5rem;
    margin-top: 0.5rem;
    font-weight: 500;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Museum Header */
#lobby {
    position: relative;
}

.museum-header {
    background: rgba(0, 0, 0, 0.3);
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 1;
}

.museum-header h1 {
    font-size: 2rem;
    font-weight: 300;
    letter-spacing: 3px;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.progress-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.2rem;
    font-weight: 500;
}

.ticket-icon {
    font-size: 1.5rem;
}

.reset-btn {
    padding: 0.5rem 1rem;
    background: rgba(255, 107, 107, 0.2);
    color: #ff6b6b;
    border: 1px solid rgba(255, 107, 107, 0.4);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.reset-btn:hover {
    background: rgba(255, 107, 107, 0.3);
    border-color: rgba(255, 107, 107, 0.6);
}

/* Lobby Content */
.lobby-content {
    padding: 3rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.lobby-intro {
    text-align: center;
    margin-bottom: 4rem;
    padding-bottom: 3rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.lobby-title {
    font-size: 2.5rem;
    font-weight: 300;
    letter-spacing: 3px;
    margin-bottom: 1rem;
    color: #fff;
}

.welcome-message {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    opacity: 0.95;
    font-weight: 300;
}

.welcome-message-sub {
    font-size: 1rem;
    opacity: 0.7;
    margin-top: 0.5rem;
    font-style: italic;
}

/* Exhibit Grid */
.exhibit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.exhibit-card {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    user-select: none;
}

.exhibit-card:active {
    transform: translateY(-2px) scale(0.98);
}

.exhibit-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.exhibit-card:hover::before {
    transform: scaleX(1);
}

.exhibit-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.08);
}

.exhibit-card.locked {
    opacity: 0.5;
    cursor: not-allowed;
    position: relative;
}

.exhibit-card.completed {
    border-color: rgba(102, 126, 234, 0.5);
    background: rgba(102, 126, 234, 0.1);
}

.exhibit-number {
    font-size: 0.9rem;
    opacity: 0.7;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.exhibit-title {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.exhibit-subtitle {
    font-size: 1rem;
    opacity: 0.8;
    margin-bottom: 1rem;
}

.exhibit-status {
    font-size: 0.85rem;
    opacity: 0.7;
    font-style: italic;
}

.exhibit-card.completed .exhibit-status {
    color: #4ade80;
    opacity: 1;
}

/* Exhibit View */
#exhibit-view {
    padding: 2rem;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    overflow-y: auto;
}

.exhibit-container {
    position: relative;
}

.exhibit-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.back-btn {
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.exhibit-nav-buttons {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-btn {
    padding: 0.75rem 1.5rem;
    background: rgba(102, 126, 234, 0.2);
    color: white;
    border: 1px solid rgba(102, 126, 234, 0.4);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-btn:hover:not(:disabled) {
    background: rgba(102, 126, 234, 0.3);
    border-color: rgba(102, 126, 234, 0.6);
    transform: translateY(-2px);
}

.nav-btn:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.exhibit-counter {
    font-size: 1rem;
    opacity: 0.8;
    font-weight: 500;
    min-width: 120px;
    text-align: center;
}

#exhibit-content {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 3rem;
    backdrop-filter: blur(10px);
}

/* Unlock Prompt */
.unlock-prompt {
    text-align: center;
}

.unlock-prompt h2 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    font-weight: 400;
}

.icon-options {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.icon-option {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    min-width: 150px;
}

.icon-option:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-5px);
}

.icon-large {
    font-size: 4rem;
}

.icon-hint {
    font-size: 1rem;
    opacity: 0.8;
}

/* Plaque View */
.plaque {
    max-width: 700px;
    margin: 0 auto;
}

.plaque-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.plaque-title {
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 0.5rem;
    letter-spacing: 2px;
}

.plaque-image {
    width: 100%;
    border-radius: 8px;
    margin: 2rem 0;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.plaque-description {
    font-size: 1.1rem;
    line-height: 1.8;
    margin: 2rem 0;
    opacity: 0.9;
}

.plaque-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.curator-note {
    font-size: 1.1rem;
    font-style: italic;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    color: #ffd700;
    opacity: 0.9;
}

.ticket-earned {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(102, 126, 234, 0.2);
    border: 2px solid rgba(102, 126, 234, 0.4);
    border-radius: 8px;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
    .exhibit-grid {
        grid-template-columns: 1fr;
    }

    .museum-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .gate-container h1 {
        font-size: 2rem;
    }

    .gate-logo {
        font-size: 3rem;
    }

    .lobby-title {
        font-size: 2rem;
    }

    .lobby-content {
        padding: 2rem 1rem;
    }

    .icon-options {
        gap: 1rem;
    }

    .icon-option {
        min-width: 120px;
        padding: 1.5rem;
    }

    .icon-large {
        font-size: 3rem;
    }

    .plaque-title {
        font-size: 2rem;
    }

    #exhibit-content {
        padding: 2rem 1.5rem;
    }

    .exhibit-navigation {
        flex-direction: column;
        align-items: stretch;
    }

    .exhibit-nav-buttons {
        justify-content: space-between;
        width: 100%;
    }

    .nav-btn {
        flex: 1;
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }

    .exhibit-counter {
        font-size: 0.9rem;
        min-width: auto;
    }
}

/* Puzzle View */
#puzzle-view {
    padding: 2rem;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    overflow-y: auto;
}

.puzzle-container {
    position: relative;
}

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

.puzzle-title {
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 1rem;
    letter-spacing: 3px;
}

.puzzle-instructions {
    font-size: 1.2rem;
    opacity: 0.8;
    margin-bottom: 2rem;
}

.puzzle-board {
    display: grid;
    gap: 2px;
    background: rgba(255, 255, 255, 0.1);
    padding: 2px;
    border-radius: 8px;
    margin: 2rem auto;
    max-width: 500px;
    aspect-ratio: 1;
}

.puzzle-tile {
    aspect-ratio: 1;
    background-size: 300% 300%;
    background-repeat: no-repeat;
    background-color: rgba(255, 255, 255, 0.06);
    border-radius: 4px;
    transition: transform 0.2s ease;
    cursor: pointer;
}


.puzzle-tile:hover:not(.puzzle-tile-empty) {
    transform: scale(1.02);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.puzzle-tile-empty {
    background: rgba(255, 255, 255, 0.05);
    cursor: default;
}

.puzzle-tile-selected {
    border: 3px solid #ffd700 !important;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.6) !important;
    transform: scale(1.05);
}

.puzzle-help {
    margin-top: 1.5rem;
    font-size: 1rem;
    opacity: 0.8;
    font-style: italic;
}

.puzzle-solved {
    margin-top: 3rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    overflow: hidden;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    animation: confetti-fall linear infinite;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

.reveal-title {
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 2rem;
    letter-spacing: 3px;
    color: #ffd700;
}

.reveal-content {
    text-align: left;
    max-width: 600px;
    margin: 0 auto;
}

.reveal-message {
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    opacity: 0.95;
}

.special-exhibit {
    border: 3px solid rgba(255, 215, 0, 0.5) !important;
    background: rgba(255, 215, 0, 0.1) !important;
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
    }
    50% {
        box-shadow: 0 0 30px rgba(255, 215, 0, 0.6);
    }
}

.special-exhibit:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 0 40px rgba(255, 215, 0, 0.8);
}
