@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

* {
    box-sizing: border-box;
}

body {

    margin: 0;

    font-family: "Inter", sans-serif;

    color: white;

    overflow-x: hidden;

    background:
        radial-gradient(circle at top left, #1e293b 0%, #0f172a 40%),
        linear-gradient(to bottom, #020617, #0f172a);

    min-height: 100vh;

    position: relative;
}

/* =========================
   BACKGROUND GLOWS
========================= */

.background-glow {

    position: fixed;

    border-radius: 50%;

    filter: blur(120px);

    opacity: 0.25;

    z-index: -1;
}

.glow-1 {

    width: 350px;
    height: 350px;

    background: #00d4ff;

    top: -100px;
    left: -100px;
}

.glow-2 {

    width: 400px;
    height: 400px;

    background: #7c3aed;

    bottom: -150px;
    right: -120px;
}

/* =========================
   HEADER
========================= */

header {

    text-align: center;

    padding: 40px 20px 20px;
}

header h1 {

    margin: 0;

    font-size: 3rem;

    font-weight: 700;

    letter-spacing: 2px;

    background:
        linear-gradient(
            90deg,
            #ffffff,
            #7dd3fc
        );

    -webkit-background-clip: text;

    -webkit-text-fill-color: transparent;
}

header p {

    margin-top: 10px;

    opacity: 0.75;

    font-size: 1rem;
}

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

.main-layout {

    display: flex;

    justify-content: center;

    align-items: flex-start;

    gap: 30px;

    padding: 20px;

    flex-wrap: wrap;
}

/* =========================
   GRID WRAPPER
========================= */

.grid-wrapper {

    width: 100%;

    max-width: 760px;

    overflow-x: auto;

    padding-bottom: 10px;

    scrollbar-width: thin;
}

.grid-wrapper::-webkit-scrollbar {
    height: 8px;
}

.grid-wrapper::-webkit-scrollbar-thumb {

    background: rgba(255,255,255,0.2);

    border-radius: 999px;
}

/* =========================
   GRID CONTAINER
========================= */

.grid-container {

    min-width: 730px;

    background:
        linear-gradient(
            145deg,
            rgba(255,255,255,0.08),
            rgba(255,255,255,0.03)
        );

    border: 1px solid rgba(255,255,255,0.08);

    backdrop-filter: blur(18px);

    border-radius: 30px;

    padding: 28px;

    position: relative;

    overflow: hidden;

    box-shadow:
        0 15px 50px rgba(0,0,0,0.45),
        inset 0 0 0 1px rgba(255,255,255,0.03);
}

.grid-container::before {

    content: "";

    position: absolute;

    inset: 0;

    background:
        linear-gradient(
            135deg,
            rgba(0,212,255,0.08),
            transparent 40%,
            rgba(124,58,237,0.08)
        );

    pointer-events: none;
}

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

.grid {

    display: grid;

    grid-template-columns: repeat(10, 60px);

    gap: 10px;

    position: relative;

    z-index: 2;
}

/* =========================
   CELLS
========================= */

.cell {

    width: 60px;
    height: 60px;

    display: flex;

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

    position: relative;

    border-radius: 16px;

    background:
        linear-gradient(
            145deg,
            rgba(255,255,255,0.10),
            rgba(255,255,255,0.04)
        );

    border: 1px solid rgba(255,255,255,0.08);

    font-weight: 600;

    transition: 0.25s ease;

    overflow: hidden;

    backdrop-filter: blur(10px);
}

.cell::before {

    content: "";

    position: absolute;

    inset: 0;

    background:
        radial-gradient(
            circle at top,
            rgba(255,255,255,0.12),
            transparent 70%
        );

    opacity: 0;

    transition: 0.25s ease;
}

.cell:hover {

    transform:
        translateY(-3px)
        scale(1.03);

    border-color:
        rgba(0,212,255,0.4);

    box-shadow:
        0 0 25px rgba(0,212,255,0.18);
}

.cell:hover::before {
    opacity: 1;
}

/* =========================
   ELIMINATED
========================= */

.cell.eliminated {

    background:
        linear-gradient(
            145deg,
            rgba(255,60,60,0.16),
            rgba(255,0,0,0.06)
        );

    border-color:
        rgba(255,80,80,0.45);

    color:
        rgba(255,255,255,0.32);
}

.cell.eliminated::after {

    content: "✕";

    position: absolute;

    font-size: 2rem;

    color:
        rgba(255,80,80,0.85);

    font-weight: bold;
}

/* =========================
   PANEL
========================= */

.panel {

    width: 340px;

    background:
        linear-gradient(
            145deg,
            rgba(255,255,255,0.08),
            rgba(255,255,255,0.03)
        );

    border: 1px solid rgba(255,255,255,0.08);

    backdrop-filter: blur(18px);

    border-radius: 28px;

    padding: 24px;

    box-shadow:
        0 15px 50px rgba(0,0,0,0.4);
}

.panel h2 {

    margin-top: 0;

    margin-bottom: 18px;

    font-size: 1.2rem;

    font-weight: 600;
}

/* =========================
   INPUTS
========================= */

.input-group {

    display: flex;

    gap: 10px;

    margin-bottom: 18px;
}

input {

    flex: 1;

    background:
        rgba(255,255,255,0.06);

    border:
        1px solid rgba(255,255,255,0.08);

    color: white;

    padding: 14px;

    border-radius: 14px;

    outline: none;

    font-size: 14px;

    transition: 0.2s ease;
}

input:focus {

    border-color:
        rgba(0,212,255,0.4);

    box-shadow:
        0 0 20px rgba(0,212,255,0.12);
}

button {

    border: none;

    border-radius: 14px;

    padding: 14px 18px;

    font-weight: 600;

    color: white;

    cursor: pointer;

    background:
        linear-gradient(
            135deg,
            #06b6d4,
            #7c3aed
        );

    transition: 0.2s ease;
}

button:hover {

    transform:
        translateY(-2px);

    box-shadow:
        0 0 20px rgba(124,58,237,0.25);
}

button:disabled {

    opacity: 0.45;

    cursor: not-allowed;

    transform: none;
}

/* =========================
   STATUS
========================= */

.status,
.guess-status,
.cooldown-timer {

    font-size: 14px;

    margin-bottom: 16px;

    min-height: 20px;
}

/* =========================
   USED CODES
========================= */

.used-codes {

    display: flex;

    flex-wrap: wrap;

    gap: 10px;

    margin-bottom: 30px;
}

.code-pill {

    background:
        linear-gradient(
            135deg,
            rgba(6,182,212,0.2),
            rgba(124,58,237,0.2)
        );

    border:
        1px solid rgba(255,255,255,0.08);

    padding: 8px 14px;

    border-radius: 999px;

    font-size: 13px;

    backdrop-filter: blur(10px);
}

/* =========================
   GUESS SECTION
========================= */

.guess-section {

    border-top:
        1px solid rgba(255,255,255,0.08);

    padding-top: 20px;
}

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

footer {

    text-align: center;

    padding: 25px;

    opacity: 0.5;

    font-size: 0.9rem;
}

/* =========================
   MOBILE
========================= */

@media (max-width: 900px) {

    .main-layout {

        flex-direction: column;

        align-items: center;
    }

    .panel {

        width: 100%;

        max-width: 760px;
    }
}

@media (max-width: 768px) {

    header h1 {
        font-size: 2.2rem;
    }

    .grid-container {

        padding: 20px;
    }
}
