/* ════════════════════════════════════════════════════════════════
   DRAMA-STORY.RZHAVIY.RU — ОСНОВНЫЕ СТИЛИ
   Тема: семейная драма с хорошим концом
   Палитра: глубокий фиолетовый + золото + винный
   ════════════════════════════════════════════════════════════════ */

/* ════════════════════════════════════════
   ПЕРЕМЕННЫЕ ЦВЕТОВ И ШРИФТОВ
   ════════════════════════════════════════ */
:root {
    /* Основная палитра */
    --color-bg-dark: #1a0f2e;
    --color-bg-main: #2d1b3d;
    --color-bg-card: #3a2347;
    --color-gold: #d4af37;
    --color-gold-bright: #f1c40f;
    --color-wine: #8b1538;
    --color-wine-dark: #6d0f2c;
    --color-cream: #f5e6d3;
    --color-text: #e8dcc8;
    --color-text-muted: #b8a99a;
    --color-text-soft: #8a7a6f;
    --color-border: rgba(212, 175, 55, 0.2);
    --color-border-hover: rgba(212, 175, 55, 0.5);

    /* Шрифты */
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Lora', Georgia, serif;
    --font-ui: 'Inter', -apple-system, sans-serif;

    /* Размеры */
    --container-width: 1200px;
    --container-narrow: 800px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;

    /* Тени */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.4);
    --shadow-gold: 0 0 30px rgba(212, 175, 55, 0.15);
}

/* ════════════════════════════════════════
   БАЗОВЫЕ СТИЛИ
   ════════════════════════════════════════ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    background-color: #1a0f2e; /* ИСПРАВЛЕНИЕ: Убирает белую полосу при скролле на мобильных */
}

body {
    font-family: var(--font-body);
    background-color: #1a0f2e; /* ИСПРАВЛЕНИЕ: Базовый цвет под градиентом */
    background-image: linear-gradient(180deg, var(--color-bg-dark) 0%, var(--color-bg-main) 100%);
    background-attachment: fixed;
    color: var(--color-text);
    line-height: 1.7;
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.container-narrow {
    max-width: var(--container-narrow);
    margin: 0 auto;
    padding: 0 20px;
}

a {
    color: var(--color-gold);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ════════════════════════════════════════
   ШАПКА (HEADER) — простая раскладка
   ════════════════════════════════════════ */
.site-header {
    background: rgba(26, 15, 46, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-md);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 0;
    gap: 30px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--color-cream);
    flex-shrink: 0;
}

.logo:hover {
    color: var(--color-gold);
}

.logo-icon {
    font-size: 2.4rem;
    line-height: 1;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--color-gold);
    line-height: 1.1;
}

.logo-tagline {
    font-family: var(--font-ui);
    font-size: 0.78rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-top: 4px;
}

.header-search {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--color-border);
    border-radius: 30px;
    padding: 4px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.header-search:focus-within {
    border-color: var(--color-gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}

.header-search input {
    background: transparent;
    border: none;
    padding: 8px 16px;
    color: var(--color-text);
    font-family: var(--font-ui);
    font-size: 0.92rem;
    width: 280px;
    outline: none;
}

.header-search input::placeholder {
    color: var(--color-text-soft);
}

.header-search button {
    background: var(--color-wine);
    border: none;
    color: white;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    flex-shrink: 0;
}

.header-search button:hover {
    background: var(--color-wine-dark);
}

/* ════════════════════════════════════════
   ОСНОВНОЙ КОНТЕНТ
   ════════════════════════════════════════ */
.site-main {
    min-height: calc(100vh - 200px);
    padding: 40px 0 80px;
}

.page-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-gold);
    margin-bottom: 10px;
    text-align: center;
}

.page-subtitle {
    text-align: center;
    color: var(--color-text-muted);
    font-style: italic;
    margin-bottom: 50px;
    font-size: 1.1rem;
}

/* ════════════════════════════════════════
   ЛЕНТА РАССКАЗОВ (ГЛАВНАЯ СТРАНИЦА — стиль Дзена)
   ════════════════════════════════════════ */
.stories-feed {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.story-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.story-card:hover {
    transform: translateY(-3px);
    border-color: var(--color-border-hover);
    box-shadow: var(--shadow-lg), var(--shadow-gold);
}

.story-card-image {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--color-bg-dark);
}

.story-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.story-card:hover .story-card-image img {
    transform: scale(1.05);
}

.story-card-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 60%, rgba(26, 15, 46, 0.7) 100%);
    pointer-events: none;
}

.story-card-category {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(139, 21, 56, 0.95);
    color: white;
    font-family: var(--font-ui);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 6px 14px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    z-index: 2;
}

.story-card-content {
    padding: 25px 30px 30px;
}

.story-card-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-cream);
    line-height: 1.3;
    margin-bottom: 15px;
    transition: color 0.2s ease;
}

.story-card:hover .story-card-title {
    color: var(--color-gold);
}

.story-card-excerpt {
    color: var(--color-text);
    font-size: 1.02rem;
    line-height: 1.6;
    margin-bottom: 18px;
}

.story-card-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    font-family: var(--font-ui);
    font-size: 0.85rem;
    color: var(--color-text-soft);
    padding-top: 18px;
    border-top: 1px solid var(--color-border);
}

.story-card-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ════════════════════════════════════════
   ОДНА СТАТЬЯ (story.php)
   ════════════════════════════════════════ */
.story-page {
    max-width: var(--container-narrow);
    margin: 0 auto;
}

.story-cover {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 30px;
    box-shadow: var(--shadow-lg);
}

.story-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.story-header {
    text-align: center;
    margin-bottom: 40px;
}

.story-category-tag {
    display: inline-block;
    background: var(--color-wine);
    color: white;
    font-family: var(--font-ui);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 6px 16px;
    border-radius: 20px;
    margin-bottom: 20px;
}

.story-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-cream);
    line-height: 1.2;
    margin-bottom: 20px;
}

.story-meta {
    display: flex;
    justify-content: center;
    gap: 25px;
    color: var(--color-text-soft);
    font-family: var(--font-ui);
    font-size: 0.9rem;
}

.story-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.story-content {
    font-size: 1.15rem;
    line-height: 1.85;
    color: var(--color-text);
}

.story-content p {
    margin-bottom: 1.4em;
}

.story-content p:first-of-type::first-letter {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 900;
    color: var(--color-gold);
    float: left;
    line-height: 1;
    padding: 8px 12px 0 0;
}

.story-content blockquote {
    border-left: 4px solid var(--color-gold);
    padding: 10px 25px;
    margin: 30px 0;
    font-style: italic;
    color: var(--color-text-muted);
    background: rgba(212, 175, 55, 0.05);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.story-content h2,
.story-content h3 {
    font-family: var(--font-heading);
    color: var(--color-gold);
    margin: 1.5em 0 0.6em;
    line-height: 1.3;
}

.story-content h2 {
    font-size: 1.8rem;
}

.story-content h3 {
    font-size: 1.4rem;
}

.story-tags {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid var(--color-border);
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.story-tag {
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid var(--color-border);
    color: var(--color-gold);
    font-family: var(--font-ui);
    font-size: 0.85rem;
    padding: 6px 14px;
    border-radius: 20px;
    transition: all 0.2s ease;
}

.story-tag:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: var(--color-gold);
}

/* ════════════════════════════════════════
   ПУСТАЯ СТРАНИЦА / ОШИБКИ
   ════════════════════════════════════════ */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    max-width: 500px;
    margin: 0 auto;
}

.empty-state-icon {
    font-size: 5rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h2 {
    font-family: var(--font-heading);
    color: var(--color-gold);
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.empty-state p {
    color: var(--color-text-muted);
    font-size: 1.05rem;
}

/* ════════════════════════════════════════
   ПОДВАЛ (FOOTER)
   ════════════════════════════════════════ */
.site-footer {
    background: var(--color-bg-dark);
    border-top: 1px solid var(--color-border);
    margin-top: 80px;
    padding: 60px 0 30px;
}

.footer-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-bottom: 40px;
}

.footer-section h3.footer-title {
    font-family: var(--font-heading);
    color: var(--color-gold);
    font-size: 1.4rem;
    margin-bottom: 12px;
}

.footer-section h4 {
    font-family: var(--font-heading);
    color: var(--color-cream);
    font-size: 1.1rem;
    margin-bottom: 18px;
}

.footer-tagline {
    color: var(--color-text-muted);
    font-style: italic;
    line-height: 1.6;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--color-text-muted);
    font-family: var(--font-ui);
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--color-gold);
}

.footer-about {
    color: var(--color-text-muted);
    line-height: 1.7;
    font-size: 0.95rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 25px;
    border-top: 1px solid var(--color-border);
    color: var(--color-text-soft);
    font-family: var(--font-ui);
    font-size: 0.85rem;
}

/* ════════════════════════════════════════
   ПАГИНАЦИЯ
   ════════════════════════════════════════ */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 50px;
}

.pagination a,
.pagination span {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    font-family: var(--font-ui);
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.pagination a:hover {
    background: var(--color-wine);
    color: white;
    border-color: var(--color-wine);
}

.pagination .current {
    background: var(--color-wine);
    color: white;
    border-color: var(--color-wine);
}

/* ════════════════════════════════════════
   АДАПТИВ ДЛЯ ПЛАНШЕТОВ И ТЕЛЕФОНОВ
   ════════════════════════════════════════ */
@media (max-width: 1024px) {
    .header-search input {
        width: 220px;
    }
}

@media (max-width: 768px) {
    .header-inner {
        gap: 15px;
    }

    .header-search input {
        width: 140px;
        font-size: 0.85rem;
    }

    .logo-icon {
        font-size: 2rem;
    }

    .logo-title {
        font-size: 1.2rem;
    }

    .logo-tagline {
        display: none;
    }

    .page-title {
        font-size: 1.8rem;
    }

    .story-card-content {
        padding: 20px;
    }

    .story-card-title {
        font-size: 1.25rem;
    }

    .story-title {
        font-size: 1.8rem;
    }

    .story-content {
        font-size: 1.05rem;
    }

    .story-content p:first-of-type::first-letter {
        font-size: 3rem;
    }

    .footer-inner {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 480px) {
    .header-search input {
        width: 100px;
        padding: 6px 12px;
    }

    .header-search button {
        width: 32px;
        height: 32px;
    }

    .logo-title {
        font-size: 1.05rem;
    }

    .logo-icon {
        font-size: 1.7rem;
    }

    .story-meta {
        flex-direction: column;
        gap: 8px;
    }

    .story-card-meta {
        flex-wrap: wrap;
        gap: 12px;
    }
}

/* ════════════════════════════════════════
   VPN БАННЕР (FREE WWW) — УЗКАЯ ПЛАШКА
   ════════════════════════════════════════ */
.vpn-banner {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 20px 25px;
    margin: 30px 0;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.vpn-banner:hover {
    border-color: var(--color-border-hover);
    box-shadow: var(--shadow-gold);
}

.vpn-logo-text {
    color: var(--color-gold);
    font-family: var(--font-ui);
    font-weight: 700;
    font-size: 0.85rem;
    display: block;
    margin-bottom: 5px;
    letter-spacing: 1.5px;
}

.vpn-title {
    color: var(--color-cream);
    font-family: var(--font-heading);
    font-size: 1.4rem;
    margin-bottom: 8px;
}

.vpn-desc {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    margin-bottom: 15px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.vpn-features {
    display: flex;
    justify-content: center;
    gap: 20px;
    font-size: 0.85rem;
    color: var(--color-text-soft);
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.vpn-features span {
    display: flex;
    align-items: center;
    gap: 5px;
}

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

.vpn-btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 20px;
    font-family: var(--font-ui);
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    transition: all 0.2s ease;
    text-decoration: none;
}

.vpn-btn-main {
    background: var(--color-wine);
    color: white !important;
    border: 1px solid var(--color-wine);
}

.vpn-btn-main:hover {
    background: var(--color-wine-dark);
    border-color: var(--color-wine-dark);
}

.vpn-btn-tg {
    background: rgba(212, 175, 55, 0.05);
    color: var(--color-gold) !important;
    border: 1px solid var(--color-border);
}

.vpn-btn-tg:hover {
    background: rgba(212, 175, 55, 0.15);
    border-color: var(--color-gold);
}

/* Адаптив для телефонов */
@media (max-width: 600px) {
    .vpn-banner {
        padding: 20px 15px;
    }
    .vpn-features {
        gap: 10px;
    }
    .vpn-actions {
        flex-direction: column;
        gap: 10px;
    }
}