﻿/* ========================
   RESET & BASE
   ======================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #0a0a0a;
    color: #f0f0f0;
    line-height: 1.6;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

ul { list-style: none; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================
   LOGO
   ======================== */
.logo { font-size: 1.8rem; font-weight: 800; display: flex; gap: 1px; }
.logo-s { color: #e63946; }
.logo-n { color: #ff6b35; }
.logo-k { color: #f4a261; }

/* ========================
   AUTH PAGE (Login)
   ======================== */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
}

.auth-wrapper {
    width: 100%;
    max-width: 520px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    justify-content: space-between;
}

.auth-top {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-header {
    text-align: center;
    margin-bottom: 24px;
}

.auth-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    background: #1e1e1e;
    border-radius: 8px;
    padding: 4px;
}

.auth-tab {
    flex: 1;
    text-align: center;
    padding: 10px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #888;
    transition: background 0.2s, color 0.2s;
}

.auth-tab:hover {
    color: #fff;
}

.auth-tab.active {
    background: linear-gradient(135deg, #e63946, #ff6b35);
    color: #fff;
}

.profile-block {
    text-align: center;
}

.profile-avatar {
    width: 64px;
    height: 64px;
    margin: 0 auto 12px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e63946, #ff6b35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 800;
    color: #fff;
}

.profile-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
}

.profile-login {
    font-size: 0.85rem;
    color: #f4a261;
    margin-bottom: 16px;
}

.profile-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    margin-top: 8px;
}

.profile-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #1e1e1e;
    font-size: 0.85rem;
}

.profile-table tr:last-child td {
    border-bottom: none;
}

.profile-table td:first-child {
    color: #888;
    width: 45%;
}

.auth-logo {
    display: flex;
    justify-content: center;
    gap: 2px;
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.auth-mission {
    color: #888;
    font-size: 0.9rem;
    font-style: italic;
}

.auth-reason {
    text-align: center;
    color: #aaa;
    font-size: 0.9rem;
    margin-bottom: 32px;
    padding: 0 10px;
}

.auth-card {
    background: #141414;
    border: 1px solid #2a2a2a;
    border-radius: 16px;
    padding: 36px 32px;
}

.auth-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 28px;
    color: #fff;
    text-align: center;
    letter-spacing: 1px;
}

.auth-form {
    margin-bottom: 20px;
}

.form-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.form-row label {
    flex-shrink: 0;
    width: 90px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #ccc;
    text-align: right;
}

.form-row input {
    flex: 1;
    padding: 10px 14px;
    background: #1e1e1e;
    border: 1px solid #333;
    border-radius: 6px;
    color: #fff;
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.form-row input:focus {
    border-color: #e63946;
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.15);
}

.form-row input.input-error {
    border-color: #e63946;
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.2);
}

.form-checkbox-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
    padding-left: 106px;
}

.form-checkbox-row input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #e63946;
    cursor: pointer;
}

.form-checkbox-row label {
    font-size: 0.85rem;
    color: #aaa;
    cursor: pointer;
}

.form-error {
    display: block;
    color: #e63946;
    font-size: 0.8rem;
    margin-top: 4px;
    text-align: center;
    min-height: 0;
}

.auth-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.auth-link-main {
    padding: 10px 24px;
    background: linear-gradient(135deg, #e63946, #ff6b35);
    border-radius: 8px;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}

.auth-link-main:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(230, 57, 70, 0.4);
    color: #fff;
}

.auth-link-sub {
    font-size: 0.85rem;
    color: #e63946;
    font-weight: 500;
}

.auth-link-sub:hover {
    color: #ff6b35;
}

/* ========================
   AUTH FOOTER (sticky bottom)
   ======================== */
.auth-footer {
    padding: 20px 0;
    text-align: center;
}

.auth-footer-inner {
    border-top: 1px solid #2a2a2a;
    padding-top: 20px;
}

.auth-footer-inner p {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 4px;
}

.auth-footer-inner strong {
    color: #888;
}

/* ========================
   HEADER (main site)
   ======================== */
.header {
    background: #111;
    border-bottom: 1px solid #1e1e1e;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.nav {
    display: flex;
    gap: 4px;
}

.nav-link {
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #aaa;
    transition: background 0.2s, color 0.2s;
}

.nav-link:hover {
    background: #1e1e1e;
    color: #fff;
}

.nav-link.active {
    background: linear-gradient(135deg, #e63946, #ff6b35);
    color: #fff;
}

.nav-login {
    border: 1px solid #e63946;
    color: #e63946;
}

.nav-login:hover {
    background: #e63946;
    color: #fff;
}

.nav-user {
    padding: 8px 14px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #f4a261;
}

.form-alert {
    background: rgba(230, 57, 70, 0.1);
    border: 1px solid #e63946;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    text-align: center;
}

.form-alert p {
    color: #e63946;
    font-size: 0.85rem;
    margin: 4px 0;
}

.burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 110;
}

.burger span {
    display: block;
    width: 24px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

.burger-active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.burger-active span:nth-child(2) {
    opacity: 0;
}

.burger-active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ========================
   MAIN LAYOUT
   ======================== */
.main-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 32px;
    padding-top: 32px;
    padding-bottom: 60px;
}

/* ========================
   HERO CARD
   ======================== */
.hero-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: #141414;
    border: 1px solid #1e1e1e;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 32px;
    transition: border-color 0.3s;
}

.hero-card:hover {
    border-color: #e63946;
}

.hero-image {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 280px;
}

.hero-placeholder {
    font-size: 5rem;
    opacity: 0.6;
}

.hero-content {
    padding: 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-content h1 {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 12px 0;
    color: #fff;
}

.hero-desc {
    color: #aaa;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 16px;
}

/* ========================
   BADGES
   ======================== */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-football { background: rgba(76, 175, 80, 0.2); color: #4caf50; }
.badge-hockey { background: rgba(33, 150, 243, 0.2); color: #2196f3; }
.badge-basketball { background: rgba(255, 152, 0, 0.2); color: #ff9800; }
.badge-tennis { background: rgba(156, 39, 176, 0.2); color: #ba68c8; }
.badge-f1 { background: rgba(230, 57, 70, 0.2); color: #e63946; }
.badge-mma { background: rgba(244, 162, 97, 0.2); color: #f4a261; }

/* ========================
   META
   ======================== */
.meta {
    display: flex;
    gap: 16px;
    font-size: 0.8rem;
    color: #666;
}

/* ========================
   NEWS CARDS
   ======================== */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.news-card {
    display: flex;
    gap: 20px;
    background: #141414;
    border: 1px solid #1e1e1e;
    border-radius: 12px;
    padding: 20px;
    transition: border-color 0.3s, transform 0.2s;
}

.news-card:hover {
    border-color: #e63946;
    transform: translateY(-2px);
}

.news-thumb {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.thumb-placeholder {
    font-size: 2.5rem;
}

.news-info { flex: 1; }

.news-info h2 {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 8px 0;
    line-height: 1.4;
    color: #fff;
}

.news-info p {
    font-size: 0.88rem;
    color: #888;
    line-height: 1.5;
    margin-bottom: 10px;
}

/* ========================
   SIDEBAR
   ======================== */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.sidebar-block {
    background: #141414;
    border: 1px solid #1e1e1e;
    border-radius: 12px;
    padding: 24px;
}

.sidebar-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: #fff;
    position: relative;
    padding-bottom: 12px;
}

.sidebar-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(135deg, #e63946, #ff6b35);
    border-radius: 2px;
}

.popular-list li {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid #1e1e1e;
}

.popular-list li:last-child { border-bottom: none; }

.popular-num {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #e63946, #ff6b35);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
}

.popular-list a {
    font-size: 0.88rem;
    color: #ccc;
    line-height: 1.4;
}

.popular-list a:hover { color: #e63946; }

.category-list li { margin-bottom: 4px; }

.category-list a {
    display: block;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #aaa;
    transition: background 0.2s, color 0.2s;
}

.category-list a:hover {
    background: #1e1e1e;
    color: #fff;
}

/* ========================
   FOOTER (main site)
   ======================== */
.footer {
    background: #111;
    border-top: 1px solid #1e1e1e;
    padding: 24px 0;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-logo .logo-s,
.footer-logo .logo-n,
.footer-logo .logo-k {
    font-size: 1.2rem;
    font-weight: 800;
}

.footer-copy {
    font-size: 0.8rem;
    color: #666;
}

.footer-social {
    display: flex;
    gap: 8px;
}

.social-link {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #1e1e1e;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: #aaa;
    transition: background 0.2s, color 0.2s;
}

.social-link:hover {
    background: linear-gradient(135deg, #e63946, #ff6b35);
    color: #fff;
}

/* ========================
   RESPONSIVE — TABLET
   ======================== */
@media (max-width: 992px) {
    .main-layout {
        grid-template-columns: 1fr;
    }

    .hero-card {
        grid-template-columns: 1fr;
    }

    .hero-image {
        min-height: 200px;
    }

    .hero-content h1 {
        font-size: 1.3rem;
    }

    .sidebar {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
}

/* ========================
   RESPONSIVE — MOBILE
   ======================== */
@media (max-width: 768px) {
    .burger {
        display: flex;
    }

    .nav {
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        background: #111;
        border-bottom: 1px solid #1e1e1e;
        flex-direction: column;
        padding: 12px 20px;
        gap: 4px;
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: transform 0.3s, opacity 0.3s;
    }

    .nav-open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .nav-link {
        padding: 12px 14px;
        text-align: left;
    }

    .hero-card {
        grid-template-columns: 1fr;
    }

    .hero-image {
        min-height: 180px;
    }

    .hero-content {
        padding: 20px;
    }

    .hero-content h1 {
        font-size: 1.15rem;
    }

    .news-card {
        flex-direction: column;
        gap: 12px;
    }

    .news-thumb {
        width: 100%;
        height: 140px;
    }

    .sidebar {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .footer-logo {
        flex-direction: column;
        gap: 8px;
    }

    .form-row {
        flex-direction: column;
        gap: 6px;
    }

    .form-row label {
        width: auto;
        text-align: left;
    }

    .form-checkbox-row {
        padding-left: 0;
        justify-content: center;
    }

    .auth-links {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .auth-link-main {
        width: 100%;
        text-align: center;
    }
}




.form-group { margin-bottom: 18px; }
.form-group label { display:block; font-size:0.9rem; color:#ccc; margin-bottom:6px; }
.form-group input { width:100%; padding:10px 14px; background:#1e1e1e; border:1px solid #333; border-radius:6px; color:#fff; font-family:inherit; }
.auth-tabs { display:flex; gap:10px; justify-content:center; margin-bottom:20px; }
.auth-tab { padding:8px 20px; border-radius:20px; color:#aaa; border:1px solid #333; }
.auth-tab.active { background:linear-gradient(135deg,#e63946,#ff6b35); color:#fff; border:none; }
.btn-primary { width:100%; padding:12px; background:linear-gradient(135deg,#e63946,#ff6b35); border:none; border-radius:8px; color:#fff; font-weight:600; cursor:pointer; }
.profile-block { text-align:center; }
.profile-avatar { width:80px; height:80px; margin:0 auto 10px; border-radius:50%; background:linear-gradient(135deg,#e63946,#ff6b35); display:flex; align-items:center; justify-content:center; font-size:2rem; font-weight:700; }
.profile-name { font-weight:600; font-size:1.1rem; }
.profile-login { color:#888; font-size:0.9rem; margin-bottom:16px; }
.profile-table { width:100%; font-size:0.9rem; text-align:left; border-collapse:collapse; }
.profile-table td { padding:8px 6px; border-bottom:1px solid #1e1e1e; }
.profile-table td:first-child { color:#888; }

/* ==========================================================
   Валидация форм (login.php + js/validation.js)
   ========================================================== */

/* Подсветка невалидного и валидного поля */
.form-group input.input-error {
    border-color: #e63946;
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.2);
}
.form-group input.input-valid {
    border-color: #4caf50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.15);
}

/* Сообщение об ошибке под полем */
.field-error {
    display: block;
    min-height: 0;
    color: #e63946;
    font-size: 0.78rem;
    margin-top: 5px;
    opacity: 0;
    transition: opacity 0.15s ease;
}
.field-error.visible { opacity: 1; }

/* Обёртка "поле + кнопка показа пароля" */
.password-wrap { position: relative; }
.password-wrap input { padding-right: 92px; }

.toggle-pass {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    padding: 4px 10px;
    background: #262626;
    border: 1px solid #3a3a3a;
    border-radius: 6px;
    color: #bbb;
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.toggle-pass:hover { color: #fff; border-color: #e63946; }
.toggle-pass.active {
    background: linear-gradient(135deg, #e63946, #ff6b35);
    border-color: transparent;
    color: #fff;
}

/* Индикатор надёжности пароля */
.strength {
    display: none;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}
.strength.visible { display: flex; }
.strength-track {
    flex: 1;
    height: 5px;
    background: #2a2a2a;
    border-radius: 3px;
    overflow: hidden;
}
.strength-fill {
    height: 100%;
    width: 0;
    border-radius: 3px;
    background: #555;
    transition: width 0.25s ease, background 0.25s ease;
}
.strength-fill.weak { background: #e63946; }
.strength-fill.medium { background: #ff9800; }
.strength-fill.strong { background: #4caf50; }
.strength-label {
    font-size: 0.75rem;
    color: #aaa;
    white-space: nowrap;
    min-width: 62px;
    text-align: right;
}

/* Чек-лист требований к паролю */
.pass-rules {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    margin-top: 8px;
    list-style: none;
}
.pass-rules li {
    position: relative;
    padding-left: 15px;
    font-size: 0.75rem;
    color: #777;
    transition: color 0.15s;
}
.pass-rules li::before {
    content: '\2022';
    position: absolute;
    left: 0;
    color: #555;
    font-weight: 700;
}
.pass-rules li.ok { color: #4caf50; }
.pass-rules li.ok::before { content: '\2713'; color: #4caf50; }
