:root {
    --bg: #0a0a0c;
    --panel: #141419;
    --panel-2: #1b1c23;
    --border: #2e313d;
    --text: #f2f4f8;
    --muted: #a6aab8;
    --accent: #7c93ff;
    --accent-2: #4be3c2;
    --danger: #ff7272;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: Inter, Arial, sans-serif;
    background: linear-gradient(180deg, #09090b 0%, #0f1118 100%);
    color: var(--text);
}

a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
    width: min(1180px, calc(100% - 32px));
    margin: 24px auto 48px;
}

.hero, .panel {
    background: rgba(20,20,25,0.96);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.28);
}

.hero { padding: 24px; margin-bottom: 18px; }
.panel { padding: 18px; }
.grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 18px;
}
.col-4 { grid-column: span 4; }
.col-6 { grid-column: span 6; }
.col-8 { grid-column: span 8; }
.col-12 { grid-column: span 12; }

@media (max-width: 900px) {
    .col-4, .col-6, .col-8, .col-12 { grid-column: span 12; }
}

h1, h2, h3 { margin-top: 0; }
.subtitle, .muted { color: var(--muted); }
.badge {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    background: #181a22;
    border: 1px solid var(--border);
    color: var(--muted);
    font-size: 12px;
    margin-right: 8px;
}

form.inline, .row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

input[type="text"], textarea {
    width: 100%;
    background: var(--panel-2);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 12px;
    padding: 12px 14px;
}

button {
    appearance: none;
    border: 0;
    border-radius: 12px;
    padding: 12px 16px;
    background: linear-gradient(135deg, var(--accent), #a580ff);
    color: white;
    font-weight: 700;
    cursor: pointer;
}
button.secondary {
    background: #1f2330;
    border: 1px solid var(--border);
}

table {
    width: 100%;
    border-collapse: collapse;
}
th, td {
    text-align: left;
    padding: 10px 8px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

code, pre {
    font-family: Consolas, Monaco, monospace;
    font-size: 13px;
}
pre {
    background: #10131a;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

.action-card {
    background: #151822;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 12px;
}
.action-card h3 { margin-bottom: 8px; }
.open { color: var(--accent-2); }
.wall { color: var(--danger); }
.notice {
    padding: 12px 14px;
    border-radius: 12px;
    background: #171d2a;
    border: 1px solid var(--border);
    margin-bottom: 12px;
}

.maze-wrap {
    overflow: auto;
    padding: 6px;
    background: #0f1218;
    border: 1px solid var(--border);
    border-radius: 14px;
}

.maze-grid {
    display: grid;
    gap: 0;
    align-items: stretch;
}

.maze-cell {
    min-width: 22px;
    min-height: 22px;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #151922;
    border-style: solid;
    border-color: #697086;
    font-size: 15px;
    line-height: 1;
}

.answer-row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.answer-value {
    color: var(--muted);
}

.is-hidden {
    display: none;
}

.tiny-btn {
    padding: 8px 12px;
    font-size: 12px;
}


.maze-text {
    font-family: 'Courier New', Consolas, monospace;
    line-height: 1;
    white-space: pre;
    overflow-x: auto;
    margin: 0;
    letter-spacing: 0;
    word-break: normal;
}

.maze-live {
    font-size: 18px;
}

.maze-kind-wall {
    color: #7fb0ff;
}

.maze-kind-space {
    color: transparent;
}

.maze-kind-player,
.maze-kind-goal {
    color: var(--text);
}


:root {
    --maze-tile-size: 32px;
    --maze-wall-thickness: 4px;
}

.maze-tile-wrap {
    overflow: auto;
    padding: 10px;
}

.maze-tile-grid {
    display: grid;
    gap: 0;
    width: max-content;
    background: #11151f;
}

.maze-tile {
    position: relative;
    width: var(--maze-tile-size);
    height: var(--maze-tile-size);
    min-width: var(--maze-tile-size);
    min-height: var(--maze-tile-size);
    background: #151922;
    overflow: hidden;
}

.maze-wall {
    position: absolute;
    display: block;
    background: #86b7ff;
    z-index: 1;
}

.maze-wall-top {
    top: 0;
    left: 0;
    width: 100%;
    height: var(--maze-wall-thickness);
}

.maze-wall-right {
    top: 0;
    right: 0;
    width: var(--maze-wall-thickness);
    height: 100%;
}

.maze-wall-bottom {
    bottom: 0;
    left: 0;
    width: 100%;
    height: var(--maze-wall-thickness);
}

.maze-wall-left {
    top: 0;
    left: 0;
    width: var(--maze-wall-thickness);
    height: 100%;
}

.maze-tile-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    line-height: 1;
    z-index: 2;
    transform: scale(1.05);
}

.maze-tile-kind-bot .maze-tile-icon {
    filter: saturate(1.15);
}

.maze-tile-kind-goal .maze-tile-icon {
    filter: brightness(1.08);
}


.run-shortcut {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.inspector-controls {
    margin-top: 12px;
}

.toggle-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
}

.toggle-label input[type="checkbox"] {
    transform: translateY(1px);
}

.toggle-label input[type="number"] {
    width: 64px;
    background: var(--panel-2);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 10px;
    padding: 8px 10px;
}


/* MoltMaze v9 inspector enhancements */
.notice.success {
    border-color: #305546;
    background: #15261f;
}
.notice.error {
    border-color: #5a2d35;
    background: #231417;
}
.status-pill {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: #171b25;
}
.inspector-layout-tight .panel h2 {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.small-muted {
    color: var(--muted);
    font-size: 12px;
}
