:root {
    color-scheme: dark;
    font-family: "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --bg: #050816;
    --surface: #0f1629;
    --surface-elevated: #151f36;
    --surface-highlight: #1d2b4d;
    --border: rgba(148, 163, 184, 0.15);
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --primary: #3b82f6;
    --primary-strong: #2563eb;
    --success: #22c55e;
    --danger: #ef4444;
    --shadow: 0 30px 60px rgba(15, 23, 42, 0.35);
    --radius-lg: 18px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --transition: 0.2s ease;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(circle at top, rgba(59, 130, 246, 0.2), transparent 55%),
        radial-gradient(circle at 20% 80%, rgba(168, 85, 247, 0.18), transparent 60%),
        var(--bg);
    color: var(--text);
    padding: 0 0 2.5rem;
    overflow-x: hidden;
}

@media (min-width: 768px) {
    body {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }
}

a {
    color: inherit;
}

.app-shell {
    width: min(1200px, 94vw);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin: 0 auto;
}

.checker-hero {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
    align-items: center;
}

.checker-title {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.checker-title h1 {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.checker-title p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.6;
}

.checker-card {
    background: linear-gradient(145deg, rgba(17, 28, 46, 0.92), rgba(17, 36, 64, 0.92));
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid rgba(148, 163, 184, 0.12);
    padding: 1.5rem;
}

.checker-card h2 {
    margin: 0 0 0.35rem;
    font-size: 1.35rem;
}

.checker-card p {
    margin: 0 0 1rem;
    color: var(--text-muted);
}

.form-grid {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

label {
    font-weight: 600;
    color: var(--text);
}

input[type="text"] {
    width: 100%;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: rgba(9, 13, 24, 0.85);
    color: var(--text);
    font-size: 0.98rem;
    transition: border-color var(--transition), box-shadow var(--transition);
}

input[type="text"]:focus {
    outline: none;
    border-color: rgba(59, 130, 246, 0.55);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.22);
}

.submit-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

button[type="submit"] {
    border: none;
    border-radius: var(--radius-md);
    padding: 0.85rem 1.1rem;
    background: linear-gradient(120deg, var(--primary), var(--primary-strong));
    color: #fff;
    font-weight: 700;
    font-size: 0.98rem;
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.35);
}

button[type="submit"]:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 32px rgba(37, 99, 235, 0.4);
}

.status {
    margin-top: 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    display: none;
}

.status.error { border-color: rgba(239, 68, 68, 0.35); color: #fecaca; background: rgba(127, 29, 29, 0.18); }
.status.success { border-color: rgba(34, 197, 94, 0.35); color: #bbf7d0; background: rgba(22, 101, 52, 0.22); }

.results {
    margin-top: 1.25rem;
    display: none;
    background: rgba(11, 17, 31, 0.75);
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.results h3 { margin: 0 0 0.85rem; }

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 0.75rem;
}

.detail {
    padding: 0.9rem 1rem;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
}

.detail .label { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 0.25rem; display: block; }
.detail .value { font-weight: 700; font-size: 1rem; }

.raw-block {
    margin-top: 0.9rem;
    padding: 0.9rem 1rem;
    border-radius: var(--radius-md);
    background: #0b1120;
    border: 1px solid var(--border);
    font-family: 'SFMono-Regular', ui-monospace, Menlo, Monaco, Consolas, monospace;
    color: var(--text-muted);
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 320px;
    overflow: auto;
}

.tips {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}

.tip-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: var(--radius-md);
    padding: 1rem;
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
}

.tip-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(59, 130, 246, 0.14);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tip-card h4 { margin: 0 0 0.35rem; }
.tip-card p { margin: 0; color: var(--text-muted); line-height: 1.5; }

@media (max-width: 767px) {
    body {
        padding: 0.75rem 1.15rem 2.1rem;
    }

    .app-shell {
        width: 100%;
        gap: 1.1rem;
    }

    .nav-container {
        width: 100%;
        margin: 0 0 1rem;
        padding: 0.65rem 0.9rem;
        gap: 0.65rem;
    }

    .nav-title {
        font-size: 0.88rem;
    }

    .checker-hero {
        grid-template-columns: 1fr;
        gap: 0.9rem;
    }

    .checker-title {
        padding: 0 12px;
    }

    .checker-title h1 {
        font-size: 1.55rem;
    }

    .checker-title p {
        font-size: 0.95rem;
    }

    .tips {
        grid-template-columns: 1fr;
    }

    .tip-card {
        align-items: center;
        padding: 0.9rem;
    }

    .checker-card {
        padding: 1.2rem;
    }

    .form-grid {
        gap: 0.8rem;
    }

    .submit-row {
        flex-direction: column;
        align-items: stretch;
    }

    button[type="submit"] {
        width: 100%;
        justify-content: center;
    }

    .details-grid {
        grid-template-columns: 1fr;
    }
}
