/* ===================================================================
   Landing screen - game selector
   ================================================================ */

.landing-body {
    display: flex;
    /* flex-start (not center) so the GAME ROOM header never gets
       clipped above the viewport on shorter screens — content always
       anchors at the top and grows downward. */
    align-items: flex-start;
    justify-content: center;
    min-height: 100vh;
    padding: 1rem 1rem 1.2rem;
    position: relative;
}

.landing {
    position: relative;
    z-index: 1;
    width: min(1180px, 100%);
    text-align: center;
}

.landing-header { margin-bottom: 1.2rem; }

.brand-stack { display: inline-flex; flex-direction: column; align-items: center; gap: .3rem; }

.brand-mark {
    font-family: var(--f-display);
    font-size: clamp(2.4rem, 6.5vw, 4.4rem);
    letter-spacing: .12em;
    color: var(--c-bone);
    line-height: 1;
}
.brand-mark span {
    color: var(--c-crimson-2);
    text-shadow: 0 0 28px rgba(212,33,61,.6);
}
.brand-sub {
    font-family: var(--f-display);
    letter-spacing: .35em;
    color: var(--c-bone-dim);
    font-size: clamp(.72rem, 1.3vw, .9rem);
}

/* Game grid ------------------------------------------------------- */
.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: .8rem;
    margin-bottom: 1rem;
}

.game-tile {
    position: relative;
    background: linear-gradient(160deg, var(--c-ink-2), var(--c-ink-3));
    border: 1px solid rgba(255,255,255,.08);
    border-radius: var(--r-xl);
    padding: .85rem;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: .7rem;
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
    cursor: pointer;
}
.game-tile::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 40%, rgba(255,255,255,.1) 50%, transparent 60%);
    transform: translateX(-100%);
    transition: transform .8s ease;
    pointer-events: none;
}
.game-tile:hover {
    transform: translateY(-6px);
    box-shadow: 0 22px 50px rgba(0,0,0,.45);
}
.game-tile:hover::before { transform: translateX(100%); }

.game-tile__art {
    height: 88px;
    border-radius: var(--r-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Flip 7 art */
.game-tile--flip7 .game-tile__art {
    background:
        radial-gradient(circle at 50% 35%, rgba(212,33,61,.5), transparent 60%),
        repeating-linear-gradient(45deg, #2a0712, #2a0712 8px, #1a040c 8px, #1a040c 16px);
}
.game-tile__7 {
    font-family: var(--f-display);
    font-size: 3.8rem;
    color: var(--c-crimson-2);
    text-shadow: 0 0 24px rgba(212,33,61,.7), 0 2px 0 rgba(0,0,0,.5);
    line-height: 1;
}
.game-tile__flip {
    font-family: var(--f-display);
    font-size: 1.1rem;
    color: var(--c-bone);
    letter-spacing: .3em;
    margin-left: .6rem;
}
.game-tile--flip7:hover { border-color: rgba(212,33,61,.5); }

/* The Crew art */
.game-tile__art--crew {
    background:
        radial-gradient(ellipse 60% 40% at 50% 50%, rgba(77,171,255,.35), transparent 70%),
        linear-gradient(160deg, #0a1b2e, #050d18);
}
.game-tile__icon {
    font-size: 3.2rem;
    filter: drop-shadow(0 0 20px rgba(77,171,255,.5));
    animation: hover 3s ease-in-out infinite alternate;
}
@keyframes hover {
    from { transform: translateY(-4px); }
    to { transform: translateY(4px); }
}
.game-tile--crew:hover { border-color: rgba(77,171,255,.5); }

/* UNO art */
.game-tile__art--uno {
    background:
        conic-gradient(from 45deg,
            #d32d2d 0deg 90deg,
            #f6c813 90deg 180deg,
            #4caf50 180deg 270deg,
            #2196f3 270deg 360deg);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .2rem;
    box-shadow: inset 0 0 80px rgba(0,0,0,.45);
}
.game-tile__art--uno > span {
    font-family: var(--f-display);
    font-size: 2.4rem;
    color: var(--c-bone);
    text-shadow: 0 4px 0 rgba(0,0,0,.4), 0 0 18px rgba(0,0,0,.5);
    line-height: 1;
    letter-spacing: .04em;
    transform: rotate(-6deg);
}
.game-tile__art--uno > span:nth-child(1) { transform: rotate(-8deg) translateY(2px); }
.game-tile__art--uno > span:nth-child(2) { transform: rotate(0deg); }
.game-tile__art--uno > span:nth-child(3) { transform: rotate(8deg) translateY(2px); }
.game-tile--uno:hover { border-color: rgba(246,200,19,.5); }

/* Farkle art */
.game-tile__art--farkle {
    background:
        radial-gradient(circle at 30% 30%, rgba(56,217,169,.3), transparent 60%),
        linear-gradient(140deg, #1a2e3a 0%, #0f1d27 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .8rem;
    box-shadow: inset 0 0 80px rgba(0,0,0,.45);
}
.game-tile__art--farkle .game-tile__icon {
    font-size: 2.8rem;
    text-shadow: 0 6px 18px rgba(0,0,0,.6);
    animation: tileDice 4s ease-in-out infinite;
}
.game-tile__art--farkle .game-tile__icon--2 {
    font-size: 2.1rem;
    transform: rotate(15deg) translateY(8px);
    animation-delay: 1.5s;
}
@keyframes tileDice {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50%      { transform: translateY(-6px) rotate(-8deg); }
}
.game-tile--farkle:hover { border-color: rgba(56,217,169,.5); }

/* Connect Four art */
.game-tile__art--c4 {
    background: linear-gradient(160deg, #0f3a6e 0%, #072448 100%);
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: .6rem;
    padding: 1rem;
    box-shadow: inset 0 0 80px rgba(0,0,0,.45);
}
.game-tile__art--c4 > span {
    border-radius: 50%;
    aspect-ratio: 1 / 1;
    box-shadow: inset 0 -8px 18px rgba(0,0,0,.35),
                inset 0 2px 4px rgba(255,255,255,.3);
}
.game-tile__c4-r { background: radial-gradient(circle at 30% 30%, #ff6688, #d4213d 60%, #8a0e22); }
.game-tile__c4-y { background: radial-gradient(circle at 30% 30%, #fff09e, #f6c813 60%, #a37500); }
.game-tile--c4:hover { border-color: rgba(246,200,19,.5); }

/* Memory Match art */
.game-tile__art--memory {
    background:
        radial-gradient(circle at 50% 50%, rgba(155,107,255,.3), transparent 60%),
        linear-gradient(140deg, #2a1c4a 0%, #1a1230 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 80px rgba(0,0,0,.45);
}
.game-tile__art--memory .game-tile__icon {
    font-size: 3.4rem;
    animation: tileBrain 3s ease-in-out infinite;
}
@keyframes tileBrain {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.08); }
}
.game-tile--memory:hover { border-color: rgba(155,107,255,.5); }

/* DELVE art — animated dungeon torchlight */
.game-tile__art--delve {
    position: relative;
    background:
        radial-gradient(circle at 50% 100%, rgba(246,183,60,.35), transparent 55%),
        radial-gradient(circle at 50% 50%, rgba(155,107,255,.2), transparent 65%),
        repeating-linear-gradient(45deg, #1c1430 0 6px, #110a22 6px 12px),
        #06060a;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 80px rgba(0,0,0,.6);
    overflow: hidden;
}
.game-tile__art--delve::before,
.game-tile__art--delve::after {
    content: '';
    position: absolute;
    bottom: 6px;
    width: 8px; height: 16px;
    background: radial-gradient(circle at 50% 30%, #ffe080, #ff7c2a 55%, transparent 90%);
    border-radius: 50%;
    animation: delveTorch 1.6s ease-in-out infinite alternate;
    filter: blur(.5px);
}
.game-tile__art--delve::before { left: 14px; }
.game-tile__art--delve::after  { right: 14px; animation-delay: .6s; }
@keyframes delveTorch {
    from { transform: scale(.85) translateY(0); opacity: .7; }
    to   { transform: scale(1.15) translateY(-2px); opacity: 1; }
}
.game-tile__art--delve .game-tile__icon {
    position: relative;
    font-size: 4.5rem;
    text-shadow: 0 6px 18px rgba(0,0,0,.7);
    z-index: 1;
    animation: delveSword 3s ease-in-out infinite;
}
@keyframes delveSword {
    0%, 100% { transform: rotate(-4deg); }
    50%      { transform: rotate(4deg); }
}
.game-tile--delve:hover { border-color: rgba(246,183,60,.5); }

/* TYCOON tile art — gold + crimson casino vibe */
.game-tile__art--tycoon {
    position: relative;
    background:
        radial-gradient(circle at 50% 100%, rgba(246,183,60,.4), transparent 60%),
        repeating-linear-gradient(135deg, #2a1812 0 8px, #1a0e0a 8px 16px),
        #0a0608;
    display: flex; align-items: center; justify-content: center;
    box-shadow: inset 0 0 80px rgba(0,0,0,.6);
    overflow: hidden;
}
.game-tile__art--tycoon::before {
    content: ''; position: absolute;
    inset: 12% 18%;
    border: 2px solid rgba(246,200,19,.6);
    border-radius: 12px;
    pointer-events: none;
    box-shadow: 0 0 24px rgba(246,200,19,.35);
}
.game-tile__art--tycoon .game-tile__icon {
    position: relative;
    font-size: 4.5rem;
    text-shadow: 0 6px 18px rgba(0,0,0,.8);
    animation: tyTip 3s ease-in-out infinite;
    z-index: 1;
}
@keyframes tyTip {
    0%, 100% { transform: rotate(-6deg) translateY(0); }
    50%      { transform: rotate(6deg) translateY(-6px); }
}
.game-tile--tycoon:hover { border-color: rgba(246,200,19,.55); }

/* Game meta */
.game-tile__meta { display: flex; flex-direction: column; gap: .25rem; }
.game-tile__meta h2 {
    font-size: 1.35rem;
    color: var(--c-bone);
    letter-spacing: .04em;
    line-height: 1;
}
.game-tile__meta p {
    color: var(--c-bone-dim);
    font-size: .8rem;
    line-height: 1.35;
}
.game-tile__sub {
    color: var(--c-bone-dim);
    font-family: var(--f-display);
    letter-spacing: .15em;
    font-size: .68rem;
    opacity: .7;
}

/* Join row -------------------------------------------------------- */
.join-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.big-card {
    background: linear-gradient(160deg, var(--c-ink-2), var(--c-ink-3));
    border: 1px solid rgba(255,255,255,.08);
    border-radius: var(--r-xl);
    padding: 1rem 1.2rem;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
    position: relative;
    overflow: hidden;
}
.big-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 36px rgba(0,0,0,.45);
}
.big-card__icon {
    width: 44px; height: 44px;
    border-radius: var(--r-md);
    background: rgba(155,107,255,.12);
    color: var(--c-violet);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.big-card__icon svg { width: 26px; height: 26px; }
.big-card h2 { font-size: 1.2rem; color: var(--c-bone); margin-bottom: .1rem; }
.big-card p { color: var(--c-bone-dim); font-size: .82rem; line-height: 1.35; }
.big-card__cta {
    display: block;
    margin-top: .2rem;
    color: var(--c-violet);
    font-weight: 600;
    font-size: .78rem;
    letter-spacing: .04em;
}
.big-card--join:hover { border-color: rgba(155,107,255,.4); }

/* Hints ---------------------------------------------------------- */
.hint-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: .6rem;
    margin-bottom: .8rem;
}
.hint {
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.06);
    border-radius: var(--r-md);
    padding: .55rem .8rem;
    text-align: left;
    display: flex;
    gap: .6rem;
    align-items: flex-start;
}
.hint-num {
    flex-shrink: 0;
    width: 24px; height: 24px;
    border-radius: 50%;
    background: rgba(212,33,61,.2);
    color: var(--c-crimson-2);
    font-family: var(--f-display);
    display: flex; align-items: center; justify-content: center;
    font-size: .9rem;
}
.hint p { color: var(--c-bone-dim); font-size: .78rem; line-height: 1.35; }
.hint code { background: rgba(255,255,255,.06); padding: .1rem .3rem; border-radius: 3px; }

.landing-footer { color: var(--c-bone-dim); font-size: .75rem; opacity: .6; }
.landing-footer code { background: rgba(255,255,255,.05); padding: .15rem .4rem; border-radius: 4px; }
