:root {
    --bg-color: #0a0a0a;       /* neutral-950 */
    --text-main: #d4d4d4;      /* neutral-300 */
    --text-muted: #737373;     /* neutral-500 */
    --text-bright: #f5f5f5;    /* neutral-100 */
    --border-color: #262626;   /* neutral-800 */

    --input-bg: #171717;       /* neutral-900 */
    --input-border: #404040;   /* neutral-700 */

    --btn-bg: #f5f5f5;         /* neutral-100 */
    --btn-text: #0a0a0a;       /* neutral-950 */

    --red-color: #ef4444;      /* red-500 */
    --red-bg-subtle: rgba(69, 10, 10, 0.2);
    --red-border: rgba(127, 29, 29, 0.3);

    --green-color: #22c55e;    /* green-500 */
    --green-bg-subtle: rgba(5, 46, 22, 0.2);
    --green-border: rgba(20, 83, 45, 0.3);

    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-mono), sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 1rem;
    line-height: 1.5;
}

::selection {
    background-color: #404040;
    color: white;
}

.container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.header, .footer {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.column { flex-direction: column; }

h1 {
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-bright);
    margin-bottom: 0.5rem;
}

h2 {
    font-size: 1.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.25rem;
    line-height: 1.2;
}

h3 {
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
}

h1.error-code {
    font-size: 4rem;
    line-height: 4rem;
}

.error-code {
    color: var(--red-color);
}

.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.5rem; }
.uppercase { text-transform: uppercase; }
.font-bold { font-weight: 700; }
.text-muted { color: var(--text-muted); }
.text-bright { color: var(--text-bright); }
.break-all { word-break: break-all; }

.header {
    margin-bottom: 3rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-bright);
    letter-spacing: -0.05em;
    text-decoration: none;
}

.version-link {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    text-decoration: none;
}

.footer, .footer a {
    color: #525252;
}

.footer {
    margin-top: 3rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.search-container {
    margin-bottom: 2rem;
}

.search-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    position: relative;
    width: 100%;
}

.search-icon-wrapper {
    display: flex;
    justify-content: center;
    position: absolute;
    left: 1rem;
    top: 2rem;
    transform: translateY(-50%);
    color: var(--text-muted);
    transition: color 0.2s;
    pointer-events: none;
}

.search-input {
    width: 100%;
    background-color: var(--input-bg);
    border: 1px solid var(--input-border);
    color: white;
    padding: 1rem 1rem 1rem 3rem;
    height: 4rem;
    font-size: 1.125rem;
    font-family: inherit;
    outline: none;
    transition: all 0.2s;
}

.search-input:focus {
    border-color: #a3a3a3;
    background-color: #262626;
}

.search-input:focus + .search-icon-wrapper {
    color: white;
}

.search-btn {
    width: 100%;
    height: 4rem;
    padding: 0 1.5rem;
    background-color: var(--btn-bg);
    color: var(--btn-text);
    border: none;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.875rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: inherit;
    transition: background 0.2s;
}

.search-btn:hover {
    background-color: white;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 2rem;
    color: var(--text-muted);
    font-size: 0.75rem;
}

.stat-card {
    border: 1px solid var(--border-color);
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stat-card-header {
    display: flex;
    gap: 0.5rem;
}

.result-panel {
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    margin-top: 1rem;
}

.blocked-theme {
    border-color: var(--red-border);
    background-color: rgba(69, 10, 10, 0.1);
}
.blocked-theme h2, .blocked-theme .status-icon, .blocked-theme .subheading { color: var(--red-color); }
.blocked-theme .reason-header { border-bottom: 1px solid var(--red-border); color: #f87171; }
.blocked-theme .alert-box {
    border: 1px solid var(--red-border);
    background: var(--red-bg-subtle);
    color: #f87171;
}

.clean-theme {
    border-color: var(--green-border);
    background-color: rgba(5, 46, 22, 0.1); /* Очень прозрачный зеленый */
}
.clean-theme h2, .clean-theme .status-icon, .clean-theme .subheading { color: var(--green-color); }
.clean-theme .reason-header { border-bottom: 1px solid var(--green-border); color: var(--green-color); }
.clean-theme .alert-box {
    border: 1px solid var(--green-border);
    background: var(--green-bg-subtle);
    color: #4ade80;
}

.result-header {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.icon-box {
    padding: 0.75rem;
    border: 1px solid currentColor;
    background-color: rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
}

.target-info {
    background-color: rgba(23, 23, 23, 0.5);
    padding: 1rem;
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.target-info-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.target-value {
    font-size: 1.25rem;
    color: white;
}

/* Сетка деталей */
.details-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.detail-section h3 {
    border-bottom: 1px solid var(--border-color);
    color: white;
    margin-bottom: 0;
}

.detail-row {
    display: flex;
    flex-direction: column;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
    gap: 0.25rem;
}
.detail-row:last-child { border-bottom: none; }

.row-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.row-value {
    font-size: 0.875rem;
    font-weight: 500;
    color: #e5e5e5;
    text-align: right;
}
.row-value.alert { color: var(--red-color); }

.alert-box {
    padding: 1rem;
    font-size: 0.75rem;
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
}

.reset-btn {
    text-decoration: none;
    margin-top: 2rem;
    width: 100%;
    padding: 0.75rem 1.5rem;
    border: 1px solid #404040;
    background: transparent;
    color: #a3a3a3;
    text-transform: uppercase;
    font-weight: bold;
    font-size: 0.875rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: inherit;
    transition: all 0.2s;
}
.reset-btn:hover {
    border-color: white;
    color: white;
}

.page-container ul {
    list-style-position: inside;
}

.page-container h1 {
    font-size: 48px;
    margin: 1rem 0;
}

.page-container h2 {
    font-size: 32px;
    margin: 2.5rem 0 1rem;
}

.page-container h2 a {
    text-decoration: none;
}

.page-container a {
    color: var(--text-bright);
}

.page-container h2 a:hover {
    text-decoration: underline;
}

.page-container p {
    text-align: justify;
    margin: 1rem 0;
}

.page-container img.fullwidth {
    width: 100%;
}

.page-container img {
    margin: auto;
    display: block;
}

.page-container i.caption {
    display: block;
    text-align: center;
}


@media (min-width: 640px) {
    body { padding: 2rem; }

    h1.error-code {
        font-size: 6rem;
        line-height: 6rem;
    }

    .search-form {
        flex-direction: row;
        gap: 0;
    }

    .search-input {
        flex-grow: 1;
        padding-right: 1.5rem;
    }

    .search-btn {
        width: auto;
        margin-left: -1px;
        height: 4rem;
        justify-content: space-between;
        padding: 0 1.5rem;
    }

    .stats-grid { grid-template-columns: repeat(3, 1fr); }
    .details-grid { grid-template-columns: 1fr 1fr; }
    .detail-row {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    .reset-btn { width: auto; }
}
