/* ============================================================
   PREMIUM VISUAL SKIN — NO FUNCTIONAL CHANGES
   ============================================================ */

/* Reliable Import for Beleren Font */
@import url('https://fonts.cdnfonts.com/css/beleren-caps');

:root {
    /* Core Palette */
    --bg: radial-gradient(1200px 800px at 50% -20%, #1c1c1f 0%, #0b0b0d 55%, #050507 100%);
    --tile-bg: linear-gradient(180deg, #151517, #0f0f11);
    --border: rgba(255,255,255,0.12);
    --text: #f5f5f7;

    /* States */
    --key-bg: linear-gradient(180deg, #2a2a2e, #1e1e22);
    --correct: linear-gradient(180deg, #6bbf7a, #3f8f57);
    --present: linear-gradient(180deg, #d4b44c, #9f8431);
    --absent: linear-gradient(180deg, #2a2a2e, #1b1b1f);

    /* Accent */
    --orange: #ff6a2a;

    /* FX */
    --glass: rgba(255,255,255,0.06);
    --glow: 0 0 0 transparent;
}

* {
    box-sizing: border-box;
    touch-action: manipulation;
    -webkit-text-size-adjust: none;
}

.key, .tile {
    touch-action: none;
}

/* ============================================================
   BODY & APP CONTAINER
   ============================================================ */

body {
    background: var(--bg);
    background-image: url("bg.jpg");
    color: var(--text);
    font-family: 'Segoe UI', Tahoma, sans-serif;
    margin: 0;
    display: flex;
    justify-content: center;
    height: 100dvh;
    overflow: hidden;
}

#game-container {
    width: 100%;
    max-width: 500px;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 6px;
}

/* ============================================================
   STACK MANAGEMENT (UNCHANGED LOGIC)
   ============================================================ */

header { flex-shrink: 0; }

#board {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 0;
    padding: 8px 0;
}

#keyboard {
    flex-shrink: 0;
    margin-top: auto;
    padding-bottom: env(safe-area-inset-bottom);
}

/* ============================================================
   TILES — HIGH-END DEPTH & MOTION
   ============================================================ */

.row {
    display: flex;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    margin-bottom: 6px;
}

.tile {
    flex: 1;
    max-width: 50px;
    aspect-ratio: 1 / 1;

    background: var(--tile-bg);
    border: 1px solid var(--border);
    border-radius: 10px;

    display: flex;
    justify-content: center;
    align-items: center;

    font-weight: 700;
    font-size: clamp(0.8rem, 4vw, 1.4rem);

    margin: 0 3px;

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.05),
        0 4px 12px rgba(0,0,0,0.4);

    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease,
        background 0.2s ease,
        border-color 0.2s ease;
}

.tile:not(.static-tile):active {
    transform: translateY(1px) scale(0.98);
}

.static-tile {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    flex: 0.3;
}

/* ============================================================
   TILE STATES — LUXURY COLOR PASS
   ============================================================ */

.correct {
    background: var(--correct) !important;
    border-color: rgba(255,255,255,0.25) !important;
    box-shadow:
        0 8px 20px rgba(83,141,78,0.45),
        inset 0 1px 0 rgba(255,255,255,0.25);
}

.present {
    background: var(--present) !important;
    border-color: rgba(255,255,255,0.25) !important;
    box-shadow:
        0 8px 20px rgba(181,159,59,0.45),
        inset 0 1px 0 rgba(255,255,255,0.25);
}

.absent {
    background: var(--absent) !important;
    border-color: rgba(255,255,255,0.08) !important;
}

/* ============================================================
   HINT STRIP — GLASS CARD
   ============================================================ */

#hint-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    font-size: 0.75rem;
    margin: 6px 0;
    flex-wrap: wrap;

    background: linear-gradient(180deg, #f7f7f8, #e9e9ec);
    color: #111;
    padding: 12px 14px;
    border-radius: 12px;

    box-shadow:
        0 10px 30px rgba(0,0,0,0.25),
        inset 0 1px 0 rgba(255,255,255,0.6);
}

/* ============================================================
   ART
   ============================================================ */

#art-container {
    height: 15vh;
    max-height: 100px;
    display: flex;
    justify-content: center;
    margin-bottom: 6px;
}

#art-container img {
    height: 100%;
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: 0 12px 30px rgba(0,0,0,0.45);
}

@media (max-height: 650px) {
    #art-container { display: none; }
}

/* ============================================================
   KEYBOARD — MECHANICAL / PREMIUM
   ============================================================ */

.key-row {
    display: flex;
    justify-content: center;
    margin-bottom: 6px;
    width: 100%;
}

.key {
    background: var(--key-bg);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.08);

    height: 50px;
    border-radius: 10px;
    margin: 0 3px;
    flex: 1;

    font-weight: 700;
    font-size: 0.8rem;

    box-shadow:
        0 6px 14px rgba(0,0,0,0.45),
        inset 0 1px 0 rgba(255,255,255,0.08);

    transition:
        transform 0.12s ease,
        box-shadow 0.12s ease,
        background 0.2s ease;
}

.key:active {
    transform: translateY(1px) scale(0.97);
    box-shadow:
        0 3px 8px rgba(0,0,0,0.5),
        inset 0 1px 0 rgba(255,255,255,0.05);
}

.key[data-key="ENTER"],
.key[data-key="BACKSPACE"] {
    flex: 1.5;
    font-size: 0.6rem;
}

/* ============================================================
   TYPOGRAPHY & GLOBALS
   ============================================================ */

h1,
.tile,
.key,
#modal-title,
#share-btn {
    font-family: 'Beleren Caps', serif !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.orange { color: var(--orange); }
.hidden { display: none !important; }

/* ============================================================
   MODAL — DARK GLASS
   ============================================================ */

#modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(6px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

#modal-content {
    background: linear-gradient(180deg, #18181b, #0f0f12);
    padding: 22px;
    border-radius: 16px;
    width: 90%;
    max-width: 400px;
    text-align: center;

    box-shadow:
        0 30px 80px rgba(0,0,0,0.7),
        inset 0 1px 0 rgba(255,255,255,0.08);
}

#full-card-image {
    width: 100%;
    border-radius: 12px;
    margin-top: 12px;
}

/* ============================================================
   LOGO / TOP BAR
   ============================================================ */

.app-logo {
    height: clamp(100px, 20vh, 150px);
    width: auto;
    display: block;
    margin: 0 auto;
    filter:
        drop-shadow(0 8px 20px rgba(0,0,0,0.55))
        drop-shadow(0 0 30px rgba(255,106,42,0.15));
}

.top-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60px;
    width: 100%;
    position: relative;
}

#dev-tools {
    display: none !important;
}
