/* reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: #000;
    color: #fff;
}

#seo-content {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

#museum-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
    z-index: 1;
}

/* loading */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(160deg, #f5efe5 0%, #e8dcc8 50%, #d4c4a8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    transition: opacity 1s ease, visibility 1s ease;
}

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

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

.loader-content h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 400;
    letter-spacing: 0.15em;
    margin-bottom: 0.5rem;
    color: #4a3a28;
}

.loader-content p {
    font-size: 0.9rem;
    letter-spacing: 0.15em;
    color: #8a7a68;
    margin-bottom: 2rem;
}

.progress-bar {
    width: 240px;
    height: 2px;
    background: rgba(74, 58, 40, 0.15);
    margin: 0 auto;
    border-radius: 1px;
    overflow: hidden;
}

.progress-fill {
    width: 0%;
    height: 100%;
    background: #8b6f47;
    transition: width 0.3s ease;
}

.overlay,
.section-overlay,
.back-button {
    z-index: 10;
}

.hidden {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* menu */
#main-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(245, 239, 229, 0.15);
    backdrop-filter: blur(3px);
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.menu-header {
    text-align: center;
    margin-bottom: 3.5rem;
    padding: 1.5rem 2.5rem;
    background: rgba(255, 252, 245, 0.45);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    border: 1px solid rgba(139, 111, 71, 0.1);
    box-shadow: 0 4px 24px rgba(139, 111, 71, 0.08);
}

.menu-name {
    font-family: 'Playfair Display', serif;
    font-size: 3.4rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: #2a1c0e;
    margin-bottom: 0.5rem;
    text-shadow:
        0 1px 2px rgba(0, 0, 0, 0.15),
        0 2px 12px rgba(255, 250, 240, 0.6);
}

.menu-tagline {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #4a3a28;
    text-shadow:
        0 1px 1px rgba(0, 0, 0, 0.08),
        0 1px 8px rgba(255, 250, 240, 0.5);
}

.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: min(90%, 480px);
}

.menu-btn {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    width: 100%;
    padding: 1.2rem 1.6rem;
    background: rgba(255, 252, 245, 0.55);
    border: 1px solid rgba(139, 111, 71, 0.15);
    border-radius: 12px;
    color: #3a2a18;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    text-align: left;
    text-decoration: none;
    backdrop-filter: blur(12px);
    box-shadow: 0 2px 12px rgba(139, 111, 71, 0.08);
    transition: all 0.3s ease;
}

.menu-btn:hover {
    background: rgba(255, 252, 245, 0.75);
    border-color: rgba(139, 111, 71, 0.3);
    transform: translateX(6px);
    box-shadow: 0 4px 20px rgba(139, 111, 71, 0.12);
}

.menu-btn:active {
    transform: translateX(6px) scale(0.98);
}

.btn-number {
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    color: rgba(139, 111, 71, 0.45);
    min-width: 1.8rem;
}

.btn-text {
    flex: 1;
    font-size: 1.1rem;
    font-weight: 400;
    letter-spacing: 0.02em;
}

.btn-arrow {
    font-size: 1.3rem;
    color: rgba(139, 111, 71, 0.4);
    transition: transform 0.3s ease, color 0.3s ease;
}

.menu-btn:hover .btn-arrow {
    transform: translateX(4px);
    color: rgba(139, 111, 71, 0.9);
}

/* sections */
.section-overlay {
    position: fixed;
    top: 0;
    right: 0;
    width: min(40%, 520px);
    height: 100%;
    display: flex;
    align-items: center;
    padding: 2rem;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.section-content {
    background: rgba(255, 252, 245, 0.82);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(139, 111, 71, 0.12);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(74, 58, 40, 0.1);
}

.section-content h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 400;
    color: #3a2a18;
    margin-bottom: 1.2rem;
    letter-spacing: 0.03em;
}

.section-content p {
    font-size: 0.95rem;
    line-height: 1.7;
    color: rgba(58, 42, 24, 0.8);
    margin-bottom: 1rem;
}

.section-content ul {
    list-style: none;
    margin: 1rem 0;
}

.section-content ul li {
    font-size: 0.95rem;
    color: rgba(58, 42, 24, 0.75);
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(139, 111, 71, 0.08);
}

.section-content ul li::before {
    content: '→ ';
    color: rgba(139, 111, 71, 0.5);
    margin-right: 0.5rem;
}

.section-content h3 {
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(139, 111, 71, 0.6);
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
}

.section-note {
    font-size: 0.85rem !important;
    color: rgba(58, 42, 24, 0.45) !important;
    font-style: italic;
}

.section-link {
    display: inline-block;
    margin-top: 0.5rem;
    color: #6b4f30;
    text-decoration: none;
    font-size: 0.95rem;
    letter-spacing: 0.03em;
    border-bottom: 1px solid rgba(107, 79, 48, 0.3);
    padding-bottom: 2px;
    transition: border-color 0.3s ease, color 0.3s ease;
}

.section-link:hover {
    color: #3a2a18;
    border-color: rgba(58, 42, 24, 0.6);
}

.timeline {
    margin: 0.5rem 0 1.5rem;
}

.timeline-item {
    position: relative;
    padding: 0.6rem 0 0.6rem 1rem;
    border-left: 1px solid rgba(139, 111, 71, 0.15);
    margin-bottom: 0.2rem;
    color: rgba(58, 42, 24, 0.75);
    font-size: 0.9rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -3px;
    top: 0.85rem;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(139, 111, 71, 0.45);
}

.timeline-date {
    display: block;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    color: rgba(139, 111, 71, 0.5);
    margin-bottom: 0.15rem;
}

.timeline-item strong {
    font-size: 0.9rem;
    color: #3a2a18;
    font-weight: 500;
}

.timeline-item p {
    font-size: 0.82rem !important;
    color: rgba(58, 42, 24, 0.55) !important;
    margin-bottom: 0 !important;
    line-height: 1.5 !important;
}

.back-button {
    position: fixed;
    top: 2rem;
    left: 2rem;
    padding: 0.7rem 1.4rem;
    background: rgba(255, 252, 245, 0.6);
    border: 1px solid rgba(139, 111, 71, 0.15);
    border-radius: 8px;
    color: #4a3a28;
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    backdrop-filter: blur(12px);
    box-shadow: 0 2px 10px rgba(139, 111, 71, 0.08);
    transition: all 0.3s ease;
}

.back-button:hover {
    background: rgba(255, 252, 245, 0.8);
    border-color: rgba(139, 111, 71, 0.3);
    transform: translateX(-3px);
    box-shadow: 0 4px 16px rgba(139, 111, 71, 0.12);
}

/* gallery nav */
.gallery-nav {
    position: fixed;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.6rem 1.4rem;
    background: rgba(255, 252, 245, 0.65);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(139, 111, 71, 0.15);
    border-radius: 30px;
    z-index: 15;
    box-shadow: 0 4px 20px rgba(74, 58, 40, 0.08);
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.gallery-arrow {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(139, 111, 71, 0.2);
    background: rgba(255, 252, 245, 0.5);
    color: #4a3a28;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
}

.gallery-arrow:hover {
    background: rgba(255, 252, 245, 0.85);
    border-color: rgba(139, 111, 71, 0.4);
    transform: scale(1.1);
    box-shadow: 0 2px 10px rgba(139, 111, 71, 0.12);
}

.gallery-arrow:active {
    transform: scale(0.95);
}

.gallery-counter {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    color: rgba(74, 58, 40, 0.7);
    min-width: 3rem;
    text-align: center;
    user-select: none;
}

@media (max-width: 768px) {
    .menu-name {
        font-size: 2rem;
    }

    .btn-text {
        font-size: 0.95rem;
    }

    .section-overlay {
        width: 100%;
        padding: 1rem;
    }

    .section-content {
        padding: 1.5rem;
    }
}

@media (min-width: 1400px) {
    .section-overlay {
        width: min(40%, 560px);
    }
}

/* tooltip */
.painting-tooltip {
    position: fixed;
    z-index: 20;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    max-width: 320px;
    background: rgba(255, 252, 245, 0.92);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(139, 111, 71, 0.18);
    border-radius: 10px;
    padding: 1rem 1.1rem;
    box-shadow: 0 6px 28px rgba(74, 58, 40, 0.16);
}

.painting-tooltip.visible {
    opacity: 1;
    visibility: visible;
}

.painting-tooltip h4 {
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    font-weight: 500;
    color: #3a2a18;
    margin-bottom: 0.45rem;
    line-height: 1.25;
}

.painting-tooltip p {
    font-size: 0.82rem;
    line-height: 1.55;
    color: rgba(58, 42, 24, 0.75);
    margin: 0;
}

.tooltip-gamedev {
    margin-top: 0.55rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(139, 111, 71, 0.12);
}

.tooltip-gamedev-label {
    display: inline-block;
    font-size: 0.62rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(139, 111, 71, 0.55);
    margin-bottom: 0.25rem;
}

.tooltip-gamedev p {
    font-size: 0.8rem;
    color: rgba(58, 42, 24, 0.65);
}
