@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --bg-body: #0f1014;
    --bg-card: #181a20;
    --bg-darker: #0a0b0e;
    --bg-item: #1e2128;
    --accent: #4caf50;
    --accent-hover: #43a047;
    --text-main: #ffffff;
    --text-sec: #a0a0a0;
    --radius: 12px;
    --header-height: 70px;
	--ui-bg: #222;
    --ui-bg-darker: #111;
    --ui-bg-darkest: #000;
    --ui-bg-accent: #111;
    --ui-text-color-on-accent: #fff;
    --ui-bdc: #111;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; outline: none; }

html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }

.page__subtitle {
    font-size: clamp(16px, 1vw, 20px);
    color: var(--text-sec);
    margin-bottom: 25px;
}

/* SCROLLBAR */
::-webkit-scrollbar { width: 8px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-body); }
::-webkit-scrollbar-thumb { background: #333; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* --- HEADER --- */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 clamp(16px, 5%, 60px);
    height: var(--header-height);
    position: fixed;
    width: 100%;
    max-width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    background: rgba(15, 16, 20, 0.9);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: background 0.3s;
}

header.scrolled { background: rgba(15, 16, 20, 0.98); }

.logo { font-weight: 800; font-size: 22px; color: var(--text-main); display: flex; align-items: center; gap: 8px; flex-shrink: 0; z-index: 1001; }
.logo span { color: var(--accent); font-size: 26px; }

nav ul { display: flex; gap: 30px; list-style: none; }
nav a { color: rgba(255,255,255,0.7); font-weight: 500; font-size: 15px; transition: color 0.3s; position: relative; padding: 24px 0; white-space: nowrap; }
nav a:hover, nav a.active { color: white; }
nav a.active::after { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 3px; background: var(--accent); border-radius: 3px 3px 0 0; }

.actions { display: flex; align-items: center; gap: 16px; }

.search-bar { background: rgba(255,255,255,0.1); border: 1px solid transparent; padding: 10px 18px; border-radius: 20px; color: white; font-size: 14px; font-family: inherit; width: 220px; transition: all 0.3s; }
.search-bar:focus { background: rgba(0,0,0,0.5); border-color: var(--accent); width: 260px; }
.search-bar::placeholder { color: rgba(255,255,255,0.4); }

.btn-login { background: transparent; border: 1px solid rgba(255,255,255,0.3); color: white; padding: 8px 20px; border-radius: 8px; font-weight: 600; font-family: inherit; font-size: 14px; cursor: pointer; transition: 0.3s; white-space: nowrap; }
.btn-login:hover { border-color: white; background: rgba(255,255,255,0.1); }

.user-profile-btn { display: none; align-items: center; gap: 10px; cursor: pointer; padding: 4px 12px 4px 4px; background: rgba(255,255,255,0.05); border-radius: 20px; border: 1px solid rgba(255,255,255,0.1); transition: 0.3s; }
.user-profile-btn:hover { background: rgba(255,255,255,0.1); }
.user-avatar-mini { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; border: 2px solid var(--accent); }
.user-name-mini { font-size: 14px; font-weight: 600; color: white; }
.d-none {display: none;}

/* BURGER MENU */
.burger { display: none; flex-direction: column; justify-content: center; gap: 5px; width: 32px; height: 32px; cursor: pointer; z-index: 1001; background: none; border: none; padding: 4px; }
.burger span { display: block; width: 100%; height: 2.5px; background: white; border-radius: 2px; transition: all 0.3s ease; transform-origin: center; }
.burger.active span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.burger.active span:nth-child(2) { opacity: 0; }
.burger.active span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

.mobile-menu { display: none; position: fixed; top: var(--header-height); left: 0; width: 100%; height: calc(100vh - var(--header-height)); background: rgba(15, 16, 20, 0.97); backdrop-filter: blur(20px); z-index: 999; flex-direction: column; align-items: center; padding: 40px 20px; gap: 0; overflow-y: auto; }
.mobile-menu.open { display: flex; }
.mobile-menu a { color: rgba(255,255,255,0.8); font-size: 20px; font-weight: 600; padding: 18px 0; width: 100%; text-align: center; border-bottom: 1px solid rgba(255,255,255,0.05); }
.mobile-menu a:hover, .mobile-menu a.active { color: var(--accent); }
.mobile-search { width: 100%; margin-top: 20px; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.1); padding: 14px 20px; border-radius: 12px; color: white; font-size: 16px; font-family: inherit; }

/* --- MAIN CONTENT --- */
.main-content { max-width: 1240px; margin: 0 auto; padding: 60px clamp(20px, 5%, 60px); }

/* SECTION HEADER */
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; flex-wrap: wrap; gap: 15px; }
.section-title { font-size: clamp(20px, 2.5vw, 28px); font-weight: 700; display: flex; align-items: center; gap: 12px; margin-bottom: 15px;}
/*.section-title::before { content: ''; width: 4px; height: 28px; background: var(--accent); border-radius: 2px; display: block; }*/
.section-link { color: var(--text-sec); font-size: 14px; font-weight: 500; transition: color 0.3s; display: flex; align-items: center; gap: 6px; }
.section-link:hover { color: var(--accent); }

/* MOVIE GRID */
.movie-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 25px; margin-bottom: 70px; }

.movie-card { cursor: pointer; transition: transform 0.3s; position: relative; }
.movie-card:hover { transform: translateY(-8px); }

.card-poster-wrap { position: relative; border-radius: 12px; overflow: hidden; aspect-ratio: 2/3; margin-bottom: 12px; border: 1px solid rgba(255,255,255,0.05); }
.card-poster { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.movie-card:hover .card-poster { transform: scale(1.05); }

.card-overlay { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,0.8) 0%, transparent 60%); opacity: 0; transition: opacity 0.3s; display: flex; align-items: flex-end; padding: 15px; }
.movie-card:hover .card-overlay { opacity: 1; }

.card-play-btn { width: 50px; height: 50px; background: var(--accent); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 20px; color: white; box-shadow: 0 5px 20px rgba(76,175,80,0.5); }

.card-quality { position: absolute; top: 10px; left: 10px; background: rgba(0,0,0,0.8); color: white; font-size: 11px; font-weight: 700; padding: 4px 8px; border-radius: 4px; text-transform: uppercase; }
.card-rating { position: absolute; top: 10px; right: 10px; background: rgba(76,175,80,0.9); color: white; font-size: 12px; font-weight: 700; padding: 4px 8px; border-radius: 6px; }
.card-rating.low { background: rgba(244,67,54,0.9); }
.card-rating.mid { background: rgba(255,152,0,0.9); }

.card-title { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 6px; color: white; }
.card-meta { font-size: 13px; color: var(--text-sec); display: flex; justify-content: space-between; align-items: center; }
.card-genre {overflow: hidden;text-overflow: ellipsis; white-space: nowrap; max-width: 90%;}
.card-year { background: rgba(255,255,255,0.05); padding: 2px 8px; border-radius: 4px; font-size: 12px; }

/* CATEGORIES TABS */
.category-tabs { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 30px; overflow-x: auto; padding-bottom: 10px; }
.category-tab { padding: 10px 20px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: 20px; color: var(--text-sec); font-size: 14px; font-weight: 500; cursor: pointer; transition: all 0.3s; white-space: nowrap; }
.category-tab:hover, .category-tab.active { background: var(--accent); color: white; border-color: var(--accent); }

/* --- ПОДБОРКИ (COLLECTIONS) --- */
/* --- COLLECTIONS GRID --- */
.collections-grid {
max-width: 1240px;
margin: 0 auto;
padding: 0 20px 60px;
display: grid;
grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
gap: 25px;
}

.collection-card {
background: var(--bg-card);
border-radius: var(--radius);
overflow: hidden;
border: 1px solid rgba(255,255,255,0.05);
transition: 0.3s;
display: flex;
flex-direction: column;
}

.collection-card:hover {
border-color: var(--accent);
transform: translateY(-5px);
}

.collection-img {
width: 100%;
height: 200px;
object-fit: cover;
}

.collection-content {
padding: 20px;
flex-grow: 1;
}

.collection-title {
font-size: 20px;
font-weight: 700;
margin-bottom: 10px;
}

.collection-desc {color: var(--text-sec);font-size: 14px;margin-bottom: 15px;line-height: 1.5;overflow: hidden;text-overflow: ellipsis;display: -moz-box;-moz-box-orient: vertical;display: -webkit-box;-webkit-line-clamp: 4;-webkit-box-orient: vertical;line-clamp: 4;box-orient: vertical;}

.collection-footer {
padding: 0 20px 20px;
display: flex;
justify-content: space-between;
align-items: center;
}

.collection-count {
color: var(--accent);
font-size: 14px;
font-weight: 600;
}

.btn-view {
background: var(--bg-item);
color: white;
padding: 8px 16px;
border-radius: 6px;
font-size: 14px;
border: none;
cursor: pointer;
transition: 0.3s;
}
.btn-view:hover { background: var(--accent); }
		
/* --- SEO TEXT SECTION --- */
.seo-section { background: var(--bg-card); border-radius: var(--radius); padding: 50px clamp(20px, 5%, 60px); margin: 60px 0; border: 1px solid rgba(255,255,255,0.05); }
.seo-content { max-width: 900px; margin: 0 auto; }
.seo-title { font-size: clamp(24px, 3vw, 32px); font-weight: 700; margin-bottom: 25px; color: white; text-align: center; }
.seo-text { color: var(--text-sec); line-height: 1.8; font-size: 15px; margin-bottom: 20px; }
.seo-text h3 { color: white; font-size: 18px; margin: 30px 0 15px; font-weight: 600; }
.seo-text ul { list-style: none; padding-left: 0; }
.seo-text li { position: relative; padding-left: 25px; margin-bottom: 10px; color: var(--text-sec); }
.seo-text li::before { content: '✓'; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.seo-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 25px; margin-top: 40px; }
.seo-feature { text-align: center; padding: 25px; background: rgba(255,255,255,0.02); border-radius: 12px; border: 1px solid rgba(255,255,255,0.05); transition: 0.3s; }
.seo-feature:hover { background: rgba(255,255,255,0.05); border-color: rgba(76,175,80,0.3); }
.seo-feature-icon { font-size: 40px; margin-bottom: 15px; }
.seo-feature-title { font-size: 16px; font-weight: 600; color: white; margin-bottom: 8px; }
.seo-feature-desc { font-size: 13px; color: var(--text-sec); line-height: 1.5; }

/* --- FOOTER --- */
footer { background-color: var(--bg-darker); border-top: 1px solid rgba(255,255,255,0.05); padding: 50px 0 25px; margin-top: 80px; }
.footer-content { max-width: 1240px; margin: 0 auto 40px; padding: 0 20px; display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; }
.footer-col h5 { color: white; font-size: 15px; font-weight: 700; margin-bottom: 18px; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { color: var(--text-sec); font-size: 14px; transition: color 0.3s; }
.footer-col a:hover { color: var(--accent); }
.footer-logo { font-size: 22px; font-weight: 800; color: white; margin-bottom: 12px; display: inline-block; }
.footer-logo span { color: var(--accent); }
.footer-desc { color: var(--text-sec); font-size: 14px; line-height: 1.6; max-width: 300px; }
.footer-bottom { max-width: 1240px; margin: 0 auto; padding: 20px 20px 0; border-top: 1px solid rgba(255,255,255,0.05); display: flex; justify-content: space-between; align-items: center; color: #555; font-size: 13px; flex-wrap: wrap; gap: 10px; }

/* ======================= */
/* FULLSTORY & TOP LIST STYLES (Объединенные) */
/* ======================= */

/* HERO PAGE (Fullstory) */
.backdrop { height: 90vh; position: absolute; top: 0; left: 0; width: 100%; background-size: cover; z-index: 0; background-position: center top; }
.backdrop::after { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(0deg, var(--bg-body) 10%, rgba(15,16,20,0.8) 60%, rgba(15,16,20,0.5) 100%); }

.movie-container { max-width: 1240px; width: 100%; margin: 0 auto; padding: calc(var(--header-height) + 60px) 20px 50px; display: flex; gap: 50px; position: relative; z-index: 10; overflow-x: hidden; }
.poster-area { flex-shrink: 0; width: 300px; }
.poster { width: 100%; border-radius: var(--radius); box-shadow: 0 20px 40px rgba(0,0,0,0.6); border: 1px solid rgba(255,255,255,0.1); aspect-ratio: 2/3; object-fit: cover; }
.btn-block { display: flex; flex-direction: column; gap: 12px; margin-top: 25px; }

.btn { padding: 14px 28px; border-radius: 10px; border: none; cursor: pointer; font-weight: 700; font-size: 15px; font-family: inherit; display: inline-flex; align-items: center; justify-content: center; gap: 10px; transition: all 0.3s; }
.btn-primary, .btn-play { background-color: var(--accent); color: white; box-shadow: 0 10px 30px rgba(76, 175, 80, 0.3); }
.btn-primary:hover, .btn-play:hover { background-color: var(--accent-hover); transform: translateY(-2px); }
.btn-secondary, .btn-trailer { background-color: rgba(255,255,255,0.1); color: white; backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.1); }
.btn-bookmark { background: #2a2d35; color: #fff; border: 1px solid rgba(255,255,255,0.1); }

.info-area { flex-grow: 1; padding-top: 10px; min-width: 0; }
.movie-title { font-size: clamp(28px, 5vw, 52px); font-weight: 800; line-height: 1.1; margin-bottom: 10px; text-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.original-title { font-size: clamp(16px, 2vw, 20px); color: var(--text-sec); margin-bottom: 25px; }

.meta-tags { display: flex; gap: 12px; align-items: center; margin-bottom: 30px; font-size: 14px; flex-wrap: wrap; }
.quality { background: white; color: black; font-weight: 800; padding: 4px 8px; border-radius: 4px; font-size: 12px; }
.rating-box { display: flex; gap: 12px; font-size: 15px; align-items: center; }
.kp { color: #ff6600; font-weight: 800; }
.imdb { color: #f5c518; font-weight: 800; }

.movie-feedback { display: flex; gap: 8px; margin-left: 5px; align-items: center; }
.feedback-btn { background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 20px; padding: 6px 12px; color: var(--text-sec); cursor: pointer; display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; transition: all 0.2s; }
.feedback-btn:hover { background: rgba(255, 255, 255, 0.1); transform: translateY(-1px); }
.like-btn:hover { color: #4caf50; border-color: rgba(76, 175, 80, 0.3); }
.dislike-btn:hover { color: #f44336; border-color: rgba(244, 67, 54, 0.3); }

.description { color: #e0e0e0; line-height: 1.7; font-size: clamp(15px, 1.5vw, 17px); margin-bottom: 40px; max-width: 850px; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 20px; margin-bottom: 50px; background: rgba(255,255,255,0.03); padding: 20px; border-radius: var(--radius); border: 1px solid rgba(255,255,255,0.05); }
.stat-item h4 { color: var(--text-sec); font-size: 12px; margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.5px; }
.stat-item p { font-weight: 600; font-size: 14px; }

/* CAST */
.cast-list { display: flex; gap: 20px; overflow-x: auto; padding-bottom: 20px; margin-bottom: 50px; scroll-snap-type: x proximity; }
.cast-member { text-align: center; min-width: 95px; flex-shrink: 0; cursor: pointer; transition: 0.3s; scroll-snap-align: start; }
.cast-img-wrap { width: 80px; height: 80px; margin: 0 auto 10px; position: relative; }
.cast-img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255,255,255,0.1); transition: all 0.3s ease; }
.cast-member:hover .cast-img { border-color: var(--accent); transform: scale(1.05); box-shadow: 0 0 20px rgba(76, 175, 80, 0.4); }
.cast-name { font-size: 13px; color: white; font-weight: 600; line-height: 1.3; }
.cast-role { font-size: 11px; color: var(--text-sec); margin-top: 4px; }
/* Description button */
.show-text.btn {
    position: relative;
    display: flex;
    align-items: flex-end;
    width: 100%;
    height: 80px; /* Высота градиента затемнения */
    margin-top: -60px; /* Наезжаем кнопкой на текст */
    padding-bottom: 25px;
    padding-top: 40px;
    background: linear-gradient(to bottom, rgb(20 24 28 / 0%) 0%, rgb(20 24 28 / 47%) 90%, rgb(20 24 28 / 0%) 90%)
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    outline: none;
    z-index: 2;
    transition: color 0.3s ease;
}
.show-text.btn::after {
    content: '';
    display: inline-block;
    margin-left: 8px;
    margin-bottom: 4px;
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.3s ease;
}
 
/* PLAYER */
.player-wrapper { margin-bottom: 60px; background: var(--bg-card); border-radius: var(--radius); overflow: hidden; border: 1px solid rgba(255,255,255,0.05); box-shadow: 0 20px 50px rgba(0,0,0,0.5); width: 100%; }
.player-tabs { display: flex; background: rgba(0,0,0,0.3); border-bottom: 1px solid rgba(255,255,255,0.05); overflow-x: auto; }
.tab { padding: 16px 24px; cursor: pointer; color: var(--text-sec); font-weight: 600; border-bottom: 3px solid transparent; transition: all 0.3s; font-size: 14px; white-space: nowrap; flex-shrink: 0; }
.tab:hover { color: rgba(255,255,255,0.9); background: rgba(255,255,255,0.03); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); background: linear-gradient(180deg, transparent, rgba(76, 175, 80, 0.05)); }
.iframe-container { position: relative; padding-bottom: 56.25%; height: 0; background: black; }

   /* SIMILAR GRID */
.similar-section { margin-bottom: 60px; max-width: 100%; overflow-x: hidden; }
.similar-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
gap: 20px;
width: 100%;
}
.movie-card {
cursor: pointer;
transition: transform 0.3s;
-webkit-tap-highlight-color: transparent;
}
.movie-card:hover { transform: translateY(-8px); }
.card-poster-related {
width: 100%;
aspect-ratio: 2/3;
border-radius: 10px;
object-fit: cover;
margin-bottom: 10px;
border: 1px solid rgba(255,255,255,0.05);
transition: all 0.3s;
}
.movie-card:hover .card-poster {
border-color: var(--accent);
box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.card-title {
font-size: 14px;
font-weight: 700;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.card-meta {
font-size: 13px;
color: var(--text-sec);
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 6px;
}
.card-rating {
color: var(--accent);
font-weight: 700;
background: rgba(76,175,80,0.1);
padding: 2px 6px;
border-radius: 4px;
font-size: 12px;
}

/* TOP LIST (Category) */
.top-list { max-width: 1240px; margin: 0 auto; padding: 0 20px 60px; }
.top-item { display: grid; grid-template-columns: 80px 140px 1fr auto; gap: 25px; background: var(--bg-item); border-radius: var(--radius); padding: 20px; margin-bottom: 15px; border: 1px solid rgba(255,255,255,0.05); transition: all 0.3s; align-items: center; }
.top-item:hover { background: rgba(30,33,40,0.8); border-color: rgba(76,175,80,0.3); transform: translateX(5px); }
.item-rank { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.rank-number { font-size: 32px; font-weight: 800; color: var(--text-sec); line-height: 1; }
.top-item:nth-child(1) .rank-number { color: #ffd700; }
.top-item:nth-child(2) .rank-number { color: #c0c0c0; }
.top-item:nth-child(3) .rank-number { color: #cd7f32; }
.rank-badge { display: flex; align-items: center; gap: 4px; background: rgba(76,175,80,0.15); color: var(--accent); padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.rank-badge::before { content: '⚡'; font-size: 12px; }
.item-poster { position: relative; border-radius: 8px; overflow: hidden; aspect-ratio: 2/3; cursor: pointer; }
.item-poster img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.item-info { min-width: 0; }
.item-title { font-size: 18px; font-weight: 700; margin-bottom: 8px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.item-title a:hover { color: var(--accent); }
.item-year { background: rgba(255,255,255,0.1); padding: 2px 8px; border-radius: 4px; font-size: 13px; font-weight: 500; color: var(--text-sec); }
.item-description { color: var(--text-sec); font-size: 14px; line-height: 1.6; margin-bottom: 15px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item-meta { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.item-ratings { display: flex; gap: 15px; align-items: center; }
.rating-kp { color: #ff6600; font-weight: 700; font-size: 15px; }
.rating-kp::before { content: 'КП: '; color: var(--text-sec); font-weight: 400; font-size: 13px; }
.rating-imdb { color: #f5c518; font-weight: 700; font-size: 15px; }
.rating-imdb::before { content: 'IMDb: '; color: var(--text-sec); font-weight: 400; font-size: 13px; }
.user-rating { background: var(--accent); color: white; padding: 4px 12px; border-radius: 6px; font-weight: 700; font-size: 14px; }
.item-actions { display: flex; gap: 10px; flex-shrink: 0; }
.btn-watch { background: var(--accent); color: white; border: none; padding: 10px 20px; border-radius: 8px; font-weight: 600; font-size: 14px; cursor: pointer; transition: 0.3s; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.btn-watch:hover { background: var(--accent-hover); transform: translateY(-2px); }
.btn-bookmark { background: rgba(255,255,255,0.05); color: var(--text-sec); border: 1px solid rgba(255,255,255,0.1); padding: 10px 14px; border-radius: 8px; cursor: pointer; transition: 0.3s; font-size: 18px; }

/* COMMENTS */
.comments-section { max-width: 900px; width: 100%; overflow-x: hidden; }
.comment-input-block { background: var(--bg-card); padding: 20px; border-radius: var(--radius); margin-bottom: 35px; border: 1px solid rgba(255,255,255,0.05); }
.comment-input-block textarea { width: 100%; background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.1); color: white; padding: 14px; border-radius: 8px; resize: vertical; min-height: 90px; font-family: inherit; font-size: 15px; margin-bottom: 12px; transition: 0.3s; }
.comment-input-block textarea:focus { border-color: var(--accent); background: rgba(0,0,0,0.5); }
.comment-input-block button { padding: 10px 24px; background: var(--accent); border: none; color: white; border-radius: 6px; font-weight: 600; cursor: pointer; font-size: 14px; font-family: inherit; transition: 0.3s; }
.comment-input-block button:hover { background: var(--accent-hover); }
.comment-item { display: flex; gap: 16px; margin-bottom: 25px; }
.comm-avatar { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 2px solid var(--bg-card); }
.comm-body { flex-grow: 1; min-width: 0; background: rgba(255,255,255,0.02); padding: 14px; border-radius: 0 12px 12px 12px; border: 1px solid rgba(255,255,255,0.03); }
.comm-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.comm-name { font-weight: 700; font-size: 15px; color: white; }
.comm-time { font-size: 12px; color: #666; }
.comm-text { font-size: 14px; color: #ddd; line-height: 1.6; margin-bottom: 10px; word-wrap: break-word; overflow-wrap: break-word; }
.comm-actions { display: flex; gap: 18px; font-size: 13px; font-weight: 600; color: var(--text-sec); align-items: center; }
.comm-action { cursor: pointer; transition: color 0.2s; display: flex; align-items: center; gap: 5px; }

/* MODAL WINDOW STYLES */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(8px); z-index: 2000; display: flex; justify-content: center; align-items: center; opacity: 0; pointer-events: none; transition: opacity 0.3s ease; }
.modal-overlay.active { opacity: 1; pointer-events: all; }
.modal-window { background: var(--bg-card); width: 100%; max-width: 420px; border-radius: 16px; border: 1px solid rgba(255,255,255,0.1); box-shadow: 0 20px 60px rgba(0,0,0,0.5); position: relative; overflow: hidden; transform: translateY(20px); transition: transform 0.3s ease; padding: 30px; }
.modal-overlay.active .modal-window { transform: translateY(0); }
.modal-close { position: absolute; top: 15px; right: 15px; background: transparent; border: none; color: var(--text-sec); font-size: 24px; cursor: pointer; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 50%; transition: 0.2s; }
.modal-close:hover { background: rgba(255,255,255,0.1); color: white; }
.modal-title { font-size: 24px; font-weight: 700; margin-bottom: 25px; text-align: center; }
.auth-tabs { display: flex; background: rgba(0,0,0,0.2); border-radius: 8px; padding: 4px; margin-bottom: 25px; }
.auth-tab { flex: 1; text-align: center; padding: 10px; cursor: pointer; border-radius: 6px; font-weight: 600; font-size: 14px; color: var(--text-sec); transition: 0.3s; }
.auth-tab.active { background: var(--bg-card); color: white; box-shadow: 0 2px 10px rgba(0,0,0,0.2); }
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 13px; color: var(--text-sec); margin-bottom: 8px; }
.form-input { width: 100%; background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.1); padding: 12px 15px; border-radius: 8px; color: white; font-size: 14px; font-family: inherit; transition: 0.3s; }
.form-input:focus { border-color: var(--accent); background: rgba(0,0,0,0.5); }
.btn-submit { width: 100%; padding: 14px; background: var(--accent); color: white; border: none; border-radius: 8px; font-weight: 700; font-size: 15px; cursor: pointer; transition: 0.3s; margin-top: 10px; }
.btn-submit:hover { background: var(--accent-hover); }
.profile-content { text-align: center; display: none; }
.profile-content.active { display: block; }
.profile-avatar { width: 100px; height: 100px; border-radius: 50%; object-fit: cover; border: 3px solid var(--accent); margin-bottom: 15px; }
.profile-name { font-size: 20px; font-weight: 700; margin-bottom: 5px; }
.profile-email { color: var(--text-sec); font-size: 14px; margin-bottom: 25px; }
.profile-actions { display: flex; flex-direction: column; gap: 10px; }
.btn-profile-action { padding: 12px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); color: white; border-radius: 8px; cursor: pointer; transition: 0.3s; font-weight: 600; text-decoration: none; }
.btn-profile-action:hover { background: rgba(255,255,255,0.1); }
.btn-logout { border-color: rgba(244, 67, 54, 0.3); color: #ff6b6b; }
.btn-logout:hover { background: rgba(244, 67, 54, 0.1); }
.auth-form-content { display: block; }
.auth-form-content.hidden { display: none; }

/* PAGINATION */
/* --- PAGINATION (DLE Navigation) --- */
.pagination {
    max-width: 1240px;
    width: 440px;
	margin: 0 auto 60px;
    padding: 0 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Стили для ссылок, которые генерирует DLE внутри {pages} */
.pagination a {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    color: var(--text-sec);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: 0.3s;
    text-decoration: none;
}

.pagination a:hover {
    background: rgba(255,255,255,0.1);
    color: white;
    border-color: rgba(255,255,255,0.2);
}

/* Стили для ТЕКУЩЕЙ страницы (DLE выводит её как <span>) */
.pagination span {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 8px;
    color: white;
    font-weight: 600;
    font-size: 14px;
    cursor: default;
    text-decoration: none;
}

/* Стили для наших кнопок Назад/Вперед */
.page-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    color: var(--text-sec);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: 0.3s;
}

.page-btn:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

/* Адаптивность для мобильных */
@media (max-width: 600px) {
    .pagination {
        gap: 5px;
    }
    .pagination a, .pagination span, .page-btn {
        width: 38px;
        height: 38px;
        font-size: 13px;
    }
}
/* --- TOP LIST STYLES (Static Page) --- */
 /* --- PAGE HERO --- */
        .page-hero {
            background: linear-gradient(180deg, rgba(76,175,80,0.15) 0%, transparent 100%);
            padding: calc(var(--header-height) + 40px) 0 40px;
            text-align: center;
            margin-bottom: 40px;
        }

        .page-hero-content {
            max-width: 1240px;
            margin: 0 auto;
            padding: 0 20px;
        }

        .page-title {
            font-size: clamp(28px, 4vw, 48px);
            font-weight: 800;
            margin-bottom: 15px;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 15px;
            flex-wrap: wrap;
        }

        .page-title .trophy {
            font-size: clamp(32px, 5vw, 56px);
        }

        .page-subtitle {
            color: var(--text-sec);
            font-size: clamp(14px, 2vw, 16px);
            max-width: 600px;
            margin: 0 auto;
            line-height: 1.6;
        }

        /* --- FILTERS --- */
        .filters-bar {
            max-width: 1240px;
            margin: 0 auto 30px;
            padding: 0 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 15px;
        }

        .filter-group {
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
            align-items: center;
        }

        .filter-label {
            color: var(--text-sec);
            font-size: 14px;
            font-weight: 500;
        }

        .filter-select {
            background: var(--bg-card);
            border: 1px solid rgba(255,255,255,0.1);
            color: white;
            padding: 10px 16px;
            border-radius: 8px;
            font-size: 14px;
            font-family: inherit;
            cursor: pointer;
            transition: 0.3s;
        }

        .filter-select:hover, .filter-select:focus {
            border-color: var(--accent);
        }

        .filter-select option {
            background: var(--bg-card);
            color: white;
        }

        .view-toggle {
            display: flex;
            gap: 5px;
            background: var(--bg-card);
            padding: 4px;
            border-radius: 8px;
            border: 1px solid rgba(255,255,255,0.1);
        }

        .view-btn {
            padding: 8px 12px;
            background: transparent;
            border: none;
            color: var(--text-sec);
            cursor: pointer;
            border-radius: 6px;
            transition: 0.3s;
            font-size: 16px;
        }

        .view-btn.active {
            background: var(--accent);
            color: white;
        }

        .view-btn:hover:not(.active) {
            background: rgba(255,255,255,0.1);
        }

        /* --- TOP LIST --- */
        .top-list {
            max-width: 1240px;
            margin: 0 auto;
            padding: 0 20px 60px;
            display: flex;
            flex-direction: column;
            gap: 15px;
        }
		
/* Автоматическая нумерация элементов */
.top-list {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px 60px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    counter-reset: top-counter; /* Инициализация счетчика */
}

.top-item {
    display: grid;
    grid-template-columns: 80px 140px 1fr auto;
    gap: 25px;
    background: var(--bg-item);
    border-radius: var(--radius);
    padding: 20px;
    border: 1px solid rgba(255,255,255,0.05);
    transition: all 0.3s;
    align-items: center;
    counter-increment: top-counter; /* Увеличение счетчика */
}

/* Вывод числа в элемент через CSS */
.top-item .rank-number::before {
    content: counter(top-counter);
}

/* Раскраска первых 3 мест */
.top-item:nth-child(1) .rank-number { color: #ffd700; }
.top-item:nth-child(2) .rank-number { color: #c0c0c0; }
.top-item:nth-child(3) .rank-number { color: #cd7f32; }

/* Hover эффект */
.top-item:hover {
    background: rgba(30,33,40,0.8);
    border-color: rgba(76,175,80,0.3);
}

/* Элементы ранга */
.item-rank {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
}
.rank-number {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-sec);
    line-height: 1;
}

/* Плагин favorites DLE генерирует ссылку, стилизуем её как кнопку */
.top-item .item-actions a[id^="fav-id"] {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 18px;
    color: var(--text-sec);
    transition: 0.3s;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.top-item .item-actions a[id^="fav-id"]:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

/* ============================ */
/* HERO SECTION WITH BACKGROUND */
/* ============================ */
.hero {
    position: relative;
    overflow: hidden;
    margin-top: var(--header-height);
}

.hero-background {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 0; overflow: hidden;
}
.hero-background-img {
    width: 100%; height: 100%;
    object-fit: cover; object-position: center top;
    filter: blur(2px) brightness(0.45);
    transform: scale(1.05);
    transition: opacity 0.8s ease;
}
.hero-background::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(15,16,20,0.3) 0%, rgba(15,16,20,0.7) 60%, var(--bg-body) 100%);
    z-index: 1;
}
.hero-background::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(90deg, rgba(15,16,20,0.85) 0%, rgba(15,16,20,0.3) 50%, rgba(15,16,20,0.85) 100%);
    z-index: 1;
}

/* POPULAR WEEK SLIDER SECTION */
.hero-slider {
    position: relative; z-index: 10;
    padding: 50px 0 60px;
}
.hero-slider-header {
    max-width: 1240px; margin: 0 auto;
    padding: 0 clamp(20px, 5%, 60px);
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 30px;
}
.hero-slider-title {
    font-size: clamp(22px, 3vw, 32px); font-weight: 800;
    display: flex; align-items: center; gap: 14px;
    text-shadow: 0 4px 20px rgba(0,0,0,0.6);
}
.hero-slider-title .fire-icon { font-size: 28px; animation: firePulse 2s ease-in-out infinite; }
@keyframes firePulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.15); } }
.hero-slider-badge {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(76, 175, 80, 0.15); border: 1px solid rgba(76, 175, 80, 0.35);
    color: var(--accent); padding: 6px 16px; border-radius: 20px;
    font-size: 13px; font-weight: 600; text-shadow: none;
}

/* Slider Container */
.slider-wrapper { position: relative; max-width: 100%; overflow: visible; }
.slider-container {
    max-width: 1240px; margin: 0 auto;
    padding: 0 clamp(20px, 5%, 60px);
    position: relative;
}
.slider-track {
    display: flex; gap: 20px;
    overflow-x: auto; scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 10px 0 20px;
    counter-reset: slide-counter; /* Инициализация счетчика */
}
/* Скрываем скроллбар, но оставляем функционал */
.slider-track::-webkit-scrollbar { height: 4px; }
.slider-track::-webkit-scrollbar-track { background: rgba(255,255,255,0.03); border-radius: 2px; margin: 0 20px; }
.slider-track::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 2px; }
.slider-track::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* Slider Navigation Buttons */
.slider-btn {
    position: absolute; top: 50%; transform: translateY(-60%);
    width: 48px; height: 48px;
    background: rgba(15, 16, 20, 0.85); backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.12); border-radius: 50%;
    color: white; font-size: 20px; cursor: pointer; z-index: 20;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.3s; box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
.slider-btn:hover { background: var(--accent); border-color: var(--accent); box-shadow: 0 6px 30px rgba(76,175,80,0.4); }
.slider-btn:active { transform: translateY(-60%) scale(0.92); }
.slider-btn-prev { left: clamp(8px, 2%, 24px); }
.slider-btn-next { right: clamp(8px, 2%, 24px); }

/* Individual Slider Card */
.slider-card {
    flex: 0 0 auto;
    width: calc((100% - 100px) / 6); /* Показываем 6 карточек */
    min-width: 160px;
    scroll-snap-align: start;
    cursor: pointer;
    transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    counter-increment: slide-counter; /* Увеличиваем счетчик для каждого слайда */
}
.slider-card:hover { transform: translateY(-10px) scale(1.02); z-index: 5; }

.slider-poster-wrap {
    position: relative; border-radius: 14px; overflow: hidden;
    aspect-ratio: 2/3; margin-bottom: 14px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.5);
    border: 2px solid rgba(255,255,255,0.06);
    transition: border-color 0.3s, box-shadow 0.3s;
}
.slider-card:hover .slider-poster-wrap { border-color: rgba(76,175,80,0.4); box-shadow: 0 12px 40px rgba(0,0,0,0.6), 0 0 20px rgba(76,175,80,0.15); }

.slider-poster { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.slider-card:hover .slider-poster { transform: scale(1.08); }

.slider-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(0deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.2) 40%, transparent 70%);
    opacity: 0; transition: opacity 0.35s;
    display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
    padding-bottom: 16px;
}
.slider-card:hover .slider-overlay { opacity: 1; }

.slider-play-btn {
    width: 48px; height: 48px; background: var(--accent); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; color: white; text-decoration: none;
    box-shadow: 0 5px 20px rgba(76,175,80,0.5); margin-bottom: 8px;
    transform: translateY(10px); transition: transform 0.3s;
}
.slider-card:hover .slider-play-btn { transform: translateY(0); }

.slider-quality {
    position: absolute; top: 10px; left: 10px;
    background: rgba(0,0,0,0.75); color: white; font-size: 10px; font-weight: 700;
    padding: 4px 8px; border-radius: 5px; text-transform: uppercase; backdrop-filter: blur(4px);
}
.slider-rating {
    position: absolute; top: 10px; right: 10px;
    background: rgba(76,175,80,0.9); color: white; font-size: 12px; font-weight: 700;
    padding: 4px 9px; border-radius: 6px; box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* Автоматическая нумерация через CSS */
.slider-position {
    position: absolute; bottom: -8px; left: 12px;
    font-size: 48px; font-weight: 900;
    color: rgba(255,255,255,0.08); line-height: 1;
    pointer-events: none; text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}
.slider-position::before { content: counter(slide-counter); }

.slider-title {
    font-size: 13px; font-weight: 700;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    margin-bottom: 4px; color: white; padding: 0 2px;
}
.slider-title a { color: inherit; }
.slider-meta {
    font-size: 12px; color: var(--text-sec);
    display: flex; justify-content: space-between; align-items: center; padding: 0 2px;
}
.slider-genre { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60%; }
.slider-year { background: rgba(255,255,255,0.06); padding: 2px 7px; border-radius: 4px; font-size: 11px; flex-shrink: 0; }

/* Responsive Slider */
@media (max-width: 1100px) { .slider-card { width: calc((100% - 80px) / 5); } }
@media (max-width: 900px) { .slider-card { width: calc((100% - 60px) / 4); } .slider-btn { width: 40px; height: 40px; } }
@media (max-width: 600px) {
    .slider-card { width: calc((100% - 30px) / 3); min-width: 110px; }
    .slider-track { gap: 12px; }
    .slider-title { font-size: 11px; }
    .slider-play-btn { width: 38px; height: 38px; font-size: 14px; }
    .slider-btn { width: 34px; height: 34px; font-size: 14px; }
    .hero-slider-title { font-size: 20px; }
    .hero-slider { padding: 30px 0 40px; }
    .slider-position { font-size: 32px; }
}
@media (max-width: 380px) { .slider-card { width: calc((100% - 20px) / 2); min-width: 100px; } }
@media (hover: none) {
    .slider-card:hover { transform: none; }
    .slider-card:hover .slider-poster { transform: none; }
    .slider-card:hover .slider-overlay { opacity: 0; }
}

/* ======================= */
/* GRID VIEW MODE */
/* ======================= */

.top-list.grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

/* Превращаем строку в карточку для Grid View */
.top-list.grid-view .top-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 15px;
    position: relative;
}

/* Ранг в Grid View */
.top-list.grid-view .item-rank {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0,0,0,0.6);
    padding: 5px 10px;
    border-radius: 8px;
    z-index: 1;
    backdrop-filter: blur(4px);
}

/* Постер в Grid View */
.top-list.grid-view .item-poster {
    width: 100%;
    aspect-ratio: 2/3;
    margin-bottom: 10px;
}

/* Скрываем описание в сетке */
.top-list.grid-view .item-description {
    display: none;
}

/* Кнопки в Grid View */
.top-list.grid-view .item-actions {
    width: 100%;
    margin-top: auto;
}

/* ======================= */
/* RESPONSIVE for TOP LIST */
/* ======================= */

@media (max-width: 1100px) {
    .top-item {
        grid-template-columns: 60px 120px 1fr;
        gap: 20px;
    }
    .item-actions {
        grid-column: 2 / -1;
        justify-content: flex-start;
        margin-top: 10px;
    }
}

@media (max-width: 900px) {
    .top-item {
        grid-template-columns: 50px 100px 1fr;
        gap: 15px;
        padding: 15px;
    }
    .rank-number { font-size: 24px; }
}

@media (max-width: 600px) {
    .top-item {
        grid-template-columns: 45px 80px 1fr;
        gap: 12px;
        padding: 12px;
    }
    .rank-number { font-size: 20px; }
    
    .item-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .item-actions {
        flex-direction: row;
        width: 100%;
        justify-content: space-between;
    }
}

@media (hover: none) {
    .top-item:hover {
        transform: none;
    }
}

/* ======================= */
/* RESPONSIVE BREAKPOINTS */
/* ======================= */

@media (max-width: 1100px) {
    .top-item { grid-template-columns: 60px 120px 1fr; gap: 20px; }
    .item-actions { grid-column: 2 / -1; justify-content: flex-start; margin-top: 10px; }
    .search-bar { width: 180px; }
    .search-bar:focus { width: 200px; }
    .footer-content { grid-template-columns: 1fr 1fr; }
    .movie-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 20px; }
    .movie-container { gap: 40px; }
    .poster-area { width: 260px; }
}

@media (max-width: 900px) {
    :root { --header-height: 60px; }

    .top-item { grid-template-columns: 50px 100px 1fr; gap: 15px; padding: 15px; }
    .rank-number { font-size: 24px; }
    .item-title { font-size: 16px; }
    .item-description { -webkit-line-clamp: 2; }

    nav { display: none; }
    .actions { display: none; }
    .burger { display: flex; }
    
    .movie-container { flex-direction: column; align-items: center; gap: 30px; }
    .poster-area { width: 100%; max-width: 320px; margin: 0 auto; }
    .info-area { padding-top: 0; max-width: 335px;}
    .movie-title { text-align: center; }
    .original-title { text-align: center; }
    .meta-tags { justify-content: center; }
    .description { text-align: center; margin-left: auto; margin-right: auto; }
    .btn-block { flex-direction: row; flex-wrap: wrap; justify-content: center; }
    .btn-block .btn { flex: 1; min-width: 140px; }
    .backdrop { height: 55vh; }
    
    
    .hero-content { padding: 40px 20px; }
    .seo-features { grid-template-columns: 1fr 1fr; }
    
    .footer-content { grid-template-columns: 1fr 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .similar-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 16px; }
}

@media (max-width: 600px) {
    :root { --header-height: 56px; }

    .logo { font-size: 18px; }
    .logo span { font-size: 22px; }

    
    .hero-content { padding: 30px 16px; }
    .hero-title { font-size: 28px; }
    .hero-description { font-size: 14px; -webkit-line-clamp: 2; }
    .hero-buttons { flex-direction: column; width: 100%; }
    .hero-buttons .btn { width: 100%; }
    
    .main-content { padding: 40px 16px; }
    .section-header { flex-direction: column; align-items: flex-start; gap: 10px; }
    
    .top-item { grid-template-columns: 45px 80px 1fr; gap: 12px; padding: 12px; }
    .rank-number { font-size: 20px; }
    .rank-badge { font-size: 10px; padding: 3px 8px; }
    .item-poster { aspect-ratio: 2/3; }
    .item-title { font-size: 15px; }
    .item-year { font-size: 12px; }
    .item-description { font-size: 13px; -webkit-line-clamp: 2; margin-bottom: 10px; }
    .item-meta { flex-direction: column; align-items: flex-start; gap: 10px; }
    .item-ratings { gap: 10px; }
    .rating-kp, .rating-imdb { font-size: 14px; }
    .item-actions { width: 100%; justify-content: space-between; }
    .btn-watch { padding: 8px 16px; font-size: 13px; flex: 1; justify-content: center; }
    .btn-bookmark { padding: 8px 12px; }

    .pagination { gap: 5px; }
    .page-btn { width: 38px; height: 38px; font-size: 13px; }

    .footer-content { grid-template-columns: 1fr; text-align: center; }
    .footer-desc { margin: 0 auto; }
    .footer-bottom { flex-direction: column; text-align: center; }

    .movie-container { padding: calc(var(--header-height) + 30px) 16px 30px; gap: 24px; }
    .poster-area { max-width: 240px; }
    .btn-block { flex-direction: column; }
    .btn-block .btn { min-width: 100%; font-size: 14px; padding: 14px; }
    .movie-title { font-size: 26px; text-align: left; }
    .original-title { font-size: 15px; text-align: left; }
    .meta-tags { justify-content: flex-start; font-size: 13px; gap: 8px; }
    .description { font-size: 14px; text-align: left; margin-bottom: 30px; }
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 16px; padding: 16px; }
    .stat-item h4 { font-size: 11px; }
    .stat-item p { font-size: 13px; }
    .section-title { font-size: 18px; margin-bottom: 18px; }
    .section-title::before { height: 20px; width: 3px; }
    .cast-list { gap: 14px; margin-bottom: 35px; }
    .cast-img-wrap { width: 65px; height: 65px; }
    .cast-member { min-width: 80px; }
    .cast-name { font-size: 12px; }
    .cast-role { font-size: 10px; }
    .tab { padding: 14px 18px; font-size: 13px; }
    .similar-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
    .card-title { font-size: 13px; }
    .card-meta { font-size: 12px; }
    .movie-card:hover { transform: none; }
    
    .comment-item { gap: 12px; }
    .comm-avatar { width: 38px; height: 38px; }
    .comm-body { padding: 12px; }
    .comm-name { font-size: 14px; }
    .comm-text { font-size: 13px; }
    .comm-actions { font-size: 12px; gap: 10px; }
    .comment-input-block { padding: 16px; }
    .comment-input-block textarea { font-size: 14px; min-height: 80px; padding: 12px; }
    .backdrop { height: 45vh; }
    .movie-feedback { margin-left: 0; margin-top: 8px; width: 100%; justify-content: center; }
    
    .player-wrapper { border-radius: 8px; margin-bottom: 40px; }
    .similar-section { margin-bottom: 40px; }
    footer { margin-top: 50px; padding: 40px 0 20px; }
    
    .seo-section { padding: 35px 20px; margin: 40px 0; }
    .seo-title { font-size: 22px; }
    .seo-text { font-size: 14px; }
    .seo-features { grid-template-columns: 1fr; gap: 15px; }
    
    .category-tabs { gap: 8px; }
    .category-tab { padding: 8px 16px; font-size: 13px; }
}

@media (max-width: 380px) {
    .top-item { grid-template-columns: 40px 70px 1fr; }
    .item-actions { flex-direction: column; }
    .btn-watch { width: 100%; }
    .movie-grid { grid-template-columns: repeat(2, 1fr); }
    .hero-title { font-size: 24px; }
    
    .movie-container { padding-left: 12px; padding-right: 12px; }
    .movie-title { font-size: 22px; }
    .stats-grid { grid-template-columns: 1fr; }
    .similar-grid { grid-template-columns: repeat(2, 1fr); }
    .tab { padding: 12px 14px; font-size: 12px; }
    .meta-tags { flex-direction: column; align-items: flex-start; gap: 10px; }
    .movie-feedback { justify-content: flex-start; margin-top: 5px; }
    .comm-actions { flex-wrap: wrap; gap: 8px; }
}

@media (hover: none) {
    .top-item:hover { transform: none; }
    .top-item:hover .item-poster img { transform: none; }
    .top-item:hover .item-poster::after { opacity: 0; }
    .btn-watch:hover { transform: none; }
    .top-item:active { transform: scale(0.99); }
    
    .movie-card:hover { transform: none; }
    .movie-card:hover .card-poster { transform: none; border-color: rgba(255,255,255,0.05); box-shadow: none; }
    .movie-card:hover .card-overlay { opacity: 0; }
    .btn-primary:hover { transform: none; }
    .movie-card:active { transform: scale(0.98); }
    
    .cast-member:hover .cast-img { border-color: rgba(255,255,255,0.1); transform: none; box-shadow: none; }
    .btn-play:hover { transform: none; }
    .btn:active { transform: scale(0.97); }
    .feedback-btn:hover { transform: none; }
}

body.menu-open { overflow: hidden; }