/* ОСНОВНЫЕ СТИЛИ САЙТА (MEDIANET STYLE) */
:root {
  --body-color: #666;
  --headings-color: #416f9d;
  --card-bg: #f9f9f9;
  --card-header-bg: #8cbdeb;
  --html-bg: #eeeeee;
  --body-bg: #f9f9f9;
  --border-color: #bab9b9;
  --primary-color: #416f9d;
  --danger-color: #dc3545;
  --success-color: #28a745;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    background-color: var(--html-bg);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    background-color: var(--body-bg);
    color: var(--body-color);
}

body.site {
    max-width: 95% !important;
    margin: 0 auto !important;
    border-left: 1px solid var(--border-color) !important;
    border-right: 1px solid var(--border-color) !important;
    background-color: #fff;
    min-height: 100vh;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ШАПКА */
header {
    background-image: url('/assets/images/header.jpg');
    background-size: cover;
    background-position: center bottom;
    min-height: 167px;
    display: flex;
    align-items: center;
    position: relative;
    border-bottom: 1px solid var(--border-color);
}

header .container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    height: 167px;
    width: 100%;
}

.logo {
    margin-bottom: auto;
    padding-top: 15px;
}

.logo img {
    max-height: 90px;
    display: block;
}

.mod-menu {
    list-style: none;
    margin: 0;
    background-color: #a07b593b;
    border-radius: 4px 4px 0 0;
}

.mod-menu ul {
    display: flex;
    list-style: none;
    padding: 5px 10px;
    gap: 15px;
}

.mod-menu a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    font-size: 1rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    padding: 5px 12px;
    display: block;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
}

.mod-menu a:hover, .mod-menu a.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.5);
}

/* КОНТЕНТНЫЕ БЛОКИ */
main {
    padding: 2.5rem 0;
}

.page-card {
    background-color: var(--card-bg);
    border: 1px solid #dfe3e7;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
}

.page-card-header {
    background-color: var(--card-header-bg);
    background-image: url('/assets/images/sidebar.gif');
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    padding: 12px 20px;
    color: #7d1e1e8f;
    font-weight: 700;
    font-size: 1.1rem;
    border-bottom: 1px solid #dfe3e7;
    display: flex;
    align-items: center;
}

.page-card-body {
    padding: 25px;
    color: var(--body-color);
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--headings-color);
    font-size: 1.5rem !important;
}

/* ФУТЕР */
footer {
    background-color: #fff;
    color: #666;
    padding: 20px 0;
    margin: 3rem auto 2rem;
    max-width: 1600px !important;
    width: 100%;
    border: 1px solid #e0e4e8;
    border-radius: 6px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

footer p {
    margin: 0;
    font-size: 0.85rem;
}

/* Cinema Mode (Lights Off) */
body.cinema-mode::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95); /* Было 0.9, стало темнее */
    z-index: 9998;
    pointer-events: auto; /* Теперь блокирует клики сквозь фон */
    transition: none;
}

body.cinema-mode header, 
body.cinema-mode .sidebar, 
body.cinema-mode .footer, 
body.cinema-mode .banner-navigation, 
body.cinema-mode .movie-rating-block, 
body.cinema-mode .movie-description-block, 
body.cinema-mode .similar-movies-section,
body.cinema-mode .watch-also-section,
body.cinema-mode h1 {
    opacity: 0 !important;
    visibility: hidden;
    pointer-events: none;
    transition: none;
}

/* Центрируем и увеличиваем плеер в режиме кино */
body.cinema-mode .video-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80vw;
    max-width: 1200px;
    height: 0;
    padding-bottom: 45%; /* Сбалансированная высота для 16:9 в фиксированном режиме */
    z-index: 9999;
    box-shadow: 0 0 60px rgba(0,0,0,1);
    border: none;
    border-radius: 12px;
    transition: none;
}

body.cinema-mode .video-container iframe {
    border-radius: 8px;
}
    box-shadow: 0 0 100px rgba(0, 0, 0, 1), 0 0 60px rgba(65, 111, 157, 0.3);
    z-index: 9999;
    position: relative;
    max-width: 1100px;
    margin: 60px auto 0 auto !important;
    transform: scale(1.1) translate(150px, -35px);
    transition: all 0.5s ease;
    border: 1px solid rgba(255,255,255,0.05);
}

/* Home Dashboard Styles */
.home-dashboard { display: flex; flex-direction: column; gap: 40px; margin-top: 20px; }
.dashboard-section { background: #fff; border-radius: 12px; border: 1px solid #eee; overflow: hidden; box-shadow: 0 4px 15px rgba(0,0,0,0.02); }
.section-header { background: #f8fbff; padding: 15px 25px; border-bottom: 1px solid #f0f7ff; display: flex; justify-content: space-between; align-items: center; }
.section-title { font-size: 1.2rem; font-weight: 700; color: #416f9d; display: flex; align-items: center; gap: 10px; }
.section-body { padding: 25px; }

/* Grid for news on home */
.home-news-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.home-news-card { display: flex; gap: 15px; text-decoration: none; transition: 0.3s; padding: 10px; border-radius: 10px; }
.home-news-card:hover { background: #f9f9f9; transform: translateX(5px); }
.home-news-img { width: 100px; height: 70px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.home-news-info { flex: 1; min-width: 0; }
.home-news-title { font-weight: 600; color: #444; font-size: 0.95rem; line-height: 1.3; margin-bottom: 5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.home-news-meta { font-size: 0.75rem; color: #999; }

/* Grid for movies on home */
.home-movie-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 20px; }
.home-movie-card { text-decoration: none; transition: 0.3s; }
.home-movie-card:hover { transform: translateY(-5px); }
.home-movie-poster { width: 100%; aspect-ratio: 2/3; object-fit: cover; border-radius: 10px; box-shadow: 0 5px 15px rgba(0,0,0,0.1); margin-bottom: 10px; }
.home-movie-title { font-size: 0.9rem; font-weight: 600; color: #416f9d; text-align: center; display: block; }

/* Calendar on home */
.home-calend-box { background: linear-gradient(135deg, #f8fbff 0%, #fff 100%); border-radius: 15px; padding: 20px; display: flex; align-items: center; gap: 25px; }
.home-calend-date { text-align: center; min-width: 100px; padding-right: 25px; border-right: 2px solid #f0f7ff; }
.home-calend-day { font-size: 2.5rem; font-weight: 800; color: #416f9d; line-height: 1; }
.home-calend-month { font-size: 1rem; color: #999; text-transform: uppercase; letter-spacing: 1px; }
.home-calend-info { flex: 1; }
.home-calend-holiday { font-weight: 700; color: #444; margin-bottom: 5px; }
.home-calend-names { font-size: 0.85rem; color: #777; }

@media (max-width: 768px) {
    .home-calend-box { flex-direction: column; text-align: center; }
    .home-calend-date { border-right: none; border-bottom: 2px solid #f0f7ff; padding-right: 0; padding-bottom: 15px; }
}

/* ОРИГИНАЛЬНЫЕ СТИЛИ РЕЖИМА КИНОТЕАТРА */
body.cinema-mode::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9998;
    pointer-events: auto;
}

body.cinema-mode header, 
body.cinema-mode .sidebar, 
body.cinema-mode .footer, 
body.cinema-mode .banner-navigation, 
body.cinema-mode .movie-rating-block, 
body.cinema-mode .movie-description-block, 
body.cinema-mode .similar-movies-section,
body.cinema-mode .watch-also-section,
body.cinema-mode h1 {
    opacity: 0 !important;
    visibility: hidden;
    pointer-events: none;
}

body.cinema-mode .video-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80vw;
    max-width: 1200px;
    height: 0;
    padding-bottom: 45%;
    z-index: 9999;
    box-shadow: 0 0 60px rgba(0,0,0,1);
    border: none;
    border-radius: 12px;
}

body.cinema-mode .video-container iframe {
    border-radius: 8px;
}

