@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600;700&display=swap");

/* ===== ПЕРЕМЕННЫЕ ===== */
:root {
    --primary: #C8102E;
    --primary-hover: #a00d24;
    --bg: #f1f1f1;
    --surface: #ffffff;
    --text: #111111;
    --text-muted: #666666;
    --border: #e0e0e0;
    --success: #1a7a3a;
    --success-bg: #e6f4ea;
    --success-border: #a8d5b5;
    --error: #C8102E;
    --error-bg: #fce8e6;
    --error-border: #f5c6c2;
    --warning: #f29900;
    --radius: 6px;
    --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.05);
}

/* ===== СБРОС ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "IBM Plex Mono", "Courier New", monospace;
    background: var(--bg);
    min-height: 100vh;
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
}

/* ===== ШАПКА С ЛОГОТИПОМ ===== */
.site-header {
    background: var(--surface);
    border-bottom: 2px solid var(--primary);
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    position: relative;
    text-align: center;
}

.site-header .logo-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.site-header .logo {
    height: 28px;
    display: block;
}

.site-header .header-tagline {
    font-size: 10px;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* Слот для кнопок справа в шапке (каталог) */
.site-header .header-actions {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 8px;
    align-items: center;
}

@media (max-width: 600px) {
    .site-header {
        padding: 10px 16px;
        justify-content: center;
    }

    .site-header .header-actions {
        display: none;
    }
}

/* ===== ЦЕНТРИРОВАННЫЕ СТРАНИЦЫ (unlock, mycode) ===== */
.page-center {
    min-height: calc(100vh - 62px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}

.container {
    width: 100%;
    max-width: 440px;
}

.card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 36px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
}

/* ===== ЗАГОЛОВКИ ===== */
h1 {
    font-size: 20px;
    color: var(--text);
    margin-bottom: 6px;
    font-weight: 700;
    font-family: "IBM Plex Mono", monospace;
    letter-spacing: -0.02em;
}

.subtitle {
    color: var(--text-muted);
    margin-bottom: 24px;
    font-size: 13px;
}

/* ===== ФОРМЫ ===== */
.form-group {
    margin-bottom: 16px;
}

label {
    display: block;
    margin-bottom: 5px;
    color: var(--text);
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    transition: border-color 0.15s, box-shadow 0.15s;
    outline: none;
    color: var(--text);
    background: var(--surface);
    font-family: "IBM Plex Mono", monospace;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.12);
}

.code-input {
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 10px;
    font-family: "IBM Plex Mono", monospace;
    padding: 14px;
}

/* ===== КНОПКИ ===== */
.btn {
    width: 100%;
    padding: 12px 18px;
    border: none;
    border-radius: var(--radius);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, box-shadow 0.15s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    line-height: 1.5;
    font-family: "IBM Plex Mono", monospace;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
    box-shadow: 0 2px 8px rgba(200, 16, 46, 0.3);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    background: transparent;
    color: var(--primary);
    border: 1.5px solid var(--primary);
    margin-top: 10px;
}

.btn-secondary:hover:not(:disabled) {
    background: var(--error-bg);
}

.btn-large {
    padding: 14px 18px;
    font-size: 13px;
    margin-top: 4px;
}

/* ===== РЕЗУЛЬТАТЫ ===== */
.result {
    margin-top: 18px;
    padding: 14px 16px;
    border-radius: var(--radius);
    text-align: center;
    border: 1px solid;
}

.result.hidden {
    display: none;
}

.result.success {
    background: var(--success-bg);
    border-color: var(--success-border);
    color: #1e4d2b;
}

.result.error {
    background: var(--error-bg);
    border-color: var(--error-border);
    color: var(--primary);
}

.result h2 {
    font-size: 16px;
    margin-bottom: 8px;
    font-weight: 700;
}

/* ===== КОД ДОСТУПА ===== */
.access-code {
    font-size: 36px;
    font-weight: 700;
    letter-spacing: 8px;
    margin: 14px 0;
    font-family: "IBM Plex Mono", monospace;
    background: var(--text);
    color: white;
    padding: 16px;
    border-radius: var(--radius);
    user-select: all;
    border: none;
    text-align: center;
    cursor: pointer;
}

.access-code:hover {
    background: #222;
}

.lock-icon {
    font-size: 40px;
    margin: 14px 0;
    display: block;
}

/* ===== ССЫЛКИ В ПОДВАЛЕ ===== */
.footer-links {
    margin-top: 22px;
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
}

.footer-links a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.footer-links a:hover {
    text-decoration: underline;
}

.footer-links .sep {
    margin: 0 8px;
    color: var(--border);
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 600px) {
    .card {
        padding: 24px 18px;
    }

    h1 {
        font-size: 18px;
    }

    .code-input {
        font-size: 22px;
        letter-spacing: 6px;
    }

    .access-code {
        font-size: 28px;
        letter-spacing: 5px;
    }
}
