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

:root {
    --ink: #162033;
    --muted: #687386;
    --line: #e4e8ef;
    --bg: #f5f7fa;
    --blue: #1769e0;
    --blue2: #67a3ff;
    --white: #fff;
}

body {
    min-height: 100vh;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--ink);
    background: var(--bg);
}

a {
    text-decoration: none;
    color: inherit;
}


/* =========================================================
   HERO
   ========================================================= */

.hero {
    position: relative;
    overflow: hidden;
    min-height: 390px;
    color: #fff;

    background:
        radial-gradient(
            circle at 82% 22%,
            rgba(54, 126, 255, .25),
            transparent 32%
        ),
        radial-gradient(
            circle at 10% 80%,
            rgba(32, 151, 255, .12),
            transparent 28%
        ),
        #101a2c;
}

.hero:before {
    content: "";
    position: absolute;

    width: 500px;
    height: 500px;

    right: -190px;

    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 50%;

    box-shadow:
        0 0 0 55px rgba(255, 255, 255, .025),
        0 0 0 110px rgba(255, 255, 255, .018);
}


/* =========================================================
   HERO CONTENT
   ========================================================= */

.hero-content {
    position: relative;
    z-index: 2;

    margin: auto;

    padding: 35px 24px;

    text-align: center;
}


/* Hero image */

.hero-content img {
    display: block;

    width: 100%;
    height: auto;

    margin: auto;

    border-radius: 20px;

    box-shadow:
        0 25px 60px rgba(0, 0, 0, .25);
}

.hero-content .how-to-play {
    position: absolute;
    z-index: 20;

    left: 50%;
    bottom: 12px;
    transform: translateX(-50%);

    color: #ffffff;
    background: rgba(0, 0, 0, 0.28);
    padding: 7px 18px;

    border-radius: 7px;

    font-size: 14px;
    font-weight: 600;
    text-decoration: none;

    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);

    transition: all 0.25s ease;
}

.hero-content .how-to-play:hover {
    background: rgba(0, 0, 0, 0.5);
    color: #ffffff;
}


/* =========================================================
   NAVIGATION OVER HERO IMAGE
   ========================================================= */

.hero-content .nav { 
    position: absolute; 
    z-index: 10; 
 
    top: 2px; 
    left: 50%; 
 
    transform: translateX(-50%); 
 
    width: calc(100% - 48px); 
    max-width: 1100px; 
 
    padding: 5px 24px; 

    display: flex; 
    align-items: center; 
    justify-content: space-between;

    /* Transparent background */
    background: rgba(255, 255, 255, 0.12);

    /* Soft glass effect */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);

    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 14px;
}


/* Brand */

.brand {
    display: inline-flex;
    align-items: center;

    gap: 10px;

    font-size: 20px;
    font-weight: 800;

    color: #fff;
}

.brand-icon {
    display: grid;
    place-items: center;

    width: 35px;
    height: 35px;

    border-radius: 10px;

    background: #fff;
    color: var(--blue);

    font-size: 18px;
}


/* =========================================================
   HERO BUTTON AREA
   ========================================================= */

.hero-buttons {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 10px;
}


/* Main buttons */

.hero-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 150px;

    padding: 6px 28px;

    border-radius: 10px;
    border: none;

    font-family: inherit;
    font-size: 16px;
    font-weight: 600;

    cursor: pointer;

    transition:
        transform .25s ease,
        box-shadow .25s ease,
        background .25s ease;
}


/* Create Account */

.create-btn {
    background: #2563eb;
    color: #fff;

    border: 2px solid rgba(255, 255, 255, .35);

    box-shadow:
        0 5px 18px rgba(37, 99, 235, .25);
}


/* Login / Sign-in */

.login-btn {
    background: #fff;
    color: #2563eb;

    border: 2px solid #2563eb;
}


/* Button hover */

.hero-btn:hover {
    transform: translateY(-2px);

    box-shadow:
        0 8px 20px rgba(0, 0, 0, .15);
}

.hero-btn:active {
    transform: translateY(0);
}


/* =========================================================
   LOGGED-IN PLAYER NAME
   ========================================================= */

.player-name {
    display: inline-flex;
    align-items: center;

    padding: 11px 18px;

    background: rgba(255, 255, 255, .94);

    color: #162033;

    border-radius: 10px;

    font-size: 14px;
    font-weight: 700;

    white-space: nowrap;

    box-shadow:
        0 5px 18px rgba(0, 0, 0, .12);
}


/* =========================================================
   OLD HERO TEXT SUPPORT
   ========================================================= */

.eyebrow {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2px;

    color: rgba(255, 255, 255, .65);

    margin-bottom: 10px;
}

.eyebrow.blue {
    color: var(--blue);
}

.hero h1 {
    font-size: clamp(44px, 7vw, 74px);
    line-height: 1;
    letter-spacing: -3px;

    margin-bottom: 20px;
}

.hero h1 span {
    color: var(--blue2);
}

.hero p {
    max-width: 650px;

    margin: auto;

    font-size: 17px;
    line-height: 1.7;

    color: rgba(255, 255, 255, .7);
}


/* =========================================================
   MAIN
   ========================================================= */

.main {
    max-width: 1180px;

    margin: -48px auto 0;

    position: relative;
    z-index: 3;

    padding: 0 24px 55px;
}


/* =========================================================
   CATEGORY
   ========================================================= */

.category {
    background: rgba(255, 255, 255, .96);

    border: 1px solid var(--line);

    border-radius: 22px;

    padding: 27px 28px;

    margin-bottom: 20px;

    box-shadow:
        0 12px 30px rgba(22, 32, 51, .07);
}

.category-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 21px;
}

.category-heading h2 {
    font-size: 29px;
    letter-spacing: -1px;
}

.count {
    font-size: 12px;
    color: #8791a2;
    font-weight: 700;
}


/* =========================================================
   GAME GRID
   ========================================================= */

.game-grid {
    display: grid;

    grid-template-columns: repeat(2, 1fr);

    gap: 18px;
}

.game-grid.one {
    grid-template-columns: minmax(0, 560px);
}


/* =========================================================
   GAME CARD
   ========================================================= */

.game-card {
    display: block;

    overflow: hidden;

    background: #fff;

    border: 1px solid var(--line);

    border-radius: 16px;

    transition: .22s;
}

.game-card:hover {
    transform: translateY(-5px);

    box-shadow:
        0 15px 30px rgba(22, 32, 51, .11);

    border-color: #cbd5e4;
}


/* =========================================================
   CARD TOP
   ========================================================= */

.card-top {
    display: flex;

    justify-content: space-between;
    align-items: center;

    padding: 16px 18px 8px;
}

.number {
    font-size: 11px;

    color: #9099a9;

    font-weight: 800;

    letter-spacing: 1px;
}

.arrow {
    display: grid;
    place-items: center;

    width: 35px;
    height: 35px;

    border-radius: 50%;

    background: #eff5ff;

    color: var(--blue);

    font-size: 20px;
}

.soon {
    font-size: 9px;

    font-weight: 800;

    letter-spacing: 1px;

    color: #9aa3b1;

    background: #f0f2f5;

    border-radius: 20px;

    padding: 7px 9px;
}


/* =========================================================
   GAME PREVIEW
   ========================================================= */

.preview {
    margin: 9px 18px 17px;

    aspect-ratio: 1;

    display: grid;

    background: #fff;

    border: 2px solid #202c3e;

    border-radius: 8px;

    overflow: hidden;
}

.preview span {
    display: grid;

    place-items: center;

    border-right: 1px solid #d8dee8;
    border-bottom: 1px solid #d8dee8;

    color: #1769d9;

    font-weight: 800;
}


/* Latin Sudoku */

.latin-preview {
    grid-template-columns: repeat(3, 1fr);
}

.latin-preview span:nth-child(3n) {
    border-right: 0;
}

.latin-preview span:nth-child(n + 7) {
    border-bottom: 0;
}


/* Sudoku 6x6 */

.sudoku6-preview {
    grid-template-columns: repeat(6, 1fr);

    font-size: 11px;
}


/* Sudoku 9x9 */

.sudoku9-preview {
    grid-template-columns: repeat(9, 1fr);

    font-size: 8px;
}

.sudoku6-preview span:nth-child(3n) {
    border-right: 2px solid #263346;
}

.sudoku6-preview span:nth-child(n + 13):nth-child(-n + 18) {
    border-bottom: 2px solid #263346;
}

.sudoku9-preview span:nth-child(3n) {
    border-right: 1.5px solid #263346;
}

.sudoku9-preview span:nth-child(n + 19):nth-child(-n + 27) {
    border-bottom: 1.5px solid #263346;
}

.sudoku9-preview span:nth-child(n + 46):nth-child(-n + 54) {
    border-bottom: 1.5px solid #263346;
}


/* =========================================================
   KENKEN PREVIEW
   ========================================================= */

.kenken-preview {
    grid-template-columns: repeat(3, 1fr);
}

.kenken-preview span {
    font-size: 13px;

    color: #172236;

    justify-content: start;
    align-items: start;

    padding: 7px;

    border: 1.5px solid #273244;
}

.kenken6-preview {
    grid-template-columns: repeat(6, 1fr);
}

.kenken6-preview span {
    font-size: 13px;

    color: #172236;

    justify-content: start;
    align-items: start;

    padding: 7px;

    border: 1.5px solid #273244;
}


/* =========================================================
   LARGE SYMBOL
   ========================================================= */

.large-symbol {
    margin: 18px;

    height: 190px;

    border: 2px solid #dfe5ed;

    border-radius: 12px;

    display: grid;

    place-items: center;

    font-size: 54px;

    font-weight: 800;

    color: #d2d8e2;

    background: #fafbfc;
}

.large-symbol.puzzle-symbol {
    color: #1769e0;

    background: #fff;
}


/* =========================================================
   CARD BODY
   ========================================================= */

.card-body {
    padding: 0 18px 19px !important;
}

.tag {
    font-size: 10px;

    letter-spacing: 1.5px;

    color: var(--blue);

    font-weight: 800;
}

.card-body h3 {
    font-size: 23px;

    margin: 7px 0 8px;
}

.card-body p {
    font-size: 13px;

    line-height: 1.6;

    color: var(--muted);
}

.meta {
    display: flex;

    justify-content: space-between;

    gap: 8px;

    flex-wrap: wrap;

    border-top: 1px solid var(--line);

    margin-top: 14px;

    padding-top: 12px;

    color: #7d8797;

    font-size: 11px;

    font-weight: 700;
}


/* =========================================================
   COMING SOON
   ========================================================= */

.coming {
    cursor: default;
}

.coming:hover {
    transform: none;

    box-shadow: none;
}


/* =========================================================
   KAKURO PREVIEW
   ========================================================= */

.kakuro-demo-preview {
    grid-template-columns: repeat(5, 1fr);

    background: #202b3d;
}

.kakuro-demo-preview span {
    background: #fff;

    color: #1769e0;

    font-size: 12px;
}

.kakuro-demo-preview span:nth-child(1),
.kakuro-demo-preview span:nth-child(2),
.kakuro-demo-preview span:nth-child(3),
.kakuro-demo-preview span:nth-child(6),
.kakuro-demo-preview span:nth-child(11),
.kakuro-demo-preview span:nth-child(16),
.kakuro-demo-preview span:nth-child(21) {

    background: #202b3d;

    color: #fff;

    font-size: 10px;

    justify-content: center;
    align-items: center;
}


/* =========================================================
   MAGIC SQUARE PREVIEW
   ========================================================= */

.magic-demo-preview {
    grid-template-columns: repeat(3, 1fr);
}

.magic-demo-preview span {
    font-size: 28px;

    color: #1769e0;
}

.magic-demo-preview .empty {
    color: #9aa5b5;

    background: #f7f9fc;
}



/* =========================================================
   LIGHTS OUT PREVIEW
   ========================================================= */

.lights-out-preview {
    grid-template-columns: repeat(5, 1fr);
    background: #171717;
    border-color: #202c3e;
    padding: 6px;
    gap: 5px;
}

.lights-out-preview span {
    border: 0 !important;
    border-radius: 3px;
    background: #292929;
    min-width: 0;
    min-height: 0;
}

.lights-out-preview span.on {
    background: #ffdf68;
    box-shadow: 0 0 8px rgba(255, 223, 104, .18);
}

/* =========================================================
   FOOTER
   ========================================================= */

footer {
    text-align: center;

    color: #8b94a3;

    font-size: 11px;

    padding: 0 20px 28px;
}


/* =========================================================
   RESPONSIVE - TABLET / MOBILE
   ========================================================= */

@media (max-width: 760px) {

    .hero {
        min-height: 280px;
        padding: 0px;
    }

    .hero-content {
        padding: 15px 10px 25px;
    }

    .hero-content img {
        border-radius: 12px;
    }


    /* Overlay navigation */

    .hero-content .nav {
        top: 15px;

        width: calc(100% - 20px);

        padding: 0 10px;
    }


    .brand {
        font-size: 16px;
    }

    .brand-icon {
        width: 30px;
        height: 30px;

        border-radius: 8px;
    }


    /* Buttons */

    .hero-buttons {
        gap: 6px;
    }

    .hero-btn {
        min-width: auto;

        padding: 9px 12px;

        font-size: 12px;

        border-radius: 8px;
    }


    .player-name {
        padding: 9px 12px;

        font-size: 12px;

        max-width: 130px;

        overflow: hidden;

        text-overflow: ellipsis;
    }


    /* Old hero text */

    .hero h1 {
        letter-spacing: -2px;
    }

    .hero p {
        font-size: 15px;
    }


    /* Main */

    .main {
        margin-top: -42px;

        padding: 0 12px 40px;
    }

    .category {
        padding: 21px 14px;

        border-radius: 17px;
    }

    .category-heading {
        align-items: start;
    }

    .category-heading h2 {
        font-size: 25px;
    }


    /* Game grid */

    .game-grid,
    .game-grid.one {
        grid-template-columns: 1fr;
    }

    .game-grid.one {
        max-width: none;
    }


    .large-symbol {
        height: 150px;
    }


    /* Kakuro */

    .kakuro-demo-preview span {
        font-size: 9px;
    }


    /* Magic Square */

    .magic-demo-preview span {
        font-size: 22px;
    }
}


/* =========================================================
   VERY SMALL MOBILE
   ========================================================= */

@media (max-width: 420px) {

    .hero-content .nav {
        top: 10px;

        width: calc(100% - 16px);

        padding: 0 8px;
    }

    .brand {
        gap: 6px;

        font-size: 14px;
    }

    .brand-icon {
        width: 27px;
        height: 27px;

        font-size: 14px;
    }

    .hero-buttons {
        gap: 4px;
    }

    .hero-btn {
        padding: 8px 9px;

        font-size: 11px;
    }

    .player-name {
        max-width: 100px;

        padding: 8px 9px;

        font-size: 11px;
    }
}