/* === BEGEHBARE 3D-GALERIE === */

.g3d-wrapper {
    position: relative;
    margin-top: var(--nav-height);
    width: 100%;
    height: calc(100vh - var(--nav-height));
    overflow: hidden;
    background: #1a1a1a;
}

.g3d-canvas {
    display: block;
    width: 100%;
    height: 100%;
    cursor: crosshair;
}

/* --- HUD Overlay --- */
.g3d-hud {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 10;
}

/* Oben */
.g3d-hud-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    pointer-events: auto;
}

.g3d-hud-title {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    color: rgba(255, 255, 255, 0.9);
    font-family: var(--font-display);
    font-size: 1.1rem;
    text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

.g3d-count {
    font-family: var(--font-body);
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 300;
}

.g3d-hud-actions {
    display: flex;
    gap: 0.5rem;
}

.g3d-btn {
    padding: 0.4rem 1rem;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 0.8rem;
    text-decoration: none;
    backdrop-filter: blur(8px);
    transition: background 0.2s;
    cursor: pointer;
}

.g3d-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}

.g3d-btn-exit {
    background: rgba(184, 134, 11, 0.3);
    border-color: rgba(184, 134, 11, 0.4);
}

.g3d-btn-exit:hover {
    background: rgba(184, 134, 11, 0.5);
}

/* Fadenkreuz */
.g3d-crosshair {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: rgba(255, 255, 255, 0.3);
    font-size: 1.5rem;
    font-weight: 100;
    line-height: 1;
}

/* Steuerungshinweis */
.g3d-hint {
    position: absolute;
    bottom: 5rem;
    left: 50%;
    transform: translateX(-50%);
    transition: opacity 0.5s;
}

.g3d-hint-inner {
    padding: 0.8rem 1.5rem;
    background: rgba(0, 0, 0, 0.7);
    color: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    font-size: 0.8rem;
    font-family: var(--font-body);
    text-align: center;
    backdrop-filter: blur(8px);
    white-space: nowrap;
}

/* D-Pad (mobil) */
.g3d-dpad {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: none;
    width: 140px;
    height: 140px;
    pointer-events: auto;
}

.g3d-dpad-btn {
    position: absolute;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
    touch-action: none;
}

.g3d-dpad-btn:active {
    background: rgba(255, 255, 255, 0.3);
}

.g3d-dpad-up    { top: 0; left: 50%; transform: translateX(-50%); }
.g3d-dpad-down  { bottom: 0; left: 50%; transform: translateX(-50%); }
.g3d-dpad-left  { left: 0; top: 50%; transform: translateY(-50%); }
.g3d-dpad-right { right: 0; top: 50%; transform: translateY(-50%); }

/* Mobil: D-Pad anzeigen, Hinweis anpassen */
@media (max-width: 768px) {
    .g3d-dpad {
        display: block;
    }

    .g3d-hint-inner {
        white-space: normal;
        max-width: 280px;
        font-size: 0.75rem;
    }

    .g3d-hud-title {
        font-size: 0.9rem;
    }

    .g3d-btn {
        font-size: 0.7rem;
        padding: 0.3rem 0.7rem;
    }
}

@media (max-width: 480px) {
    .g3d-dpad {
        width: 120px;
        height: 120px;
    }

    .g3d-dpad-btn {
        width: 38px;
        height: 38px;
    }
}
