/* ═══ Justierbar (per DevTools live ändern) ═══ */
:root {
    --preview-top: 6.70%;
    --preview-left: 49.73%;
    --preview-size: 9%;
}


/* ── VHC-Container (Croak-Hop-Style) ── */
main {
    flex: 1;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 28px 20px 40px;
}

.canvas-wrap {
    width: min(56vh, 394px, calc(100vw - 32px));
    aspect-ratio: 941 / 1672;
    position: relative;
    border: 1px solid var(--border, rgba(0,245,255,0.2));
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 0 50px rgba(0,245,255,0.08), 0 0 0 1px rgba(0,245,255,0.04);
    background: #0a0805;
}

.screen {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* ── 1. VHC-Lobby Startseite ── */
#vhc-start {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    text-align: center;
    padding: 32px 24px;
    background: rgba(6,8,18,0.88);
}

#vhc-bg-anim {
    position: absolute;
    inset: 0;
    z-index: 0;
    opacity: 0.25;
    pointer-events: none;
    overflow: hidden;
}

#vhc-bg-board {
    position: absolute;
    inset: 0;
}

#vhc-start-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

#vhc-start .overlay-icon img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    filter: drop-shadow(0 0 18px rgba(0,245,255,0.5));
}

#vhc-start h2 {
    font-family: 'Orbitron', 'Lora', monospace;
    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: 4px;
    color: #fff;
    text-shadow: 0 0 30px rgba(0,245,255,0.5);
    margin: 0;
}

.vhc-tagline {
    font-family: 'Lora', sans-serif;
    color: var(--muted, #888aa0);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-size: 0.85rem;
    margin: 0;
}

#vhc-start .btn-start {
    margin-top: 8px;
    padding: 14px 38px;
    background: transparent;
    border: 2px solid var(--neon1, #00f5ff);
    border-radius: 4px;
    color: var(--neon1, #00f5ff);
    font-family: 'Orbitron', 'Lora', monospace;
    font-size: 0.95rem;
    font-weight: 900;
    letter-spacing: 4px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s;
}

#vhc-start .btn-start:hover {
    background: rgba(0,245,255,0.1);
    box-shadow: 0 0 24px rgba(0,245,255,0.4);
}

/* ── 2. Setup Screen ── */
#start-screen {
    background: #1a0e05;
    overflow-y: auto;
    padding: 1.2rem;
}

/* ── 3. Spielfeld ── */
#game-screen {
    display: flex;
    justify-content: center;
}

#board-stack {
    position: relative;
    width: 100%;
    height: 100%;
}

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

body {
    font-family: 'Lora', serif;
    font-weight: 400;
    font-size: 1.05rem;
}



h1 {
    text-align: center;
    margin-bottom: 1.2rem;
    letter-spacing: 0.1em;
    font-family: 'Lora', serif;
    font-weight: 700;
}

.mode-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.diff-row {
    display: flex;
    gap: 0.5rem;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.mode-btn, .diff-btn {
    flex: 1;
    padding: 0.6rem;
    background: rgba(212,168,75,0.1);
    border: 1px solid #5a4010;
    color: #a07830;
    font-family: 'Lora', serif;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 5px;
}

.mode-btn.active, .diff-btn.active {
    background: rgba(212,168,75,0.3);
    border-color: #d4a84b;
    color: #d4a84b;
}

label {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0.6rem 0 0.3rem;
    color: #a07830;
}

input[type="text"] {
    width: 100%;
    padding: 0.6rem;
    background: #0a0805;
    border: 1px solid #5a4010;
    border-radius: 4px;
    color: #d4a84b;
    font-family: 'Lora', serif;
    font-size: 1rem;
}

input[type="text"]:disabled {
    opacity: 0.4;
}

.chip-hint {
    text-align: center;
    font-size: 0.8rem;
    color: #806020;
    margin: 0.5rem 0 0.3rem;
    letter-spacing: 0.05em;
}

.chip-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 4px;
    margin-top: 0.4rem;
}

.chip-option {
    aspect-ratio: 1;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    overflow: hidden;
}

.chip-option img {
    width: 100%;
    height: 100%;
    display: block;
}

.chip-option.selected {
    border-color: #d4a84b;
    box-shadow: 0 0 6px rgba(212,168,75,0.7);
}

.chip-option.disabled {
    opacity: 0.25;
    cursor: not-allowed;
}

#start-btn {
    width: 100%;
    padding: 0.8rem;
    margin-top: 1rem;
    background: linear-gradient(135deg, #8b6914, #d4a84b);
    border: none;
    border-radius: 6px;
    color: #1a0e00;
    font-family: 'Lora', serif;
    font-size: 1rem;
    font-weight: bold;
    letter-spacing: 0.1em;
    cursor: pointer;
}

#start-hint {
    text-align: center;
    color: #c14040;
    font-size: 0.85rem;
    margin-top: 0.6rem;
    min-height: 1.2em;
}



#layer-bg, #layer-board {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    user-select: none;
}

#layer-bg     { z-index: 1; }
#layer-chips  { position: absolute; inset: 0; z-index: 2; pointer-events: none; clip-path: inset(15% 0 38% 0); }
#layer-board  { z-index: 3; pointer-events: none; }

#col-overlay {
    position: absolute;
    inset: 0;
    z-index: 4;
    pointer-events: none;
}

.arrow {
    position: absolute;
    width: 9%;
    aspect-ratio: 181 / 200;
    top: 13.5%;
    transform: translate(-50%, 0);
    cursor: pointer;
    pointer-events: auto;
    animation: bob 1.4s ease-in-out infinite;
    user-select: none;
    filter:
        drop-shadow(0 0 1px #ffd86b)
        drop-shadow(0 0 1px #ffd86b)
        drop-shadow(0 0 2px rgba(255,216,107,0.9));
}

.arrow:hover {
    filter:
        drop-shadow(0 0 1px #ffd86b)
        drop-shadow(0 0 2px #ffd86b)
        drop-shadow(0 0 6px rgba(255,216,107,1));
}

.arrow.hidden {
    display: none;
}

@keyframes bob {
    0%, 100% { transform: translate(-50%, 0); }
    50%      { transform: translate(-50%, -10%); }
}

.chip {
    position: absolute;
    width: 10.2%;
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
}

.preview-chip {
    position: absolute;
    width: var(--preview-size);
    aspect-ratio: 1;
    top: var(--preview-top);
    left: var(--preview-left);
    transform: translate(-50%, -50%);
    z-index: 5;
    pointer-events: none;
    filter: drop-shadow(0 0 8px rgba(212,168,75,0.6));
}

.start-icon {
    position: absolute;
    width: 40%;
    top: 38.43%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 6;
    cursor: pointer;
    filter: drop-shadow(0 0 12px rgba(255,216,107,0.8));
    animation: bob 1.4s ease-in-out infinite;
    user-select: none;
}

.start-icon.hidden { display: none; }
.start-icon.fade-out { opacity: 0; transition: opacity 0.4s; }

/* Spieler-Anzeige unten im Drachen-Bereich */
#player-info {
    position: absolute;
    top: 64%;
    left: 8%;
    right: 8%;
    bottom: 4%;
    z-index: 5;
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: none;
}

.player-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    padding: 0.4rem 0.6rem;
    border-radius: 8px;
    transition: all 0.3s;
}

.player-card.active .p-name {
    color: #ffd86b;
    text-shadow:
        0 0 6px #ffd86b,
        0 0 12px rgba(255,216,107,0.7);
}

.p-name {
    font-family: 'Lora', serif;
    font-size: clamp(0.9rem, 2.4vw, 1.1rem);
    color: #f0d080;
    font-weight: bold;
    letter-spacing: 0.05em;
    text-align: center;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow:
        0 0 3px rgba(0,0,0,0.95),
        0 1px 2px rgba(0,0,0,0.95),
        0 0 6px rgba(0,0,0,0.7);
}

.p-chip {
    width: clamp(36px, 7vw, 56px);
    aspect-ratio: 1;
    filter: drop-shadow(0 0 4px rgba(0,0,0,0.7));
}

.p-score {
    font-family: 'Lora', serif;
    font-size: clamp(1.1rem, 3.2vw, 1.5rem);
    color: #ffd86b;
    font-weight: bold;
    text-shadow:
        0 0 3px rgba(0,0,0,0.95),
        0 1px 2px rgba(0,0,0,0.95);
}

/* Sieg-Popup */
#win-overlay {
    position: absolute;
    inset: 0;
    z-index: 10;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
}

#win-overlay.hidden { display: none; }

#win-box {
    background: #1a0e05;
    border: 2px solid #d4a84b;
    border-radius: 10px;
    padding: 1.5rem 2rem;
    text-align: center;
    box-shadow: 0 0 30px rgba(212,168,75,0.5);
}

#win-text {
    color: #ffd86b;
    font-family: 'Lora', serif;
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
}

#win-next {
    padding: 0.6rem 1.5rem;
    background: linear-gradient(135deg, #8b6914, #d4a84b);
    border: none;
    border-radius: 6px;
    color: #1a0e00;
    font-family: 'Lora', serif;
    font-weight: bold;
    cursor: pointer;
    letter-spacing: 0.1em;
}
