:root {
    --bg: #0f1117;
    --card: #171a23;
    --card2: #1f2430;
    --text: #f4f4f5;
    --muted: #a1a1aa;
    --line: rgba(255, 255, 255, 0.08);
    --accent: #8b5cf6;
    --accent2: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: radial-gradient(circle at top, #24283a 0, var(--bg) 45%);
    color: var(--text);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.app {
    min-height: 100vh;
    padding: 18px;
    padding-bottom: 92px;
}

.header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.eyebrow {
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 4px;
}

h1 {
    margin: 0;
    font-size: 30px;
    letter-spacing: -0.04em;
}

.status-badge {
    padding: 8px 10px;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    font-size: 12px;
    white-space: nowrap;
    border: 1px solid rgba(245, 158, 11, 0.28);
}

.status-badge.ok {
    background: rgba(34, 197, 94, 0.14);
    color: #86efac;
    border-color: rgba(34, 197, 94, 0.28);
}

.status-badge.error {
    background: rgba(239, 68, 68, 0.14);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.28);
}

.hero-card {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.22), rgba(34, 197, 94, 0.10));
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 18px;
    margin-bottom: 14px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

.hero-title {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 8px;
}

.hero-text {
    color: var(--muted);
    line-height: 1.45;
    margin-bottom: 16px;
}

.quick-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.quick-btn {
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    border-radius: 16px;
    padding: 13px 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

.quick-btn:active {
    transform: scale(0.98);
}

.cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 14px;
}

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 14px;
}

.card-label {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 8px;
}

.card-value {
    font-size: 16px;
    font-weight: 800;
    word-break: break-word;
}

.output-section {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 14px;
}

.section-title {
    font-size: 15px;
    font-weight: 800;
    margin-bottom: 10px;
}

pre {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
    color: #d4d4d8;
    font-size: 12px;
    line-height: 1.45;
    max-height: 520px;
    overflow: auto;
    font-family: inherit;
}

.bottom-nav {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    padding: 10px;
    background: rgba(15, 17, 23, 0.85);
    backdrop-filter: blur(16px);
    border: 1px solid var(--line);
    border-radius: 22px;
}

.bottom-nav button {
    border: 0;
    background: var(--card2);
    color: var(--text);
    border-radius: 14px;
    padding: 12px 8px;
    font-weight: 700;
    cursor: pointer;
}

.bottom-nav button:active {
    transform: scale(0.98);
}

.screen-title {
    font-size: 20px;
    font-weight: 900;
    margin-bottom: 12px;
}

.list {
    display: grid;
    gap: 10px;
}

.item-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 13px;
}

.item-title {
    font-size: 15px;
    font-weight: 800;
    margin-bottom: 6px;
}

.item-meta {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
}

.pill {
    display: inline-block;
    margin-top: 8px;
    padding: 5px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    background: rgba(139, 92, 246, 0.16);
    color: #c4b5fd;
    border: 1px solid rgba(139, 92, 246, 0.28);
}

.pill.done {
    background: rgba(34, 197, 94, 0.14);
    color: #86efac;
    border-color: rgba(34, 197, 94, 0.28);
}

.pill.active {
    background: rgba(245, 158, 11, 0.14);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.28);
}

.empty {
    padding: 18px;
    border-radius: 16px;
    border: 1px dashed var(--line);
    color: var(--muted);
    text-align: center;
}

.settings-grid {
    display: grid;
    gap: 8px;
}

.setting-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

.setting-key {
    color: var(--muted);
    font-size: 12px;
}

.setting-value {
    font-size: 13px;
    font-weight: 800;
    text-align: right;
    word-break: break-word;
}

@media (max-width: 420px) {
    .quick-grid {
        grid-template-columns: 1fr 1fr;
    }

    .bottom-nav {
        grid-template-columns: 1fr 1fr 1fr 1fr;
    }

    .bottom-nav button {
        font-size: 12px;
        padding: 10px 5px;
    }
}

.form-grid {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.input {
    width: 100%;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    border-radius: 14px;
    padding: 12px;
    font-size: 14px;
    outline: none;
}

.input:focus {
    border-color: rgba(139, 92, 246, 0.6);
}

.textarea {
    min-height: 82px;
    resize: vertical;
}

.action-btn {
    border: 0;
    background: linear-gradient(135deg, var(--accent), #6d5dfc);
    color: white;
    border-radius: 15px;
    padding: 13px 12px;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
}

.action-btn:active {
    transform: scale(0.98);
}

.item-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.small-btn {
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    border-radius: 12px;
    padding: 8px 10px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.small-btn:active {
    transform: scale(0.98);
}

.small-btn.danger {
    background: rgba(239, 68, 68, 0.12);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.28);
}

.refresh-btn {
    width: 100%;
    border: 1px solid var(--line);
    background: rgba(34, 197, 94, 0.10);
    color: #86efac;
    border-radius: 14px;
    padding: 11px 12px;
    font-size: 14px;
    font-weight: 800;
    margin-bottom: 12px;
    cursor: pointer;
}

.refresh-btn:active {
    transform: scale(0.98);
}
