:root {
    --bg-color: #151210;
    --primary: #d4a373;
    --primary-glow: rgba(212, 163, 115, 0.3);
    --secondary: #8b5a2b;
    --text-main: #fefae0;
    --text-muted: #b5b5a6;
    --glass-bg: rgba(21, 18, 16, 0.85);
    --glass-border: rgba(212, 163, 115, 0.15);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body, html {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: var(--bg-color);
    font-family: 'Lora', serif;
    color: var(--text-main);
    touch-action: none; /* Prevent scroll/zoom on mobile */
}

#scene-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0;
    transition: opacity 1s ease;
    pointer-events: none;
}

#scene-container.active {
    opacity: 1;
    pointer-events: auto;
}



#btn-exit-3d {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 20;
    width: auto;
    padding: 0.8rem 1.2rem;
    font-size: 0.8rem;
    background: var(--glass-bg);
    border-color: var(--primary);
    color: var(--primary);
    display: none;
}

#btn-exit-3d.active {
    display: flex;
}

.hidden-ui {
    opacity: 0;
    pointer-events: none !important;
    transition: opacity 0.5s ease;
}

/* Invisible layer to catch touches without blocking UI */
#touch-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Main UI */
.ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2rem 1.5rem;
    pointer-events: none; /* Let touches pass through to touch-layer */
}

.ui-layer > * {
    pointer-events: auto; /* Re-enable pointer events for actual UI elements */
}

.archive-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1rem 0;
}

.archive-content h2 {
    font-family: 'Playfair Display', serif;
    margin-bottom: 2rem;
    color: var(--primary);
    font-size: 1.8rem;
    letter-spacing: 2px;
    text-align: center;
}

footer {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

/* Buttons */
.btn {
    width: 100%;
    padding: 1.2rem;
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    border: none;
    border-radius: 2px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.btn:active {
    transform: scale(0.98);
}

.btn.primary {
    background: var(--primary);
    color: var(--bg-color);
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    font-weight: bold;
}

.btn.outline {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--text-muted);
}

.feature-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: auto;
}

.feature-list li {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.feature-list .icon {
    font-size: 1.8rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.8rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.feature-list h3 {
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
}

.feature-list p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.4;
}

/* Small screen adjustments */
@media (max-width: 380px) {
    .archive-content h2 { font-size: 1.5rem; }
}