@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@400;500;600;700&display=swap');

body,
html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: black;
    font-family: 'Rajdhani', sans-serif;
    /* Default Sci-Fi font */
    color: #e0f0ff;
}

/* 1. Video Background (Real World) */
#ar-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -3;
    /* Lower z-index to sit behind everything */
}

/* 2. Dark Overlay for Contrast & Holographic Feel */
#dark-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(10, 20, 40, 0.2) 0%, rgba(0, 0, 0, 0.8) 100%);
    z-index: -2;
    pointer-events: none;
}

/* Scanlines Effect */
#scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom,
            rgba(255, 255, 255, 0),
            rgba(255, 255, 255, 0) 50%,
            rgba(0, 0, 0, 0.2) 50%,
            rgba(0, 0, 0, 0.2));
    background-size: 100% 4px;
    /* Scanline spacing */
    z-index: 1000;
    /* Topmost overlay */
    pointer-events: none;
    opacity: 0.3;
}

/* 3. A-Frame Scene (Overlay) */
a-scene {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* UI Overlay */
#ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

/* Title: Sci-Fi HUD Style */
#title {
    position: absolute;
    top: 25px;
    left: 25px;
    display: flex;
    flex-direction: column;
    border-left: 3px solid #00d2ff;
    padding-left: 10px;
    text-shadow: 0 0 10px rgba(0, 210, 255, 0.6);
}

#title .en {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: #ffffff;
}

#title .jp {
    font-family: 'Noto Serif JP', serif;
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    color: #00d2ff;
    margin-top: -2px;
}

/* Guide Text: Hidden per request */
#guide-text {
    display: none;
}

/* Info Panel (Glassmorphism + FUI) */
#info-panel {
    position: absolute;
    top: 50%;
    /* Center vertically/horizontally or position strategically */
    left: 20px;
    transform: translateY(-50%);
    width: 300px;

    background: rgba(10, 20, 30, 0.6);
    border: 1px solid rgba(100, 200, 255, 0.3);
    border-left: 4px solid #00d2ff;
    /* Accent on left */
    padding: 20px;

    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);

    color: white;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);

    opacity: 0;
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-out;
    pointer-events: auto;
    display: none;
}

#info-panel h2 {
    margin: 0 0 10px 0;
    font-size: 1.6rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 8px;
}

.info-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 0.85rem;
    color: #00d2ff;
    font-family: 'Rajdhani', monospace;
    /* Monospace look */
}

.meta-item {
    border: 1px solid rgba(0, 210, 255, 0.3);
    padding: 2px 6px;
    background: rgba(0, 50, 80, 0.3);
}

#info-panel p {
    margin: 0;
    font-family: 'Noto Serif JP', serif;
    /* Use Serif for body text for elegance */
    font-size: 0.95rem;
    line-height: 1.6;
    color: #e0e0e0;
}

/* Common Button Style (FUI) */
button {
    font-family: 'Rajdhani', sans-serif;
    background: rgba(10, 20, 30, 0.7);
    border: 1px solid rgba(0, 210, 255, 0.5);
    color: #00d2ff;
    backdrop-filter: blur(4px);
    cursor: pointer;
    pointer-events: auto;
    transition: all 0.2s ease;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
}

button:hover {
    background: rgba(0, 210, 255, 0.2);
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.4);
    color: white;
    border-color: #ffffff;
}

button:active {
    transform: scale(0.98);
}

button .en {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.1em;
}

button .jp {
    display: block;
    font-family: 'Noto Serif JP', serif;
    font-size: 0.7rem;
    opacity: 0.7;
    margin-top: 2px;
}

/* Return Button */
#return-btn {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 40px;
    border-radius: 20px;
    opacity: 0;
    transition: opacity 0.5s, all 0.3s;
    display: none;
    z-index: 30;
    background: rgba(40, 10, 10, 0.8);
    border: 1px solid rgba(255, 100, 100, 0.6);
    color: #ffaaaa;
}

#return-btn:hover {
    background: rgba(255, 50, 50, 0.2);
    box-shadow: 0 0 15px rgba(255, 100, 50, 0.4);
    color: white;
    border-color: white;
}

/* Calibrate Button: Bottom Center */
#reset-btn {
    position: absolute;
    bottom: 25px;
    /* Positioned at bottom */
    left: 50%;
    transform: translateX(-50%);

    padding: 8px 30px;
    background: rgba(10, 20, 30, 0.6);
    border: 1px solid rgba(0, 210, 255, 0.4);

    border-radius: 20px;
    /* Capsule shape */

    /* Reset previous styles */
    border-right: 1px solid rgba(0, 210, 255, 0.4);
    text-align: center;
    top: auto;
    right: auto;
}

#reset-btn:hover {
    background: rgba(0, 210, 255, 0.2);
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.3);
}

/* Warp Flash Effect */
#warp-flash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.1s linear;
}

.hidden {
    display: none !important;
}

@keyframes flash-text {

    0%,
    100% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
        text-shadow: 0 0 10px #00d2ff;
    }
}