/* ===== Сброс и основа ===== */

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    color: #fff;
    background: #000;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: rgba(255, 255, 255, 0.8); text-decoration: none; }
a:hover { color: #fff; }

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


/* ===== Фон ===== */

.bg-media {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    z-index: -2;
}

.bg-static { z-index: -3; }

.bg-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: -1;
}


/* ===== Шапка ===== */

header {
    background: rgba(0, 0, 0, 0.6);
    padding: 15px 0;
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 100;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.site-title {
    font-size: 22px;
    margin: 0;
    color: #fff;
    white-space: nowrap;
    font-weight: 300;
    letter-spacing: 1px;
}

.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

nav { flex: 1; }

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 20px;
}

nav ul li a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 16px;
    transition: color 0.2s;
}

nav ul li a:hover { color: #fff; }
nav ul li a.logout-link { opacity: 0.5; }
nav ul li a.logout-link:hover { opacity: 0.8; }

.nav-controls {
    margin-left: auto;
    display: flex;
    gap: 10px;
}

.nav-controls a {
    display: inline-flex;
    align-items: center;
    padding: 0;
    background: transparent;
    opacity: 0.6;
    transition: opacity 0.2s, transform 0.2s;
}

.nav-controls a:hover { opacity: 1; transform: scale(1.1); }


/* ===== Основной контент ===== */

main {
    padding: 20px;
    flex: 1;
}


/* ===== Футер ===== */

footer {
    background: rgba(0, 0, 0, 0.5);
    color: rgba(255, 255, 255, 0.4);
    text-align: center;
    padding: 10px 0;
    font-size: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}


/* ===== Медиа в постах ===== */

.post { margin-bottom: 30px; }

.post h2 {
    font-weight: 400;
    font-size: 20px;
    margin-bottom: 8px;
}

.post small { color: rgba(255, 255, 255, 0.4); }

.post-media {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 10px auto;
    border-radius: 6px;
}

@media (min-width: 992px) {
    .post-media { max-width: 60%; }
}

.audio-container { margin: 10px 0; }

audio {
    width: 100%;
    max-width: 600px;
    display: block;
    margin: 0 auto;
}


/* ===== Кнопки ===== */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.08);
    transition: all 0.2s;
    text-decoration: none;
}

.btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.35);
    color: #fff;
}

.btn:active {
    background: rgba(255, 255, 255, 0.2);
}

.btn-primary {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
}
.btn-primary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.6);
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.85);
}

.btn-danger {
    background: rgba(255, 80, 80, 0.1);
    border-color: rgba(255, 80, 80, 0.25);
    color: rgba(255, 140, 140, 0.9);
}
.btn-danger:hover {
    background: rgba(255, 80, 80, 0.2);
    border-color: rgba(255, 80, 80, 0.4);
    color: #ff9999;
}

.btn-success {
    background: rgba(80, 200, 80, 0.1);
    border-color: rgba(80, 200, 80, 0.25);
    color: rgba(140, 230, 140, 0.9);
}
.btn-success:hover {
    background: rgba(80, 200, 80, 0.2);
    border-color: rgba(80, 200, 80, 0.4);
    color: #99ee99;
}

.btn-sm { padding: 6px 12px; font-size: 13px; }


/* ===== Формы ===== */

.auth-form {
    max-width: 350px;
}

.auth-form label {
    display: block;
    margin-bottom: 5px;
    margin-top: 14px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
}

.auth-form input[type="text"],
.auth-form input[type="password"],
.auth-form input[type="url"],
.auth-form input[type="email"],
.auth-form textarea,
.auth-form select {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    font-size: 14px;
    transition: border-color 0.2s, background 0.2s;
}

.auth-form input:focus,
.auth-form textarea:focus,
.auth-form select:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.1);
}

.auth-form input::placeholder,
.auth-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

.auth-form button[type="submit"],
.auth-form .btn {
    margin-top: 18px;
}

.auth-form small {
    display: block;
    color: rgba(255, 255, 255, 0.35);
    font-size: 12px;
    margin-top: 4px;
}


/* ===== Сообщения ===== */

.form-message { margin: 10px 0; font-size: 14px; }

.form-message.error,
.error { color: #ff8080; }

.form-message.success,
.success { color: #80e080; }

.warning-box {
    background: rgba(255, 200, 50, 0.08);
    border: 1px solid rgba(255, 200, 50, 0.2);
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 4px;
    color: rgba(255, 220, 100, 0.9);
    font-size: 14px;
}


/* ===== Таблицы (admin) ===== */

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
}

.admin-table th,
.admin-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    font-size: 14px;
}

.admin-table th {
    color: rgba(255, 255, 255, 0.5);
    font-weight: 400;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-table a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
}
.admin-table a:hover { color: #fff; }

.admin-section { margin-bottom: 30px; }

.admin-section h3 {
    font-weight: 400;
    font-size: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 8px;
    color: rgba(255, 255, 255, 0.8);
}

.admin-section textarea {
    width: 100%;
    max-width: 500px;
    min-height: 100px;
    padding: 9px 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    color: #fff;
    font-size: 14px;
    resize: vertical;
    transition: border-color 0.2s;
}

.admin-section textarea:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
}

.admin-section input[type="text"],
.admin-section input[type="file"] {
    display: block;
    margin: 8px 0;
    padding: 9px 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    color: #fff;
    font-size: 14px;
    transition: border-color 0.2s;
}

.admin-section input[type="text"]:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
}

.admin-section label {
    display: block;
    margin: 8px 0 4px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
}


/* ===== Скроллбар ===== */

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover { background-color: rgba(255, 255, 255, 0.35); }

* {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}


/* ===== Прогресс-бар ===== */

.progress-container {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 15px;
    margin-top: 20px;
}

.progress-bar-bg {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    height: 16px;
    overflow: hidden;
    margin-top: 8px;
}

.progress-bar-fill {
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
    transition: width 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 11px;
}


/* ===== Модальное окно ===== */

body.modal-open { overflow: hidden; }


/* ===== Чекбоксы ===== */

input[type="checkbox"] {
    accent-color: rgba(255, 255, 255, 0.6);
}


/* ===== Адаптивность ===== */

@media (max-width: 768px) {
    .hamburger { display: block; }

    nav ul { display: none; }

    nav ul.collapsed {
        display: flex;
        flex-direction: column;
        background: rgba(0, 0, 0, 0.85);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        position: fixed;
        top: 58px;
        left: 50%;
        transform: translateX(-50%);
        width: 70%;
        max-width: 280px;
        z-index: 99;
        padding: 16px 20px;
        border-radius: 8px;
        border: 1px solid rgba(255, 255, 255, 0.08);
        gap: 10px;
    }

    .nav-controls {
        margin-left: 0;
        justify-content: center;
    }

    .site-title { font-size: 18px; }

    main { padding: 10px; margin-bottom: 50px; }

    footer {
        font-size: 12px;
        position: fixed;
        bottom: 0;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .site-title { font-size: 16px; }
    main { padding: 8px; margin-bottom: 50px; }
    .auth-form { max-width: 100%; }
}
