:root {
    --bg-gradient: radial-gradient(circle at top left, #f9f871, #f9844a, #f46b45);
    --card-bg: rgba(255, 255, 255, 0.92);
    --cell-bg: #f1f1f1;
    --cell-border: #d4d4d4;
    --accent: #ff4d6d;
    --accent-dark: #d61c4d;
    --text-primary: #1b1b1f;
    --hit-bg: #22c55e;
    --hit-text: #ffffff;
}

.panel {
    width: 100%;
    background: var(--card-bg);
    border-radius: 5px;
    padding: 2rem;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    animation: floatIn 600ms ease;
    color: var(--text-primary);
}

.panel::after {
    content: "";
    position: absolute;
    inset: 1rem;
    border-radius: 20px;
    border: 1px dashed rgba(0, 0, 0, 0.08);
    pointer-events: none;
}

@keyframes floatIn {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.panel h1 {
    margin: 0 0 0.5rem;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    letter-spacing: 1px;
}

.panel p {
    margin: 0 0 1.5rem;
    max-width: 520px;
    line-height: 1.5;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.panel button {
    background: var(--accent);
    border: none;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    padding: 0.85rem 1.8rem;
    border-radius: 999px;
    cursor: pointer;
    transition: transform 200ms ease, box-shadow 200ms ease, background 200ms ease;
    box-shadow: 0 10px 25px rgba(255, 77, 109, 0.35);
}

.panel button:hover {
    transform: translateY(-2px);
    background: var(--accent-dark);
}

.idrodada {
    background: var(--accent);
    border: none;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    padding: 0.85rem 1.8rem;
    border-radius: 999px;
    cursor: pointer;
    transition: transform 200ms ease, box-shadow 200ms ease, background 200ms ease;
    box-shadow: 0 10px 25px rgba(255, 77, 109, 0.35);
}

.panel select {
    background: var(--accent);
    border: none;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    padding: 0.85rem 1.8rem;
    border-radius: 999px;
    cursor: pointer;
    width: auto;
    margin-right: 1rem;
}

.grid {
    display: grid;
    grid-template-columns: repeat(10, minmax(0, 1fr));
    gap: clamp(0.2rem, 1vw, 0.4rem);
    width: min(700px, 100%);
    margin: 0 auto;
}

.cell {
    background: var(--cell-bg);
    border: 2px solid var(--cell-border);
    border-radius: 12px;
    aspect-ratio: 1 / 1;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(0.9rem, 2.4vw, 1.4rem);
    font-weight: 600;
    cursor: pointer;
    transition: background 200ms ease, transform 150ms ease, color 200ms ease, border-color 200ms ease;
    user-select: none;
}

.cell:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
}

.cell.marked {
    background: var(--hit-bg);
    color: var(--hit-text);
    border-color: var(--hit-bg);
    box-shadow: 0 8px 18px rgba(34, 197, 94, 0.35);
}

@supports not (aspect-ratio: 1 / 1) {
    .cell {
        min-height: clamp(40px, 9vw, 60px);
    }
}

@media (max-width: 640px) {
    .panel {
        padding: 1.5rem;
    }

    .grid {
        gap: 0.25rem;
    }

    .cell {
        min-height: 55px;
        border-radius: 10px;
    }
}
