:root {
    --bg-dark: #1a222c;
    --card-bg: #242f3d;
    --footer-bg: #111821;
    --accent-gold: #c5a059;
    --text-main: #e0e0e0;
    --text-dim: #94a3b8;
    --input-bg: #1d2633;
}

/* ОБЩИЕ НАСТРОЙКИ */
html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
}

body {
    background-color: var(--bg-dark);
    font-family: 'Times New Roman', serif;
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    line-height: 1.6;
}

/* ШАПКА (HEADER) */
header {
    width: 100%;
    padding: 60px 0;
    text-align: center;
    border-bottom: 1px solid rgba(197, 160, 89, 0.2);
    flex-shrink: 0;
}

.logo {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    color: var(--accent-gold);
    text-transform: uppercase;
    letter-spacing: 6px;
    margin-bottom: 20px;
    font-weight: normal;
}

nav a {
    margin: 0 15px;
    text-decoration: none;
    color: var(--text-main);
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 1px;
    transition: 0.3s;
    display: inline-block;
}

nav a:hover {
    color: var(--accent-gold);
}

nav a.active {
    border-bottom: 1px solid var(--accent-gold);
    padding-bottom: 5px;
    color: var(--accent-gold);
}

/* ОСНОВНОЙ КОНТЕЙНЕР */
main {
    flex: 1;
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 0;
    display: flex;
    flex-direction: column;
}

/* ЗАГОЛОВКИ СТРАНИЦ */
h1.page-title {
    font-size: 2.5rem;
    color: var(--accent-gold);
    text-transform: uppercase;
    letter-spacing: 3px;
    text-align: center;
    margin-bottom: 60px;
    font-weight: 300;
}

/* ГЛАВНАЯ: СЕТКА ВЫПУСКОВ */
.issue-grid {
    display: flex;
    justify-content: center;
    gap: 50px;
    flex-wrap: wrap;
    margin-top: auto;
    margin-bottom: auto;
}

.issue-card {
    background: var(--card-bg);
    padding: 50px;
    border: 1px solid rgba(197, 160, 89, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.3s ease;
    width: 100%;
    max-width: 400px;
}

.issue-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-gold);
}

.cover-placeholder {
    width: 240px;
    height: 340px;
    background: #1d2a3a;
    border: 1px solid var(--accent-gold);
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--accent-gold);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.issue-card h3 {
    font-size: 1.6rem;
    margin: 0 0 15px 0;
    color: white;
    font-weight: normal;
}

.issue-card p {
    color: var(--text-dim);
}

/* О НАС: СТРУКТУРА */
.about-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 80px;
    align-items: start;
}

.about-content p {
    margin-bottom: 25px;
    text-align: justify;
    font-size: 1.15rem;
}

.sidebar {
    background: var(--card-bg);
    padding: 40px;
    border: 1px solid rgba(197, 160, 89, 0.2);
    position: sticky;
    top: 40px;
}

.sidebar h2 {
    color: var(--accent-gold);
    font-size: 1.5rem;
    margin: 0 0 25px 0;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-bottom: 1px solid rgba(197, 160, 89, 0.3);
    padding-bottom: 10px;
}

.sidebar p {
    margin: 15px 0;
    font-size: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 10px;
}

.sidebar b {
    color: var(--accent-gold);
    display: block;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

/* ФОРМА ПОДАЧИ */
.form-center-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;
}

.form-container {
    background: var(--card-bg);
    width: 100%;
    max-width: 800px;
    padding: 60px;
    border: 1px solid rgba(197, 160, 89, 0.1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.full-width {
    grid-column: span 2;
}

label {
    display: block;
    color: var(--accent-gold);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 10px;
    font-weight: bold;
}

input,
textarea {
    width: 100%;
    padding: 15px;
    background: var(--input-bg);
    border: 1px solid rgba(197, 160, 89, 0.2);
    color: white;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s;
}

input:focus,
textarea:focus {
    border-color: var(--accent-gold);
    outline: none;
    background: #242f3d;
}

.submit-btn {
    background: var(--accent-gold);
    color: var(--bg-dark);
    border: none;
    padding: 22px;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 2px;
    cursor: pointer;
    width: 100%;
    margin-top: 30px;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    background: #d9b87a;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(197, 160, 89, 0.3);
}

/* АРХИВ */
.year-block {
    margin-bottom: 100px;
    width: 100%;
}

.year-title {
    font-size: 2.5rem;
    color: var(--accent-gold);
    border-bottom: 1px solid rgba(197, 160, 89, 0.3);
    padding-bottom: 15px;
    margin-bottom: 40px;
    font-weight: 300;
    letter-spacing: 4px;
}

.archive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.issue-item {
    background: var(--card-bg);
    border: 1px solid rgba(197, 160, 89, 0.1);
    padding: 25px;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.issue-item:hover {
    border-color: var(--accent-gold);
    transform: translateY(-3px);
    background: #2d3a4b;
}

.month-box {
    width: 70px;
    height: 85px;
    background: var(--bg-dark);
    border: 1px solid var(--accent-gold);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    flex-shrink: 0;
}

.month-box .num {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent-gold);
    line-height: 1;
}

.month-box .label {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-top: 5px;
}

.issue-info h4 {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
    color: #fff;
    font-weight: normal;
}

.issue-info p {
    margin: 0 0 10px 0;
    font-size: 0.85rem;
    color: var(--text-dim);
}

.download-link {
    display: inline-block;
    color: var(--accent-gold);
    text-decoration: none;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid var(--accent-gold);
    transition: 0.3s;
}

.download-link:hover {
    color: #fff;
    border-color: #fff;
}

/* ПОДВАЛ (FOOTER) */
footer {
    width: 100%;
    background-color: var(--footer-bg);
    padding: 40px 0;
    border-top: 1px solid rgba(197, 160, 89, 0.2);
    text-align: center;
    margin-top: auto;
    flex-shrink: 0;
}

.footer-text {
    color: var(--text-dim);
    font-size: 0.9rem;
}

.footer-text span {
    color: var(--accent-gold);
    display: block;
    margin-bottom: 5px;
}

/* АДАПТИВНОСТЬ (базовая, из исходной вёрстки) */
@media (max-width: 900px) {
    .issue-grid {
        flex-direction: column;
        align-items: center;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .sidebar {
        position: static;
    }

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

    .full-width {
        grid-column: span 1;
    }

    .form-container {
        padding: 30px 20px;
    }

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

/* ===================================== */
/* КАСТОМНЫЙ FILE INPUT В СТИЛЕ САЙТА     */
/* ===================================== */

.file-input-wrapper {
    position: relative;
    width: 100%;
}

.file-input-wrapper input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
}

.file-input-label {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 15px;
    background: var(--input-bg);
    border: 1px solid rgba(197, 160, 89, 0.2);
    color: var(--text-dim);
    font-size: 0.9rem;
    box-sizing: border-box;
    transition: all 0.3s;
}

.file-input-wrapper:hover .file-input-label {
    border-color: var(--accent-gold);
}

.file-input-label .btn-part {
    flex-shrink: 0;
    padding: 8px 16px;
    background: var(--accent-gold);
    color: var(--bg-dark);
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 1px;
    font-weight: bold;
    white-space: nowrap;
}

.file-input-label .name-part {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ===================================== */
/* МОДАЛЬНОЕ ОКНО ПОДТВЕРЖДЕНИЯ УДАЛЕНИЯ  */
/* ===================================== */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 14, 20, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
    box-sizing: border-box;
}

.modal-overlay.active {
    display: flex;
}

.modal-box {
    background: var(--card-bg);
    border: 1px solid var(--accent-gold);
    padding: 45px 40px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    animation: modalPop 0.2s ease;
}

@keyframes modalPop {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-box h3 {
    color: var(--accent-gold);
    margin: 0 0 15px 0;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: 1.2rem;
    font-weight: normal;
}

.modal-box p {
    color: var(--text-dim);
    margin: 0 0 30px 0;
    font-size: 0.95rem;
    line-height: 1.5;
}

.modal-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.modal-btn {
    flex: 1;
    padding: 14px;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 1px;
    font-weight: bold;
    font-family: inherit;
    transition: all 0.3s;
}

.modal-btn-cancel {
    background: transparent;
    border: 1px solid rgba(148, 163, 184, 0.4);
    color: var(--text-dim);
}

.modal-btn-cancel:hover {
    border-color: white;
    color: white;
}

.modal-btn-confirm {
    background: #ff4d4d;
    color: white;
}

.modal-btn-confirm:hover {
    background: #ff6b6b;
}

/* ===================================== */
/* МОБИЛЬНАЯ АДАПТИВНОСТЬ (доп. правки)   */
/* ===================================== */

@media (max-width: 600px) {

    header {
        padding: 40px 0;
    }

    nav a {
        margin: 0 8px;
        font-size: 11px;
    }

    .form-container {
        padding: 25px 18px;
    }

    .issue-item {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
        padding: 20px;
    }

    .issue-item .month-box {
        margin-right: 0;
        margin-bottom: 15px;
    }

    .issue-info {
        width: 100%;
    }

    .issue-info > div {
        flex-direction: column;
        width: 100%;
        gap: 10px !important;
    }

    .issue-info a.download-link {
        width: 100%;
        text-align: center;
        box-sizing: border-box;
        padding: 10px !important;
    }

    .issue-info form {
        width: 100%;
    }

    .issue-info form button {
        width: 100%;
        text-align: center;
        box-sizing: border-box;
        padding: 10px !important;
    }

    .modal-box {
        padding: 30px 25px;
    }

    .modal-actions {
        flex-direction: column;
    }

    .archive-grid {
        gap: 15px;
    }

    .issue-card {
        padding: 30px 20px;
    }

    .about-content {
        gap: 30px;
    }

    .sidebar {
        padding: 25px;
    }
}
