/* Переменные для основных стилей сайта */
:root {
    --primary: #3B82F6;
    --primary-hover: #2563EB;
    --primary-light: #EFF6FF;
    --background: #FFFFFF;
    --card-bg: #FFFFFF;
    --text-primary: #1F2937;
    --text-secondary: #6B7280;
    --border-light: #E5E7EB;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --rounded-sm: 0.25rem;
    --rounded-md: 0.5rem;
    --rounded-lg: 0.75rem;
    --rounded-full: 9999px;
}

/* Reset и базовые стили */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-primary);
    background-color: #F9FAFB;
    line-height: 1.5;
    margin: 0;
    padding: 0;
}

body.no-scroll {
    overflow: hidden;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--primary-hover);
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-primary);
}

p {
    margin-bottom: 1rem;
}

/* Основной контейнер приложения */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Шапка */
.app-header {
    background-color: var(--background);
    border-bottom: 1px solid var(--border-light);
    padding: 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.app-header .logo {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.app-header .logo-container {
    display: flex;
    align-items: center;
}

.app-header .nav-container {
    display: flex;
    align-items: center;
}

.app-header .logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-primary);
}

.app-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    color: var(--primary);
}

.tagline {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0 0 0 0.5rem;
}

/* Навигация на десктопе */
.main-nav {
    display: flex;
    gap: 1.5rem;
}

.main-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.main-nav a:hover, .main-nav a.active {
    color: var(--primary);
}

.main-nav a.active {
    font-weight: 600;
}

/* Бургер-меню */
.burger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 2rem;
    height: 1.5rem;
    cursor: pointer;
    z-index: 200;
}

.burger-line {
    width: 100%;
    height: 3px;
    background-color: var(--primary);
    border-radius: 5px;
    transition: all 0.3s ease;
}

/* Состояние бургера при открытом меню */
.burger-menu.active .burger-line:nth-child(1) {
    transform: translateY(10px) rotate(45deg);
}

.burger-menu.active .burger-line:nth-child(2) {
    opacity: 0;
}

.burger-menu.active .burger-line:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg);
}

/* Мобильное меню */
@media (max-width: 768px) {
    .app-header .nav-container {
        display: flex;
        justify-content: flex-end;
    }
    
    .burger-menu {
        display: flex;
    }
    
    /* Скрываем обычное меню на мобильных */
    .main-nav {
        display: none;
        position: fixed;
        top: 0;
        right: 0;
        width: 280px;
        height: 100vh;
        background-color: var(--background);
        z-index: 100;
        flex-direction: column;
        padding: 6rem 2rem 2rem;
        transition: all 0.3s ease;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    }
    
    .main-nav.active {
        display: flex;
    }
    
    .main-nav a {
        padding: 1rem 0;
        font-size: 1.1rem;
        border-bottom: 1px solid var(--border-light);
    }
    
    .main-nav a:last-child {
        border-bottom: none;
    }
}

/* Оверлей для мобильного меню */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 90;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.menu-overlay.active {
    visibility: visible;
    opacity: 1;
}

/* Основное содержимое */
.app-content {
    flex: 1;
    padding: 2rem 1rem 3rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* Сетка карточек на главной странице */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* Карточка поста */
.post-card {
    background-color: var(--card-bg);
    border-radius: var(--rounded-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.card-image {
    position: relative;
    height: 200px;
    background-size: cover;
    background-position: center;
    background-color: rgba(0, 0, 0, 0.1);
}

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background-color: rgba(59, 130, 246, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    opacity: 0.9;
    transition: all 0.3s ease;
}

.post-card:hover .play-icon {
    transform: translate(-50%, -50%) scale(1.1);
    background-color: var(--primary);
    opacity: 1;
}

.play-icon svg {
    width: 30px;
    height: 30px;
}

.card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 0.75rem;
    color: var(--text-primary);
    line-height: 1.3;
}

.card-meta {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.post-date {
    display: inline-flex;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.post-date svg {
    width: 14px;
    height: 14px;
    margin-right: 0.4rem;
    fill: currentColor;
}

.post-card:hover .post-date {
    color: var(--primary);
}

.card-excerpt {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.25rem;
    flex-grow: 1;
}

.card-footer {
    margin-top: auto;
}

.find-series-btn {
    display: inline-block;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.post-card:hover .find-series-btn {
    color: var(--primary-hover);
}

/* Пустое состояние главной страницы */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 1rem;
    background-color: var(--card-bg);
    border-radius: var(--rounded-lg);
    box-shadow: var(--shadow-md);
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.empty-state h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 1rem;
    color: var(--text-primary);
}

.empty-state p {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
}

/* Страница поста */
.post-container {
    max-width: 1000px;
    margin: 0 auto;
}

.single-post {
    background-color: var(--card-bg);
    border-radius: var(--rounded-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.post-header {
    padding: 1.5rem 2rem;
    position: relative;
}

.back-button {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0;
    margin-bottom: 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.back-button svg {
    width: 20px;
    height: 20px;
    margin-right: 0.5rem;
}

.back-button:hover {
    color: var(--primary);
}

.post-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    color: var(--text-primary);
    line-height: 1.3;
}

.post-meta {
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

.post-content {
    padding: 0 2rem 2rem;
}

/* Сетка содержимого поста */
.post-media-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.screenshot-container {
    grid-column: span 7;
    border-radius: var(--rounded-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    background-color: #000;
    position: relative;
}

.video-container {
    grid-column: span 5;
    border-radius: var(--rounded-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    position: relative;
    padding-top: 177.78%;  /* 9:16 ratio */
    height: 0;
}

.description-container {
    grid-column: span 7;
    padding: 1.5rem;
    background-color: var(--primary-light);
    border-radius: var(--rounded-lg);
    box-shadow: var(--shadow-sm);
}

.button-container {
    grid-column: span 5;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    background-color: var(--primary-light);
    border-radius: var(--rounded-lg);
    text-align: center;
}

.screenshot-container img {
    width: 100%;
    height: auto;
    display: block;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.description-text {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-primary);
    margin: 0;
}

.episode-note {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    color: var(--text-primary);
}

/* Кнопка с анимацией */
.cta-button {
    position: relative;
    display: inline-block;
    background-color: var(--primary);
    color: white;
    font-weight: 600;
    font-size: 1rem;
    padding: 0.8rem 1.75rem;
    border-radius: var(--rounded-full);
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(59, 130, 246, 0.25);
    border: none;
    cursor: pointer;
}

.cta-button:hover {
    background-color: var(--primary-hover);
    box-shadow: 0 6px 12px rgba(59, 130, 246, 0.3);
    transform: translateY(-2px);
}

.cta-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

.pulse-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: var(--rounded-full);
    background-color: var(--primary);
    opacity: 0.5;
    pointer-events: none;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }
    70% {
        transform: scale(1.2);
        opacity: 0;
    }
    100% {
        transform: scale(1.2);
        opacity: 0;
    }
}

/* Блок с кнопками соцсетей */
.social-share {
    display: none;
}

.share-buttons, .share-btn, .vk-btn, .telegram-btn, .whatsapp-btn {
    display: none;
}

/* Стили страницы "О проекте" */
.about-container {
    max-width: 800px;
    margin: 0 auto;
}

.about-card {
    background-color: var(--card-bg);
    border-radius: var(--rounded-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    padding: 2rem;
}

.about-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 1.5rem;
    color: var(--text-primary);
    position: relative;
    padding-bottom: 1rem;
}

.about-title::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background-color: var(--primary);
    border-radius: var(--rounded-full);
}

.about-section {
    margin-bottom: 2.5rem;
}

.about-section:last-child {
    margin-bottom: 0;
}

.about-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 1rem;
    color: var(--text-primary);
}

.about-section p {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin: 0 0 1rem;
}

.about-section p:last-child {
    margin-bottom: 0;
}

.social-links {
    display: none;
}

.social-link {
    display: none;
}

/* Специальная мобильная раскладка для поста */
.media-row {
    display: none;
}

/* Подвал */
.app-footer {
    background-color: var(--background);
    border-top: 1px solid var(--border-light);
    padding: 1.5rem 1rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Адаптивность */
@media (max-width: 992px) {
    .post-media-grid {
        gap: 1.5rem;
    }

    .post-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    .app-content {
        padding: 1.5rem 1rem 2rem;
    }
    
    .cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }
    
    .card-image {
        height: 180px;
    }
    
    .card-content {
        padding: 1.25rem;
    }
    
    .card-title {
        font-size: 1.1rem;
    }
    
    .post-header {
        padding: 1.25rem 1.5rem;
    }

    .post-content {
        padding: 0 1.5rem 1.5rem;
    }

    .post-media-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .screenshot-container {
        grid-column: 1 / -1;
    }

    .button-container {
        grid-column: 1 / -1;
        order: 1;
    }

    .description-container {
        grid-column: 1 / -1;
        order: 2;
    }

    .video-container {
        grid-column: 1 / -1;
        order: 3;
        padding-top: 100%;  /* 1:1 ratio for mobile */
    }
    
    .about-card {
        padding: 1.5rem;
    }
    
    .about-title {
        font-size: 1.75rem;
    }
    
    .about-section h2 {
        font-size: 1.25rem;
    }
    
    .about-section p {
        font-size: 1rem;
    }

    .app-header .logo {
        flex-wrap: nowrap;
    }
}

@media (max-width: 576px) {
    .app-header .logo-container {
        flex-direction: row;
        align-items: center;
    }
    
    .tagline {
        display: none;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }
    
    .card-image {
        height: 200px;
    }
    
    .post-title {
        font-size: 1.3rem;
    }

    .episode-note {
        font-size: 1rem;
    }

    .post-media-grid {
        display: block;
    }

    .screenshot-container {
        margin-bottom: 1rem;
    }

    .button-container {
        margin-bottom: 1.25rem;
    }

    .description-container {
        margin-bottom: 1.25rem;
    }

    .video-container {
        padding-top: 177.78%; /* Restore 9:16 for small mobile */
    }
    
    .about-card {
        padding: 1.25rem;
    }
    
    .about-title {
        font-size: 1.5rem;
    }
    
    .social-links {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .social-link {
        width: 100%;
        justify-content: center;
    }
}

/* Специальная мобильная раскладка с контейнерами в строку */
@media (max-width: 768px) and (min-width: 577px) {
    .media-row {
        display: flex;
        gap: 1rem;
        margin-bottom: 1.25rem;
    }

    .media-row .screenshot-container {
        flex: 0 0 66%;
        margin-bottom: 0;
    }

    .media-row .button-container {
        flex: 0 0 30%;
        margin-bottom: 0;
        padding: 1rem;
    }

    .media-row .episode-note {
        font-size: 0.9rem;
        margin-bottom: 0.75rem;
    }

    .media-row .cta-button {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
} 