* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #000;
    color: #fff;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ===================== LOGO ===================== */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: white;
    font-size: 28px;
    font-weight: bold;
    letter-spacing: 2px;
}

.logo-icon-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    overflow: hidden;
}

.logo-icon {
    width: 30px;
    height: 30px;
    object-fit: contain;
    display: block;
    transition: transform 0.35s ease, filter 0.35s ease;
}

.logo-shine {
    position: absolute;
    top: -20%;
    left: -75%;
    width: 45%;
    height: 140%;
    background: linear-gradient(
        120deg,
        rgba(255,255,255,0) 0%,
        rgba(255,255,255,0.15) 35%,
        rgba(255,255,255,0.85) 50%,
        rgba(255,255,255,0.15) 65%,
        rgba(255,255,255,0) 100%
    );
    transform: skewX(-20deg);
    opacity: 0;
    pointer-events: none;
}

.logo .text {
    font-family: 'Orbitron', sans-serif;
    font-size: 28px;
    font-weight: 600;
    letter-spacing: 3px;
}

.logo:hover .logo-icon {
    transform: scale(1.08);
    filter: drop-shadow(0 0 6px rgba(255,255,255,0.45));
}

.logo:hover .logo-shine {
    opacity: 1;
    animation: logoShine 0.9s ease forwards;
}

.logo:hover .text {
    text-shadow:
        0 0 4px rgba(255,255,255,0.25),
        0 0 10px rgba(255,255,255,0.18);
}

@keyframes logoShine {
    0% { left: -75%; }
    100% { left: 130%; }
}

.logo-svg {
    width: 30px;
    height: 30px;
    transition: transform 0.4s ease, filter 0.3s ease;
}

.logo:hover .logo-svg {
    transform: scale(1.1) rotate(-6deg);
    filter: drop-shadow(0 0 6px rgba(255,255,255,0.5));
}

/* ===================== LOADER ===================== */
#loader {
    position: fixed;
    inset: 0;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

#loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-box {
    text-align: center;
    padding: 20px;
    width: min(320px, 90vw);
}

.loader-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
}

.loader-icon-wrap {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    animation: loaderFloat 1.6s ease-in-out infinite;
}

.loader-svg {
    width: 42px;
    height: 42px;
    display: block;
    filter: drop-shadow(0 0 8px rgba(255,255,255,0.18));
}

.loader-text {
    font-size: 30px;
    font-weight: 700;
    letter-spacing: 3px;
    color: #fff;
    text-shadow:
        0 0 6px rgba(255,255,255,0.18),
        0 0 16px rgba(255,255,255,0.08);
}

.loader-line {
    width: 100%;
    height: 4px;
    background: rgba(255,255,255,0.08);
    border-radius: 999px;
    overflow: hidden;
}

.loader-line-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #666, #fff, #666);
    border-radius: 999px;
    animation: loaderProgress 2.2s ease forwards;
}

@keyframes loaderFloat {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-3px) scale(1.04); }
}

@keyframes loaderProgress {
    0% { width: 0%; }
    100% { width: 100%; }
}

/* ===================== HEADER ===================== */
.header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(0,0,0,0.88);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.back-link {
    color: #d0d0d0;
    font-size: 14px;
}

.back-link:hover {
    color: #fff;
}

/* ===================== PAGE / MOVIE INFO ===================== */
.page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 36px 20px 70px;
}

.movie-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 34px;
    align-items: start;
}

.poster {
    width: 100%;
    border-radius: 18px;
    display: block;
    object-fit: cover;
    background: #111;
    border: 1px solid rgba(255,255,255,0.08);
}

.info h1 {
    margin: 0 0 12px;
    font-size: 42px;
}

.meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.badge {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    color: #d7d7d7;
    font-size: 13px;
}

.desc {
    color: #d0d0d0;
    line-height: 1.7;
    font-size: 16px;
    margin-bottom: 24px;
    max-width: 760px;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 28px;
}

.button {
    display: inline-block;
    padding: 13px 22px;
    border-radius: 10px;
    font-weight: bold;
    transition: 0.25s;
}

.button.white {
    background: #fff;
    color: #000;
}

.button.dark {
    border: 1px solid rgba(255,255,255,0.18);
    background: rgba(255,255,255,0.06);
    color: #fff;
}

.player-box {
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.08);
    background: #0d0d0d;
    margin-top: 14px;
}

.player-placeholder {
    aspect-ratio: 16 / 9;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #111 0%, #1e1e1e 50%, #080808 100%);
    color: #fff;
    font-size: 26px;
    letter-spacing: 1px;
    position: relative;
}

.player-placeholder::before {
    content: "▶";
    font-size: 56px;
    margin-right: 14px;
}

.details {
    margin-top: 34px;
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 18px;
}

.detail-box {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 18px;
}

.detail-title {
    color: #999;
    font-size: 13px;
    margin-bottom: 8px;
}

.detail-value {
    color: #fff;
    line-height: 1.5;
}

@media (max-width: 900px) {
    .movie-layout {
        grid-template-columns: 1fr;
    }

    .poster {
        max-width: 340px;
    }

    .info h1 {
        font-size: 32px;
    }

    .details {
        grid-template-columns: 1fr;
    }
}

/* ===================== BACKGROUND IMAGES ===================== */
.movie-bg {
    position: fixed;
    inset: 0;
    z-index: -2;
    background-size: cover;
    background-position: center;
    transform: scale(1.1);
    opacity: 0.25;
}


.spidermannoirblackandwhite-page .movie-bg {
    background-image: url("images/paukposter.jpg");
}

.spidermannoircolored-page .movie-bg {
    background-image: url("images/spidermanCposter.png");
}

/* ===================== VIDEO PLAYER ===================== */
.video-container {
    width: 100%;
    max-width: 1000px;
    margin: 35px 0;
}

.custom-player {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 18px;
    overflow: hidden;
}

.custom-player video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.player-title {
    color: white;
    font-weight: 700;
}

/* Progress bars */
#progress,
.main-progress {
    flex: 1;
    width: 100%;
    height: 4px;
    accent-color: var(--accent, #ffffff);
}

#current-time,
#duration-time,
#time-display {
    color: white;
    font-size: 13px;
    min-width: 44px;
    text-align: center;
}

/* Volume */
#volume {
    width: 70px;
    accent-color: var(--accent, #ffffff);
}

/* Mute button */
#mute {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.15);
    display: flex;
    align-items: center;
    justify-content: center;
}

#mute img {
    width: 18px;
    height: 18px;
}

/* Main play button */
.main-play {
    width: 46px !important;
    height: 46px !important;
    font-size: 18px !important;
    background: var(--accent, #ffffff) !important;
    box-shadow: 0 0 20px rgba(255,255,255,0.45);
}

/* ===================== SETTINGS PANEL ===================== */
.settings-panel {
    position: absolute;
    right: 18px;
    bottom: 78px;
    width: 360px;
    padding: 14px;
    gap: 0;
    display: none;
    flex-direction: column;

    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(22px);
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 22px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.55);

    color: white;
    z-index: 20;
}

.settings-panel.show {
    display: flex;
}

.settings-panel select,
.settings-panel input {
    width: 100%;
}

.settings-item {
    width: 100%;
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 20px;
    background: transparent;
    border: 0;
    border-bottom: 1px solid rgba(255,255,255,.10);
    color: white;
    font-size: 16px;
    cursor: pointer;
}

.settings-item:last-of-type {
    border-bottom: 0;
}

.settings-item:hover {
    background: rgba(255,255,255,.06);
    border-radius: 14px;
}

.settings-right {
    color: rgba(255,255,255,.85);
}

/* Skip / speed options */
.skip-option,
.speed-option {
    justify-content: flex-start;
}

.audio-option.active {
    background: var(--accent, #ffffff);
}

/* Submenus */
.settings-submenu {
    display: none;
    flex-direction: column;
}

.settings-submenu.show {
    display: flex;
}

#settings-main.hide {
    display: none;
}

/* Checkmarks for active items */
.speed-option.active::after,
.skip-option.active::after {
    content: "✓";
    margin-left: auto;
    color: var(--accent, #ffffff);
}

/* ===================== BOTTOM CONTROL BAR ===================== */
.player-controls-new {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20;
    padding: 0 20px 18px;
    background: linear-gradient(transparent, rgba(0,0,0,.92));
    transition: opacity .3s ease;
}

.player-controls-new.hidden {
    opacity: 0;
    pointer-events: none;
}

.bottom-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    flex-wrap: wrap;
    gap: 10px;
}

.bottom-left,
.bottom-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.flat-btn {
    border: 0;
    background: transparent;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

.flat-btn img {
    width: 24px;
    height: 24px;
}

.time-text {
    color: white;
    font-size: 17px;
}

.active-control::after {
    display: none;
}

/* ===================== SETTINGS WIDE VARIANT ===================== */
.settings-wide {
    width: 460px;
    padding: 0;
}

.settings-header {
    height: 70px;
    padding: 0 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 24px;
    border-bottom: 1px solid rgba(255,255,255,.12);
}

#settings-close {
    border: 0;
    background: transparent;
    color: white;
    font-size: 38px;
    cursor: pointer;
}

/* Одна колонка — правая пустая область убрана */
.settings-body {
    display: flex;
    flex-direction: column;
}

#settings-main {
    /* border-right убран — больше нет двух колонок */
    display: flex;
    flex-direction: column;
}

.settings-content {
    padding: 10px;
}

/* ===================== RESPONSIVE PLAYER ===================== */
@media (max-width: 1000px) {
    .settings-wide {
        width: 92vw;
        right: 4vw;
    }

    .bottom-left,
    .bottom-right {
        gap: 10px;
    }

    .bottom-right {
        width: 100%;
        justify-content: center;
    }
}

/* ===================== PROGRESS WRAPPER ===================== */
.progress-wrapper {
    position: relative;
    width: 100%;
    height: 14px;
}

.progress-track,
#buffer-bar,
#played-bar {
    position: absolute;
    left: 0;
    top: 50%;
    height: 4px;
    border-radius: 999px;
    transform: translateY(-50%);
    pointer-events: none;
}

.progress-track {
    width: 100%;
    background: rgba(255,255,255,.18);
}

#buffer-bar {
    width: 0%;
    background: rgba(255,255,255,.38);
}

#played-bar {
    width: 0%;
    background: var(--accent, #fff);
}

.main-progress {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 14px;
    margin: 0;
    z-index: 5;
    cursor: pointer;
    opacity: 0;
}

.custom-player.hide-cursor {
    cursor: none;
}


/* Настройки в обычном режиме — компактные */
.settings-wide {
    width: 320px;
}

.settings-header {
    height: 52px;
    padding: 0 18px;
    font-size: 18px;
}

#settings-close {
    font-size: 28px;
}

.settings-wide .settings-item {
    min-height: 44px;
    padding: 0 18px;
    font-size: 14px;
}

/* В полноэкранном — возвращаем большой размер */
:fullscreen .settings-wide,
:-webkit-full-screen .settings-wide {
    width: 460px;
}

:fullscreen .settings-header,
:-webkit-full-screen .settings-header {
    height: 70px;
    padding: 0 28px;
    font-size: 24px;
}

:fullscreen #settings-close,
:-webkit-full-screen #settings-close {
    font-size: 38px;
}

:fullscreen .settings-wide .settings-item,
:-webkit-full-screen .settings-wide .settings-item {
    min-height: 56px;
    padding: 0 20px;
    font-size: 16px;
}