/* ==========================================================================
   1. ГЛОБАЛЬНЫЕ СТИЛИ И СБРОС (ОБЩЕЕ ДЛЯ INDEX И ERROR)
   ========================================================================== */
html, body {
    height: 100vh;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #0f172a;
    color: #f8fafc;
    overflow: hidden;
}

/* ==========================================================================
   2. СТИЛИ ДЛЯ ГЛАВНОЙ СТРАНИЦЫ (INDEX.HTML)
   ========================================================================== */
body:not(.error-page) {
    font-family: sans-serif;
}

.card {
    text-align: center;
    padding: 40px;
    background: #1e293b;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.3);
    border: 1px solid #334155;
    max-width: 450px;
    width: 100%;
}

h1 {
    color: #38bdf8;
    margin: 0 0 10px 0;
    font-size: 1.8rem;
}

p {
    color: #94a3b8;
    margin-bottom: 25px;
}

.info-block {
    text-align: left;
    background: #0f172a;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #334155;
    font-family: monospace;
    font-size: 0.9rem;
}

.info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

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

.label {
    color: #64748b;
    margin-right: 15px;
}

.value {
    color: #38bdf8;
}

/* ==========================================================================
   3. СТИЛИ ДЛЯ СТРАНИЦЫ ОШИБОК (ERROR.HTML) И CRT-ЭФФЕКТЫ
   ========================================================================== */
.error-body {
    background-image: radial-gradient(#1e293b, #0f172a), url("/assets/images/giphy.gif");
    background-repeat: no-repeat;
    background-size: cover;
    font-family: 'JetBrains Mono', monospace;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.noise {
    pointer-events: none;
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: url("/assets/images/giphy.gif");
    background-repeat: no-repeat;
    background-size: cover;
    z-index: 1;
    opacity: .015;
}

.overlay {
    pointer-events: none;
    position: absolute;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(180deg, rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, 0.15) 50%, rgba(0, 0, 0, 0) 100%);
    background-size: auto 4px;
    z-index: 3;
}

.overlay::before {
    content: "";
    pointer-events: none;
    position: absolute;
    display: block;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(0deg, transparent 0%, rgba(56, 189, 248, 0.05) 2%, rgba(56, 189, 248, 0.2) 3%, rgba(56, 189, 248, 0.05) 3%, transparent 100%);
    background-repeat: no-repeat;
    animation: scan 8s linear 0s infinite;
}

@keyframes scan {
    0% { background-position: 0 -100vh; }
    30%, 100% { background-position: 0 100vh; }
}

.terminal {
    box-sizing: inherit;
    position: relative;
    text-align: center;
    padding: 40px;
    background: #1e293b;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.4);
    border: 1px solid #334155;
    max-width: 600px;
    width: 90%;
    z-index: 2;
}

.terminal h1 {
    text-transform: uppercase;
    margin: 0 0 20px 0;
}

.errorcode {
    color: #f8fafc;
    font-weight: 700;
}

.output {
    color: #94a3b8;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 20px;
    text-align: left;
    background: #0f172a;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #334155;
}

.output::before {
    content: "system@status:~\$ ";
    color: #64748b;
}

.actions {
    display: flex;
    justify-content: space-around;
    margin-top: 25px;
    font-size: 0.9rem;
}

a {
    color: #38bdf8;
    text-decoration: none;
    cursor: pointer;
    font-weight: 700;
    transition: color 0.2s ease;
}

a:hover {
    color: #7dd3fc;
}

a::before {
    content: "[ ";
    color: #64748b;
}

a::after {
    content: " ]";
    color: #64748b;
}

small {
    text-transform: lowercase;
    font-size: 0.85rem;
    color: #38bdf8;
    opacity: 0.8;
}
