﻿/* Walter Suite – Tetris
   File: wwwroot/css/ws-tetris.css
*/
body {
    background: radial-gradient(circle at top, #020617 0, #020617 60%, #020617 100%);
}

/* PAGE WRAPPER */
.ws-tetris-page {
    position: relative;
    background: radial-gradient(1400px 800px at 70% -20%, #1f2937 0, #020617 40%, #020617 100%);
    color: #e5e7eb;
    overflow: hidden;
    width: 100%;
}

/* ========================= */
/* HERO SECTION (shortened)  */
/* ========================= */

.ws-tetris-hero {
    position: relative;
    padding: 2rem 0; /* Reduced height */
    min-height: 160px; /* ~150–200px target */
    display: flex;
    align-items: center;
    overflow: hidden;
}

/* Glowing orbits remain but smaller + more subtle */
.ws-tetris-orbit {
    position: absolute;
    border-radius: 999px;
    filter: blur(45px);
    opacity: 0.55;
    pointer-events: none;
}

.ws-tetris-orbit-1 {
    width: 260px;
    height: 260px;
    top: -80px;
    right: 5%;
    background: conic-gradient(from 140deg, #38bdf8, #a855f7, #22c55e);
    animation: ws-orbit-slow 26s linear infinite;
}

.ws-tetris-orbit-2 {
    width: 180px;
    height: 180px;
    bottom: -80px;
    left: 5%;
    background: conic-gradient(from 40deg, #f97316, #ec4899, #3b82f6);
    animation: ws-orbit-slow 32s linear infinite reverse;
}

.ws-tetris-orbit-3 {
    width: 180px;
    height: 180px;
    top: 20%;
    left: 30%;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.25), transparent 70%);
}

@keyframes ws-orbit-slow {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.ws-tetris-hero-inner {
    position: relative;
    z-index: 2;
}

/* Left-side copy only (we remove the visual box entirely) */
.ws-tetris-hero-copy {
    max-width: 500px;
}

.ws-tetris-hero-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 0.7rem;
    color: #9ca3af;
    margin-bottom: 0.3rem;
}

.ws-tetris-hero-title {
    font-size: clamp(2rem, 4vw, 3rem); /* Smaller but still bold */
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin: 0;
    background: linear-gradient(120deg, #22d3ee, #a855f7, #facc15);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.ws-tetris-hero-subtitle {
    font-size: 0.85rem;
    color: #d1d5db;
    margin-top: 0.3rem;
    max-width: 26rem;
}


.ws-tetris-hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 1.05rem;
}

.ws-tetris-pill {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.9);
    background: rgba(15, 23, 42, 0.9);
}

.ws-tetris-hero-cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 0.9rem;
}

.ws-tetris-hero-cta {
    border-radius: 999px;
    padding: 0.7rem 1.6rem;
    font-size: 0.9rem;
    box-shadow: 0 14px 30px rgba(56, 189, 248, 0.35);
}

.ws-tetris-hero-cta-secondary {
    border-radius: 999px;
    padding: 0.7rem 1.4rem;
    font-size: 0.9rem;
    border-color: rgba(248, 250, 252, 0.6);
    color: #e5e7eb;
    text-decoration: none;
}

    .ws-tetris-hero-cta-secondary:hover {
        background-color: rgba(15, 23, 42, 0.7);
        color: #ffffff;
    }

.ws-tetris-hero-keys {
    font-size: 0.8rem;
    color: #9ca3af;
}

/* Right: animated "moving image" */
.ws-tetris-hero-visual {
    width: 360px;
    max-width: 100%;
    border-radius: 22px;
    padding: 16px;
    background: radial-gradient(circle at top, rgba(15, 23, 42, 0.95), #020617 70%);
    border: 1px solid rgba(148, 163, 184, 0.3);
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.85), 0 24px 60px rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(16px);
}

.ws-tetris-hero-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: #9ca3af;
    margin-bottom: 10px;
}

.ws-tetris-hero-chip {
    padding: 3px 10px;
    border-radius: 999px;
    border: 1px solid rgba(96, 165, 250, 0.7);
    color: #e5e7eb;
}

/* Faux tetris grid */
.ws-tetris-hero-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 3px;
    background: #020617;
    border-radius: 14px;
    padding: 10px;
    border: 1px solid rgba(15, 23, 42, 0.9);
}

.ws-tetris-hero-cell {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 4px;
    background: #020617;
    border: 1px solid #020617;
}

/* Animated falling blocks layered on top */
.ws-tetris-hero-block {
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 4px;
    background: linear-gradient(135deg, #22d3ee, #a855f7);
    box-shadow: 0 0 16px rgba(129, 140, 248, 0.7);
    animation: ws-tetris-fall 3.5s linear infinite;
}

    .ws-tetris-hero-block:nth-child(1) {
        left: 72%;
        top: -30px;
        animation-delay: 0s;
    }

    .ws-tetris-hero-block:nth-child(2) {
        left: 55%;
        top: -60px;
        animation-delay: 0.3s;
    }

    .ws-tetris-hero-block:nth-child(3) {
        left: 35%;
        top: -40px;
        animation-delay: 0.6s;
    }

    .ws-tetris-hero-block:nth-child(4) {
        left: 18%;
        top: -50px;
        animation-delay: 0.9s;
    }

@keyframes ws-tetris-fall {
    0% {
        transform: translateY(0);
        opacity: 0;
    }

    8% {
        opacity: 1;
    }

    80% {
        transform: translateY(220px);
        opacity: 1;
    }

    100% {
        transform: translateY(260px);
        opacity: 0;
    }
}

/* ========================= */
/* PLAY AREA (GAME)          */
/* ========================= */

.ws-tetris-play {
    padding: 2.5rem 0 3rem;
    background: radial-gradient(circle at top, #020617 0, #020617 60%, #020617 100%);
}

.ws-tetris-shell {
    display: flex;
    justify-content: center;
}

.ws-tetris-wrap {
    display: grid;
    grid-template-columns: minmax(0, 360px) 260px;
    gap: 20px;
    align-items: flex-start;
}

/* Panels */
.ws-tetris-panel {
    background: radial-gradient(circle at top, #020617 0, #020617 60%, #020617 100%);
    border-radius: 18px;
    padding: 16px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.7), 0 24px 60px rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(22px);
}

.ws-tetris-panel-board {
    padding: 22px 22px 20px;
}

.ws-tetris-panel-sidebar {
    padding: 18px 18px 16px;
}

/* Canvas */
.ws-tetris-canvas {
    display: block;
    width: 300px;
    height: 600px;
    background: linear-gradient(180deg, #020617 0, #020617 60%, #020617 100%);
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.9);
    box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.35), 0 18px 55px rgba(15, 23, 42, 0.95);
}

/* Sidebar header + stats */
.ws-tetris-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.ws-tetris-title-wrap {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ws-tetris-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.65rem;
    color: #9ca3af;
}

.ws-tetris-title {
    margin: 0;
    font-size: 1.1rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.98;
}

.ws-tetris-badge {
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid #1d4ed8;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.ws-tetris-stats {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.ws-tetris-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(15, 23, 42, 0.96);
    padding: 8px 10px;
    border-radius: 9px;
    border: 1px solid rgba(30, 64, 175, 0.7);
    font-size: 0.8rem;
}

.ws-tetris-stat-label {
    opacity: 0.85;
}

.ws-tetris-stat-value {
    font-weight: 600;
}

/* Next preview */
.ws-tetris-next-label {
    font-size: 0.8rem;
    opacity: 0.9;
    margin-top: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ws-tetris-next-chip {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.7);
    opacity: 0.9;
}

.ws-tetris-next {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3px;
    width: 120px;
    aspect-ratio: 1 / 1;
    margin-top: 6px;
}

.ws-tetris-cell {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #020617;
    border: 1px solid #0e152a;
    border-radius: 4px;
}

/* Buttons */
.ws-tetris-btns {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 16px;
}

.ws-tetris-btn {
    cursor: pointer;
    background: #020617;
    color: #e5e7eb;
    border: 1px solid #1c2b4d;
    border-bottom-width: 2px;
    padding: 8px 10px;
    border-radius: 999px;
    font-size: 0.8rem;
    transition: background 0.16s ease, border-color 0.16s ease, transform 0.12s ease, box-shadow 0.18s ease;
    text-align: center;
}

    .ws-tetris-btn:hover {
        border-color: #38bdf8;
        background: #02091a;
        box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.5);
        transform: translateY(-1px);
    }

/* Keys */
.ws-tetris-keys {
    margin-top: 14px;
    font-size: 0.77rem;
    opacity: 0.92;
}

    .ws-tetris-keys p {
        margin: 0 0 4px;
    }

.ws-tetris-kbd {
    background: #020617;
    border: 1px solid #15223d;
    border-bottom-width: 2px;
    border-radius: 6px;
    padding: 1px 6px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.75rem;
}

/* Footer note inside sidebar */
.ws-tetris-footer {
    text-align: center;
    margin-top: 12px;
    opacity: 0.65;
    font-size: 0.75rem;
}

/* ========================= */
/* RESPONSIVE                */
/* ========================= */

@media (max-width: 992px) {
    .ws-tetris-hero-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .ws-tetris-hero-copy {
        max-width: 100%;
    }

    .ws-tetris-hero-cta-row {
        justify-content: center;
    }

    .ws-tetris-hero-keys {
        max-width: 22rem;
        margin-inline: auto;
    }

    .ws-tetris-wrap {
        grid-template-columns: minmax(0, 1fr);
        max-width: 440px;
    }

    .ws-tetris-panel-board {
        justify-self: center;
    }

    .ws-tetris-panel-sidebar {
        max-width: 260px;
        justify-self: center;
    }
}

/* Container used for scaling the play area */
.ws-tetris-play-inner {
    display: flex;
    justify-content: center;
    /* height is controlled via JS to avoid scroll */
}

#tetris-wrap {
    transform-origin: top center;
}

/* ========================= */
/* TOUCH CONTROLS (MOBILE)   */
/* ========================= */

.ws-tetris-touch {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    justify-content: center;
}

.ws-tetris-touch-row {
    display: flex;
    gap: 8px;
}

.ws-tetris-touch-row-top {
    justify-content: center;
}

.ws-tetris-touch-row-bottom {
    justify-content: center;
}

/* Large tap targets, same visual language as other buttons */
.ws-tetris-touch-btn {
    min-width: 56px;
    min-height: 56px;
    border-radius: 999px;
    border: 1px solid #1c2b4d;
    border-bottom-width: 2px;
    background: #020617;
    color: #e5e7eb;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    transition: background 0.16s ease, border-color 0.16s ease, transform 0.12s ease, box-shadow 0.18s ease;
}

    .ws-tetris-touch-btn:active {
        transform: translateY(1px);
        box-shadow: none;
    }

    .ws-tetris-touch-btn:hover {
        border-color: #38bdf8;
        background: #02091a;
        box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.5);
    }

@media (max-width: 992px) {
    .ws-tetris-page {
        overflow-y: auto; /* allow vertical scroll on tablet/phone */
        overflow-x: hidden; /* still avoid horizontal scroll */
    }

    /* Optional: let the inner wrapper grow naturally on small screens */
    .ws-tetris-play-inner {
        height: auto !important;
    }
}

/* Tetris hero – title + Walter alignment */
.ws-tetris-title-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Walter next to Tetris title */
.ws-tetris-walter-inline {
    width: 48px;
    height: 48px;
    border-radius: 999px;
    padding: 3px;
    background-color: #fff !important;
    border: 1px solid rgba(148, 163, 184, 0.6);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.85);
    flex-shrink: 0;
}

@media (max-width: 576px) {
    .ws-tetris-walter-inline {
        width: 40px;
        height: 40px;
    }
}
