:root {
    --bg: #0f1724;
    --card: rgba(255, 255, 255, 0.04);
    --glass: rgba(255, 255, 255, 0.06);
    --accent: linear-gradient(135deg, #8b5cf6, #ec4899);
    --radius: 18px;
    --soft: 12px;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

* {
    box-sizing: border-box
}

html,
body {
    height: 100%;
    margin: 0;
    background: radial-gradient(1200px 600px at 10% 10%, rgba(139, 92, 246, 0.12), transparent), radial-gradient(900px 400px at 90% 90%, rgba(236, 72, 153, 0.08), transparent), var(--bg);
    color: #e6eef8
}

.app {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px
}

.container {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
}
/* Card / shell */
.card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.02));
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: 0 6px 30px rgba(2, 6, 23, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(8px) saturate(120%);
    border: 1px solid rgba(255, 255, 255, 0.04);
}

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px
}

.logo {
    width: 48px;
    height: 48px;
    border: 0px;
    background: var(--glass);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: transparent;
    background-clip: text;
    background-image: var(--accent);
    font-size: 18px;
    cursor: pointer;
}

h1 {
    font-size: 18px;
    margin: 0
}

p.lead {
    margin: 0;
    color: rgba(230, 238, 248, 0.7);
    font-size: 13px
}

/* Menu principal */
.menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 12px 0;
}


.btn {
    padding: 10px 14px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
    color: inherit;
    cursor: pointer;
    font-weight: 600;
    flex: 1
}

.btn.primary {
    background: var(--accent);
    color: white;
    box-shadow: 0 6px 18px rgba(139, 92, 246, 0.16)
}

.btn.ghost {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.04)
}

/* Game area */
.gameArea {
    margin-top: 12px
}

.targets {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between
}

.swatch {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 6px 18px rgba(2, 6, 23, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700
}

.label {
    font-size: 12px;
    color: rgba(230, 238, 248, 0.7);
}

.barWrap {
    margin-top: 16px
}

.bar {
    height: 36px;
    position: relative;
    border-radius: 0;
    overflow: visible;
    border: none;
    width: 100%;
}

.barCanvas {
    width: 100%;
    height: 36px;
    display: block;
}

.marker {
    position: absolute;
    top: -6px;
    width: 12px;
    height: 48px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.95);
    transform: translateX(0);
    box-shadow: 0 6px 20px rgba(2, 6, 23, 0.6);
    transition: left .06s linear
}

.controls {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 12px
}

.bigBtn {
    flex: 1;
    padding: 12px 16px;
    border-radius: 12px;
    border: none;
    font-weight: 700;
    background: linear-gradient(180deg, #222633, #151821);
    color: #fff;
    cursor: pointer
}

.small {
    padding: 8px 10px;
    font-size: 13px
}

.meta {
    display: flex;
    justify-content: space-between;
    margin-top: 12px
}

.meta div {
    font-size: 13px;
    color: rgba(230, 238, 248, 0.8)
}

/* modal */
.modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(3, 6, 12, 0.5);
    backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s
}

.modal.open {
    opacity: 1;
    pointer-events: auto
}

.modal[aria-hidden="true"] {
  display: none !important;
}

.statLine {
    display: flex;
    justify-content: center;
    gap: 6px;
    align-items: center;
    text-align: center;
    width: 100%;
}


.sheet {
    width: 92%;
    max-width: 420px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
    border-radius: 18px;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.04)
}

.resultScore {
    font-size: 28px;
    margin: 6px 0;
    font-weight: 800
}

.muted {
    color: rgba(230, 238, 248, 0.7)
}

footer {
    margin-top: 14px;
    text-align: center;
    font-size: 12px;
    color: rgba(230, 238, 248, 0.6);
}

.hidden {
    display: none;
}

/* Responsive tweaks */
@media (max-width: 420px) {
    .container {
        padding: 4px;
        max-width: 100%; /* que ocupe todo el ancho del móvil */
    }

    .logo {
        width: 44px;
        height: 44px;
        cursor: pointer;
    }

    h1 {
        font-size: 16px; /* un poco más pequeño */
    }

    .swatch {
        width: 40px;
        height: 40px;
    }

    .bar {
        height: 28px;
    }

    .barCanvas {
        height: 28px;
    }

    .marker {
        width: 10px;
        height: 40px;
        top: -5px;
        border-radius: 5px;
    }

    .btn {
        padding: 8px 12px;
        font-size: 14px;
    }

    .bigBtn {
        padding: 10px 12px;
        font-size: 15px;
    }

    .meta {
        flex-direction: column;
        gap: 8px;
        align-items: center;
    }

    .meta div {
        font-size: 12px;
        text-align: center;
        width: 100%;
    }

    body, html, .app {
        padding-bottom: 60px;
    }

    footer {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: var(--bg);
        padding: 8px 0;
        font-size: 12px;
        color: rgba(230, 238, 248, 0.6);
        box-shadow: 0 -1px 6px rgba(0, 0, 0, 0.5);
        z-index: 1000;
    }
}