/* ═══════════════════════════════════════════
   MAGISCHE MIESMUSCHEL — Dark Magic / Pink Theme
   Three.js 3D Conch Shell Experience
   ═══════════════════════════════════════════ */

:root {
    --bg-primary: #0d0218;
    --bg-secondary: #150525;
    --text-primary: #f0e6f8;
    --text-muted: #b89ccf;
    --pink: #ff88cc;
    --pink-glow: rgba(255, 136, 204, 0.2);
    --purple: #9966cc;
    --purple-dark: #441155;
    --accent-gradient: linear-gradient(135deg, #ff88cc, #9966cc);
}

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

html, body {
    width: 100%;
    height: 100%;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    -webkit-tap-highlight-color: transparent;
    touch-action: none;
}

/* ─── Background Magic ────────────────────── */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 50% 40%, rgba(153, 102, 204, 0.15) 0%, transparent 70%),
        radial-gradient(ellipse 60% 50% at 50% 60%, rgba(255, 136, 204, 0.08) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* ─── App Layout ──────────────────────────── */
#app {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    height: calc(var(--vh, 1vh) * 100);
    padding: 12px 10px 8px;
    user-select: none;
    -webkit-user-select: none;
}

/* ─── Header ──────────────────────────────── */
header {
    text-align: center;
    padding: 10px 0 4px;
    flex-shrink: 0;
}

header h1 {
    font-size: 1.6rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.5px;
}

.subtitle {
    margin-top: 2px;
    font-size: 0.9rem;
    color: var(--text-muted);
    font-style: italic;
}

/* ─── Conch Container ─────────────────────── */
main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 0;
}

#conchContainer {
    width: 100%;
    height: 100%;
    max-width: 550px;
    max-height: 65vh;
    cursor: grab;
    touch-action: none;
}

#conchContainer:active {
    cursor: grabbing;
}

/* ─── Tap hint ────────────────────────────── */
#tapHint {
    position: fixed;
    bottom: 70px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8rem;
    color: var(--text-muted);
    opacity: 0.6;
    text-align: center;
    pointer-events: none;
    transition: opacity 1s ease;
    animation: pulse-hint 2s ease-in-out infinite;
}

@keyframes pulse-hint {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.8; }
}

/* ─── Footer ──────────────────────────────── */
footer {
    text-align: center;
    padding: 6px 0;
    flex-shrink: 0;
}

footer p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

footer em {
    color: var(--pink);
}

/* ─── Speech Bubble ───────────────────────── */
#speechBubble {
    position: fixed;
    bottom: 130px;
    left: 50%;
    transform: translateX(-50%) scale(0);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 136, 204, 0.3);
    border-radius: 16px;
    padding: 12px 20px;
    font-size: 1rem;
    color: var(--text-primary);
    text-align: center;
    max-width: 75vw;
    pointer-events: none;
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
    z-index: 50;
}

#speechBubble.show {
    transform: translateX(-50%) scale(1);
    opacity: 1;
}

/* ─── Responsive: Mobile ──────────────────── */
@media (max-width: 600px) {
    header h1 {
        font-size: 1.2rem;
    }
    .subtitle {
        font-size: 0.8rem;
    }
    #conchContainer {
        max-height: 55vh;
        max-width: 100%;
    }
    #speechBubble {
        font-size: 0.9rem;
        padding: 10px 16px;
        max-width: 85vw;
        bottom: 110px;
    }
    #tapHint {
        bottom: 60px;
        font-size: 0.7rem;
    }
}

@media (max-height: 700px) {
    header {
        padding: 6px 0 2px;
    }
    header h1 {
        font-size: 1.2rem;
    }
    .subtitle {
        display: none;
    }
    #conchContainer {
        max-height: 60vh;
    }
    footer p {
        font-size: 0.7rem;
    }
}

@media (max-height: 500px) {
    header h1 {
        font-size: 1rem;
    }
    .subtitle, footer, #tapHint {
        display: none;
    }
    #conchContainer {
        max-height: 75vh;
    }
}
