.olp-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.olp-card {
    max-width: 720px;
    width: 100%;
    border-radius: 24px;
    padding: 20px 18px 18px;
    background: radial-gradient(circle at top left, #1e293b 0, #020617 45%);
    color: #e5e7eb;
    box-shadow: 0 22px 45px rgba(15,23,42,0.9);
    box-sizing: border-box;
}

.olp-header h2 {
    margin: 0;
    font-size: 1.7rem;
    letter-spacing: 0.04em;
}

.olp-subtitle {
    margin: 4px 0 12px;
    font-size: 0.9rem;
    color: #9ca3af;
}

.olp-main {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

@media (max-width: 640px) {
    .olp-main {
        flex-direction: column;
        align-items: center;
    }
}

.olp-grid-container {
    flex: 1 1 auto;
    display: flex;
    justify-content: center;
}

.olp-grid {
    display: grid;
    grid-template-columns: repeat(6, 48px);
    grid-template-rows: repeat(6, 48px);
    gap: 6px;
    padding: 16px;
    border-radius: 24px;
    background: radial-gradient(circle at top, #020617 0, #020617 40%, #020617 100%);
    box-shadow:
        inset 0 0 0 1px rgba(15,23,42,0.8),
        0 0 40px rgba(15,23,42,0.85);
}

.olp-cell {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: radial-gradient(circle at 30% 30%, #1f2937, #020617);
    box-shadow:
        inset 0 0 0 1px rgba(15,23,42,0.9),
        0 0 0 rgba(0,0,0,0);
    position: relative;
    cursor: pointer;
    transition: box-shadow 120ms ease, transform 120ms ease, background 120ms ease, opacity 120ms ease;
}

.olp-cell-disabled {
    opacity: 0.18;
    cursor: default;
}

.olp-cell:hover:not(.olp-cell-disabled) {
    transform: translateY(-1px);
    box-shadow:
        inset 0 0 0 1px rgba(148,163,184,0.7),
        0 0 14px rgba(148,163,184,0.6);
}

/* Start, end, lamp */

.olp-start,
.olp-end,
.olp-lamp {
    position: absolute;
    inset: 8px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.olp-start {
    background: radial-gradient(circle at 30% 30%, #6ee7b7, #16a34a);
    box-shadow:
        0 0 18px rgba(45,212,191,0.9),
        0 0 0 2px rgba(5,150,105,0.9);
}

.olp-start::after {
    content: "";
    border-style: solid;
    border-width: 7px 0 7px 11px;
    border-color: transparent transparent transparent #022c22;
    margin-left: 2px;
}

.olp-end {
    background: radial-gradient(circle at 30% 30%, #facc15, #eab308);
    box-shadow:
        0 0 18px rgba(234,179,8,0.9),
        0 0 0 2px rgba(161,98,7,0.9);
}

.olp-end::before {
    content: "★";
    font-size: 1.1rem;
    color: #1f2937;
}

.olp-lamp-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: radial-gradient(circle at 30% 30%, #fde68a, #f97316);
    box-shadow:
        0 0 14px rgba(251,191,36,0.9),
        0 0 0 2px rgba(124,45,18,0.9);
}

/* Cesta */

.olp-path {
    position: absolute;
    inset: 4px;
    border-radius: 16px;
    box-shadow: 0 0 18px rgba(56,189,248,0.95);
    background: radial-gradient(circle at 10% 10%, rgba(125,211,252,0.9), rgba(8,47,73,0.95));
    opacity: 0;
    transition: opacity 120ms ease;
}

.olp-cell-path .olp-path {
    opacity: 1;
}

.olp-cell-current::after {
    content: "";
    position: absolute;
    inset: 14px;
    border-radius: 999px;
    box-shadow: 0 0 14px rgba(56,189,248,0.95);
    background: radial-gradient(circle at 30% 30%, #e0f2fe, #0ea5e9);
}

/* Boční panel */

.olp-side {
    width: 170px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.olp-stats-card {
    border-radius: 18px;
    padding: 10px 12px;
    background: radial-gradient(circle at top left, rgba(15,23,42,0.9), rgba(15,23,42,0.6));
    box-shadow: inset 0 0 0 1px rgba(30,64,175,0.6);
    font-size: 0.85rem;
}

.olp-stats-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}

.olp-stats-row:last-child {
    margin-bottom: 0;
}

.olp-label {
    color: #9ca3af;
}

.olp-value {
    font-weight: 600;
}

/* Tlačítka */

.olp-buttons {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.olp-buttons button {
    width: 100%;
    padding: 8px 10px;
    border-radius: 999px;
    border: 1px solid rgba(148,163,184,0.8);
    background: rgba(15,23,42,0.9);
    color: #e5e7eb;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 120ms ease, color 120ms ease, box-shadow 120ms ease, transform 120ms ease, border-color 120ms ease;
}

#olp-btn-next {
    border-color: rgba(56,189,248,0.9);
    background: radial-gradient(circle at 20% 0%, #38bdf8, #0f172a);
}

.olp-buttons button:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(15,23,42,0.85);
    background: #0f172a;
}

/* Spodní text */

.olp-footer {
    margin-top: 12px;
    font-size: 0.85rem;
}

.olp-status {
    margin: 0;
    color: #9ca3af;
}

.olp-status-success {
    color: #4ade80;
}

.olp-status-error {
    color: #fb7185;
}
