/* ========== СОВРЕМЕННЫЙ ГИБРИД ========== */
:root {
    --bg-primary: #f8f9fa;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-nav: rgba(255, 255, 255, 0.98);
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --accent-gold: #f59e0b;
    --accent-tmdb: #0ea5e9;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
    --hover-bg: #f1f5f9;
    --modal-overlay: rgba(15, 23, 42, 0.8);
    --radius-md: 8px;
    --radius-lg: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
}

/* ========== НАВИГАЦИЯ ========== */
.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-nav);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 0;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.logo {
    font-size: 1.3em;
    font-weight: 600;
    background: linear-gradient(135deg, var(--text-primary), var(--text-muted));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    white-space: nowrap;
    letter-spacing: -0.02em;
}

/* ========== ПОИСК ========== */
.search-container {
    position: relative;
    flex: 1;
    max-width: 320px;
}

.search-input {
    width: 100%;
    padding: 10px 36px 10px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    color: var(--text-primary);
    font-size: 0.95em;
    transition: all 0.2s;
    box-shadow: var(--shadow-sm);
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2em;
    cursor: pointer;
    padding: 0 4px;
    display: none;
    transition: all 0.2s;
}

.search-clear:hover {
    color: var(--text-primary);
}

.search-clear.visible {
    display: block;
}

/* ========== ФИЛЬТР ПО ЖАНРАМ ========== */
.genre-filter {
    position: relative;
}

.genre-filter-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px 18px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 0.95em;
    white-space: nowrap;
    transition: all 0.2s;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 6px;
}

.genre-filter-btn:hover {
    border-color: var(--accent-gold);
    background: var(--hover-bg);
}

.genre-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    max-height: 320px;
    overflow-y: auto;
    min-width: 220px;
    display: none;
    z-index: 1000;
    padding: 8px 0;
}

.genre-dropdown.show {
    display: block;
}

.genre-option {
    padding: 10px 18px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-secondary);
    font-size: 0.95em;
}

.genre-option:hover {
    background: var(--hover-bg);
    color: var(--accent-gold);
    padding-left: 24px;
}

.genre-option.active {
    background: var(--accent-gold);
    color: white;
    font-weight: 500;
}

.nav-stats {
    color: var(--text-muted);
    font-size: 0.9em;
    background: var(--bg-secondary);
    padding: 8px 16px;
    border-radius: 30px;
    border: 1px solid var(--border-color);
    font-family: 'SF Mono', 'Roboto Mono', monospace;
    white-space: nowrap;
    box-shadow: var(--shadow-sm);
}

/* ========== УВЕДОМЛЕНИЯ ========== */
.notification {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 1000;
    background: #1e293b;
    border-left: 4px solid #10b981;
    color: white;
    padding: 14px 22px;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    transform: translateX(400px);
    transition: transform 0.3s ease;
    max-width: 320px;
    font-size: 0.95em;
}

.notification.show {
    transform: translateX(0);
}

.notification.error {
    border-left-color: #ef4444;
}

/* ========== СЕТКА ========== */
.feed.grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
    max-width: 1400px;
    margin: 10px auto;
    padding: 0 20px;
}

.movie-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 0.3em solid var(--border-color);
    transition: all 0.3s;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: var(--accent-gold);
    box-shadow: var(--shadow-md);
}

.movie-poster {
    width: 100%;
    aspect-ratio: 2/3;
    overflow: hidden;
    background: var(--bg-secondary);
    position: relative;
}

.movie-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.movie-card:hover .movie-poster img {
    transform: scale(1.08);
}

/* Градиент на постере при наведении */
.movie-poster::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.movie-card:hover .movie-poster::after {
    opacity: 1;
}

/* Контент под постером */
.movie-grid-content {
    padding: 14px 12px;
    background: var(--bg-card);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.movie-grid-title {
    font-weight: 600;
    font-size: 0.95em;
    color: var(--text-primary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-grid-country {
    font-weight: 600;
    font-size: 0.90em;
    color: var(--text-primary);
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-grid-year {
    font-size: 0.85em;
    color: var(--accent-gold);
    font-weight: 600;
    letter-spacing: 0.02em;
}

.movie-grid-rating {
    display: flex;
    align-items: center;
    margin-top: 2px;
}

/* Рейтинг звездами */
.rating-stars {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    color: var(--accent-gold);
    font-size: 1em;
    background: var(--bg-secondary);
    padding: 0.5em 0;
}

.rating-stars .star {
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.1));
}

/* ========== СТРАНИЦА ФИЛЬМА ========== */
.movie-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.back-button {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 12px 24px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 1em;
    margin-bottom: 24px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
}

.back-button:hover {
    border-color: var(--accent-gold);
    transform: translateX(-4px);
    background: var(--hover-bg);
}

.movie-page-content {
    background: var(--bg-card);
    border-radius: 1em;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
}

body.movie-page-open .feed {
    display: none;
}

/* ========== ПОЛНАЯ КАРТОЧКА ФИЛЬМА ========== */
.modal-movie {
    position: relative;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 400px;
    background-size: cover;
    background-position: center 20%;
    z-index: 0;
}

.modal-backdrop-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(15,23,42,0.8) 0%, rgba(15,23,42,0.95) 100%);
}

.modal-header {
    position: relative;
    z-index: 1;
    padding: 40px 40px 0 40px;
    display: flex;
    gap: 30px;
}

.modal-poster {
    flex-shrink: 0;
    width: 200px;
    border-radius: 1em 1em 0 0;
    overflow: hidden;
    box-shadow: 0 12px 24px rgba(0,0,0,0.3);
    border: 2px solid rgba(255,255,255,0.1);
}

.modal-poster img {
    width: 100%;
    height: auto;
    display: block;
}

.modal-title-section {
    flex: 1;
    color: #fff;
}

.modal-title {
    font-size: 2.5em;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.2;
}

.modal-original-title {
    font-size: 1.2em;
    color: rgba(255,255,255,0.7);
    font-style: italic;
    margin-bottom: 20px;
}

.modal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px 30px;
    margin-bottom: 24px;
    font-size: 1.1em;
    border-radius: 40px;
}

.modal-year {
    color: var(--accent-gold);
    font-weight: 600;
}

.modal-rating,
.modal-runtime,
.modal-country,
.modal-certification {
    color: #fff;
    display: flex;
    align-items: center;
    gap: 6px;
}

.modal-genres {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.modal-genre {
    background: rgba(255,255,255,0.15);
    padding: 8px 18px;
    border-radius: 30px;
    font-size: 0.95em;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
    backdrop-filter: blur(5px);
}

.modal-body-content {
    position: relative;
    z-index: 1;
    padding: 40px;
    background: var(--bg-card);
}

.modal-section {
    margin-bottom: 32px;
}

.modal-section h4 {
    font-size: 1.2em;
    color: var(--text-primary);
    margin-bottom: 16px;
    font-weight: 600;
    border-bottom: 2px solid var(--accent-gold);
    padding-bottom: 8px;
    display: inline-block;
}

.modal-overview {
    font-size: 1.05em;
    line-height: 1.7;
    color: var(--text-secondary);
}

.modal-cast {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 20px;
}

.modal-actor {
    text-align: center;
    transition: transform 0.2s;
}

.modal-actor:hover {
    transform: translateY(-4px);
}

.modal-actor img {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    border: 1px solid var(--border-color);
}

.modal-actor-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95em;
}

.modal-actor-character {
    font-size: 0.85em;
    color: var(--text-muted);
}

.modal-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    background: var(--bg-secondary);
    padding: 24px;
    border-radius: 16px;
    margin-bottom: 32px;
    border: 1px solid var(--border-color);
}

.modal-info-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.modal-info-item strong {
    color: var(--text-muted);
    font-size: 0.9em;
    font-weight: 500;
}

.modal-info-item span {
    font-size: 1.1em;
    color: var(--text-primary);
    font-weight: 600;
}

.modal-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.modal-keyword {
    background: var(--bg-secondary);
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.9em;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    transition: all 0.2s;
}

.modal-keyword:hover {
    background: var(--accent-gold);
    color: white;
    border-color: var(--accent-gold);
}

.modal-links {
    display: flex;
    gap: 16px;
    margin-top: 32px;
}

.modal-link {
    padding: 14px 28px;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
    font-size: 1em;
    letter-spacing: 0.02em;
}

.modal-link.tmdb {
    background: #032541;
    color: #fff;
    border: none;
}

.modal-link.imdb {
    background: #f5c518;
    color: #000;
    border: none;
}

.modal-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

/* ========== ЗАГРУЗКА ========== */
.loading {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-muted);
}

.spinner {
    width: 44px;
    height: 44px;
    margin: 20px auto;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-gold);
    border-radius: 50%;
    animation: spin 1s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-more {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    grid-column: 1 / -1;
}

.spinner-small {
    width: 32px;
    height: 32px;
    margin: 12px auto;
    border: 2px solid var(--border-color);
    border-top-color: var(--accent-gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* ========== КНОПКА НАВЕРХ ========== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 52px;
    height: 52px;
    border-radius: 30px;
    background: var(--accent-gold);
    color: white;
    border: none;
    font-size: 24px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: #d97706;
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.4);
}

/* ========== ФУТЕР ========== */
.site-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 48px 20px 36px;
    margin-top: 60px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.95em;
}

.footer-credits {
    margin: 16px 0 8px;
    color: var(--text-secondary);
}

.footer-credits a {
    color: var(--accent-tmdb);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.footer-credits a:hover {
    color: var(--accent-gold);
    text-decoration: underline;
}

.footer-small {
    font-size: 0.85em;
    color: var(--text-muted);
    opacity: 0.8;
}

/* ========== АДАПТИВНОСТЬ ========== */
@media (max-width: 900px) {
    .feed.grid-view {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 20px;
        padding: 0 16px;
    }
    
    .modal-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 30px;
    }
    
    .modal-poster {
        width: 160px;
    }
    
    .modal-meta {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .modal-genres {
        justify-content: center;
    }
}

@media (max-width: 700px) {
    .nav-container {
        justify-content: center;
        gap: 12px;
    }
    
    .search-container {
        max-width: 100%;
        width: 100%;
        order: 1;
    }
    
    .genre-filter {
        order: 2;
    }
    
    .nav-stats {
        order: 4;
        width: 100%;
        text-align: center;
    }
    
    .feed.grid-view {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 16px;
        margin: 20px auto;
    }
    
    .movie-grid-content {
        padding: 12px 10px;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 48px;
        height: 48px;
        font-size: 22px;
    }
}

@media (max-width: 500px) {
    .feed.grid-view {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 12px;
    }
    
    .movie-grid-title {
        font-size: 0.9em;
    }
    
    .rating-stars {
        padding: 3px 6px;
        font-size: 0.9em;
    }
    
    .modal-title {
        font-size: 1.8em;
    }
    
    .modal-meta {
        flex-direction: column;
        gap: 8px;
        padding: 12px 16px;
    }
    
    .modal-cast {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    }
    
    .modal-info-grid {
        grid-template-columns: 1fr;
        padding: 16px;
    }
}

/* Добавить в конец файла */

/* ========== ФИЛЬТР ПО РЕЙТИНГУ ========== */
.rating-filter {
    position: relative;
}

.rating-filter-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px 18px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 0.95em;
    white-space: nowrap;
    transition: all 0.2s;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 6px;
}

.rating-filter-btn:hover {
    border-color: var(--accent-gold);
    background: var(--hover-bg);
}

.rating-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    max-height: 320px;
    overflow-y: auto;
    min-width: 200px;
    display: none;
    z-index: 1000;
    padding: 8px 0;
}

.rating-dropdown.show {
    display: block;
}

.rating-option {
    padding: 10px 18px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-secondary);
    font-size: 0.95em;
}

.rating-option:hover {
    background: var(--hover-bg);
    padding-left: 24px;
}

.rating-option.active {
    background: var(--accent-gold);
    color: white;
    font-weight: 500;
}

/* Раскраска рейтингов */
.rating-option[data-rating="high"] {
    border-left: 3px solid #4caf50;
}

.rating-option[data-rating="medium"] {
    border-left: 3px solid #ffa500;
}

.rating-option[data-rating="low"] {
    border-left: 3px solid #ff6b6b;
}

/* Стили для рейтинга в карточке */
.rating-stars {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    transition: color 0.2s;
}

.rating-stars .rating-value {
    margin-left: 4px;
    font-weight: 600;
    color: var(--text-primary);
}

/* Адаптивность */
@media (max-width: 700px) {
    .rating-filter {
        order: 3;
    }
}

/* Съемочная группа - компактно */
.modal-crew {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.crew-item {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px;
    line-height: 1.5;
}

.crew-label {
    font-weight: 600;
    color: var(--accent-gold);
    min-width: 100px;
    font-size: 0.95em;
}

.crew-names {
    color: var(--text-secondary);
    font-size: 0.95em;
    flex: 1;
}

@media (max-width: 500px) {
    .crew-item {
        flex-direction: column;
        gap: 4px;
    }
    
    .crew-label {
        min-width: auto;
    }
}

/* Компактный info-grid */
.modal-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    background: var(--bg-secondary);
    padding: 16px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-bottom: 24px;
}

.info-item {
    display: flex;
    align-items: baseline;
    gap: 6px;
    font-size: 0.9em;
}

.info-label {
    color: var(--text-muted);
    font-weight: 500;
    white-space: nowrap;
}

.info-value {
    color: var(--text-primary);
    font-weight: 400;
    word-break: break-word;
}

/* Адаптивность */
@media (max-width: 500px) {
    .modal-info-grid {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 12px;
    }
}

/* ========== ЕДИНЫЙ СТИЛЬ ДЛЯ ПОЛНОЙ КАРТОЧКИ ========== */

/* Заголовок и мета-информация */
.modal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 24px;
    margin: 16px 0;
    border-radius: 8px;
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.meta-label {
    font-size: 0.75em;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: rgba(255,255,255,0.6);
}

.meta-value {
    font-size: 1em;
    font-weight: 500;
    color: #fff;
}

/* Жанры */
.modal-genres {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.genre-tag {
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 0.85em;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
}

/* Контентные блоки */
.content-block {
    margin-bottom: 28px;
}

.content-block h4 {
    font-size: 1em;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    letter-spacing: 0.02em;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 6px;
}

/* Сетка для информации */
.info-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--bg-secondary);
    padding: 16px;
    border-radius: 8px;
}

.info-row {
    display: flex;
    align-items: baseline;
    gap: 12px;
    font-size: 0.95em;
}

.info-row-label {
    min-width: 100px;
    color: var(--text-muted);
    font-weight: 500;
}

.info-row-value {
    color: var(--text-primary);
    flex: 1;
}

/* Сетка для актеров */
.cast-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 16px;
}

.cast-item {
    text-align: center;
}

.cast-item img {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 8px;
    border: 1px solid var(--border-color);
}

.cast-item-name {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.9em;
    line-height: 1.3;
}

.cast-item-character {
    font-size: 0.8em;
    color: var(--text-muted);
}

/* Ключевые слова */
.keywords-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.keyword-tag {
    background: var(--bg-secondary);
    padding: 4px 12px;
    font-size: 0.85em;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.keyword-tag:hover {
    background: var(--accent-gold);
    color: white;
    border-color: var(--accent-gold);
}

/* Ссылки */
.modal-links {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.modal-link {
    padding: 8px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9em;
    transition: all 0.2s;
}

.modal-link.tmdb {
    background: #032541;
    color: #fff;
}

.modal-link.imdb {
    background: #f5c518;
    color: #000;
}

.modal-link:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* Адаптивность */
@media (max-width: 700px) {
    .modal-meta {
        flex-direction: column;
        gap: 12px;
    }
    
    .meta-item {
        flex-direction: row;
        align-items: center;
        gap: 8px;
    }
    
    .meta-label {
        min-width: 60px;
    }
    
    .info-row {
        flex-direction: column;
        gap: 4px;
    }
    
    .info-row-label {
        min-width: auto;
    }
    
    .cast-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 12px;
    }
}