/* ============================================================
   Filmkarty.cz — dark streaming UI
   ============================================================ */

:root {
    --bg: #0a0d14;
    --surface: #12161f;
    --surface-2: #1a2030;
    --border: rgba(255, 255, 255, 0.08);
    --text: #eef1f7;
    --text-muted: #9aa4b8;
    --text-dim: #6b7488;
    --accent: #f43f5e;
    --accent-hover: #fb5772;
    --accent-soft: rgba(244, 63, 94, 0.14);
    --gold: #fbbf24;
    --radius: 14px;
    --radius-sm: 8px;
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.55);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
}

/* ------------------------------------------------------------
   Top navigation
   ------------------------------------------------------------ */
.top-menu {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    background: rgba(10, 13, 20, 0.82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
}

.top-menu nav {
    max-width: 1280px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.top-menu nav > a {
    text-decoration: none;
}

.menu-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text);
    white-space: nowrap;
}

.menu-logo::before {
    content: '▶';
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border-radius: 9px;
    font-size: 0.8rem;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), #c026d3);
    box-shadow: 0 4px 14px rgba(244, 63, 94, 0.4);
}

.menu-logo em {
    font-style: normal;
    color: var(--accent);
}

.menu-tagline {
    display: block;
    font-size: 0.68rem;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}

.menu-items {
    display: flex;
    align-items: center;
    gap: 8px;
}

.menu-items a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 999px;
    transition: color 0.2s, background-color 0.2s;
}

.menu-items a:hover {
    color: var(--text);
    background-color: var(--surface-2);
}

/* ------------------------------------------------------------
   Detail page — hero with backdrop
   ------------------------------------------------------------ */
.movie-hero {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.movie-hero-backdrop {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center 20%;
    filter: saturate(1.1);
    transform: scale(1.05);
}

.movie-hero-backdrop::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to top, var(--bg) 0%, rgba(10, 13, 20, 0.86) 45%, rgba(10, 13, 20, 0.65) 100%),
        radial-gradient(ellipse at 25% 40%, rgba(244, 63, 94, 0.12), transparent 60%);
}

.movie-hero-content {
    position: relative;
    z-index: 1;
    max-width: 1280px;
    margin: 0 auto;
    padding: 56px 24px 48px;
    display: flex;
    gap: 44px;
    align-items: flex-start;
}

.movie-poster-card {
    flex-shrink: 0;
    width: 300px;
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg), 0 0 0 1px var(--border);
}

.movie-poster-card img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.movie-rating {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    height: 52px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(10, 13, 20, 0.85);
    backdrop-filter: blur(6px);
    color: var(--gold);
    font-size: 1.25rem;
    font-weight: 800;
    border: 2px solid var(--gold);
    box-shadow: var(--shadow-md);
}

.movie-info {
    flex: 1;
    min-width: 0;
}

.movie-title {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin-bottom: 6px;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.6);
}

.movie-title-suffix {
    display: block;
    font-size: 0.45em;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-top: 6px;
}

.movie-facts {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    margin: 18px 0 14px;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
}

.movie-facts .fact {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.movie-facts .fact + .fact::before {
    content: '•';
    color: var(--text-dim);
    margin-right: 14px;
}

.genre-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
}

.genre-pill {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border);
    padding: 5px 14px;
    border-radius: 999px;
    backdrop-filter: blur(4px);
}

.movie-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.details-row {
    color: var(--text-muted);
}

.details-label {
    font-weight: 700;
    color: var(--text);
    margin-right: 6px;
}

.movie-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

.movie-link:hover {
    border-bottom-color: var(--accent);
}

.movie-description {
    color: var(--text-muted);
    font-size: 1.02rem;
    line-height: 1.7;
    max-width: 62ch;
    margin-bottom: 28px;
}

.watch-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, var(--accent), #d6335c);
    color: #fff;
    padding: 15px 34px;
    border-radius: 999px;
    text-decoration: none;
    font-size: 1.08rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    box-shadow: 0 8px 28px rgba(244, 63, 94, 0.45);
    transition: transform 0.2s, box-shadow 0.2s;
}

.watch-button::before {
    content: '▶';
    font-size: 0.85em;
}

.watch-button:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 12px 34px rgba(244, 63, 94, 0.6);
}

/* ------------------------------------------------------------
   Sections
   ------------------------------------------------------------ */
.page-section {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 36px 24px 0;
}

.section-title {
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title::before {
    content: '';
    width: 5px;
    height: 24px;
    border-radius: 3px;
    background: linear-gradient(180deg, var(--accent), #c026d3);
}

/* ------------------------------------------------------------
   Fake player
   ------------------------------------------------------------ */
.player-wrap {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    background: #000;
    box-shadow: var(--shadow-lg), 0 0 0 1px var(--border);
    aspect-ratio: 16 / 9;
    display: block;
    text-decoration: none;
    cursor: pointer;
}

.player-screen {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform 0.4s ease, filter 0.4s ease;
    filter: brightness(0.6);
}

.player-wrap:hover .player-screen {
    transform: scale(1.03);
    filter: brightness(0.75);
}

.player-vignette {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, transparent 30%),
                linear-gradient(to bottom, rgba(0, 0, 0, 0.4) 0%, transparent 25%);
}

.player-quality {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #fff;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 4px 10px;
    border-radius: 6px;
    backdrop-filter: blur(4px);
}

.player-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
}

.player-play-btn {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(244, 63, 94, 0.92);
    box-shadow: 0 0 0 0 rgba(244, 63, 94, 0.5);
    animation: playPulse 2.2s ease-out infinite;
    transition: transform 0.2s;
}

.player-wrap:hover .player-play-btn {
    transform: scale(1.1);
}

.player-play-btn svg {
    width: 34px;
    height: 34px;
    fill: #fff;
    margin-left: 5px;
}

@keyframes playPulse {
    0%   { box-shadow: 0 0 0 0 rgba(244, 63, 94, 0.55); }
    70%  { box-shadow: 0 0 0 26px rgba(244, 63, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(244, 63, 94, 0); }
}

.player-cta {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
    background: rgba(0, 0, 0, 0.45);
    padding: 8px 20px;
    border-radius: 999px;
    backdrop-filter: blur(4px);
}

/* control bar */
.player-controls {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 14px 18px 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.player-progress {
    position: relative;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.25);
}

.player-progress-buffer {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 18%;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.35);
}

.player-progress-played {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3%;
    border-radius: 2px;
    background: var(--accent);
}

.player-progress-knob {
    position: absolute;
    left: 3%;
    top: 50%;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent);
    transform: translate(-50%, -50%);
    box-shadow: 0 0 8px rgba(244, 63, 94, 0.8);
}

.player-buttons {
    display: flex;
    align-items: center;
    gap: 16px;
    color: rgba(255, 255, 255, 0.9);
}

.player-buttons svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    opacity: 0.9;
}

.player-time {
    font-size: 0.8rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: rgba(255, 255, 255, 0.85);
}

.player-spacer {
    flex: 1;
}

/* ------------------------------------------------------------
   Trailer
   ------------------------------------------------------------ */
.trailer iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md), 0 0 0 1px var(--border);
}

/* ------------------------------------------------------------
   Movie grid (homepage + related)
   ------------------------------------------------------------ */
.intro-container {
    max-width: 1280px;
    margin: 36px auto 8px;
    padding: 0 24px;
}

.intro-panel {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--surface-2), var(--surface));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 34px 38px;
}

.intro-panel::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(244, 63, 94, 0.18), transparent 70%);
    pointer-events: none;
}

.intro-title {
    font-size: 1.6rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    margin-bottom: 10px;
}

.intro-title span {
    color: var(--accent);
}

.intro-text {
    font-size: 0.98rem;
    color: var(--text-muted);
    line-height: 1.7;
    max-width: 90ch;
}

.intro-text strong {
    color: var(--text);
    font-weight: 600;
}

.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
    gap: 22px 18px;
}

.movie-card-item {
    position: relative;
}

.movie-card-item a {
    text-decoration: none;
    display: block;
}

.movie-card-poster {
    position: relative;
    border-radius: var(--radius-sm);
    overflow: hidden;
    aspect-ratio: 2 / 3;
    background: var(--surface-2);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card-item:hover .movie-card-poster {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.6), 0 0 0 2px var(--accent);
}

.movie-card-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.movie-card-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 13, 20, 0.55);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.movie-card-item:hover .movie-card-overlay {
    opacity: 1;
}

.movie-card-overlay .mini-play {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(244, 63, 94, 0.55);
}

.movie-card-overlay .mini-play svg {
    width: 20px;
    height: 20px;
    fill: #fff;
    margin-left: 3px;
}

.movie-card-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--gold);
    background: rgba(10, 13, 20, 0.85);
    padding: 3px 9px;
    border-radius: 999px;
    border: 1px solid rgba(251, 191, 36, 0.4);
}

.movie-card-title {
    margin-top: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-card-year {
    font-size: 0.78rem;
    color: var(--text-dim);
    font-weight: 500;
    margin-top: 2px;
}

/* ------------------------------------------------------------
   Pagination
   ------------------------------------------------------------ */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin: 40px 0 10px;
    flex-wrap: wrap;
}

.pagination .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    color: var(--text-muted);
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.pagination .page-link:hover {
    background-color: var(--surface-2);
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.2);
}

.pagination .active {
    background: linear-gradient(135deg, var(--accent), #d6335c);
    color: #fff;
    border-color: transparent;
    pointer-events: none;
}

.pagination .disabled {
    opacity: 0.35;
    pointer-events: none;
}

/* ------------------------------------------------------------
   Footer
   ------------------------------------------------------------ */
.footer {
    margin-top: 56px;
    width: 100%;
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 30px 0;
    text-align: center;
}

.footer-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.footer p {
    font-size: 0.88rem;
    color: var(--text-dim);
}

.footer-links {
    margin-top: 8px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    margin: 0 8px;
    font-size: 0.88rem;
    font-weight: 500;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--accent);
}

/* ------------------------------------------------------------
   Responsive
   ------------------------------------------------------------ */
@media (max-width: 900px) {
    .movie-hero-content {
        gap: 28px;
    }
    .movie-poster-card {
        width: 220px;
    }
}

@media (max-width: 720px) {
    .top-menu nav {
        padding: 12px 16px;
    }
    .menu-logo {
        font-size: 1.1rem;
    }
    .menu-tagline {
        display: none;
    }
    .menu-items a {
        font-size: 0.82rem;
        padding: 6px 12px;
    }

    .movie-hero-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 36px 16px 32px;
    }
    .movie-poster-card {
        width: min(65vw, 260px);
    }
    .movie-facts,
    .genre-pills {
        justify-content: center;
    }
    .movie-description {
        text-align: left;
    }
    .movie-details {
        text-align: left;
    }
    .watch-button {
        width: 100%;
        justify-content: center;
    }

    .page-section {
        padding: 28px 16px 0;
    }
    .intro-container {
        padding: 0 16px;
        margin-top: 24px;
    }
    .intro-panel {
        padding: 24px 20px;
    }

    .movie-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 16px 12px;
    }

    .player-play-btn {
        width: 64px;
        height: 64px;
    }
    .player-play-btn svg {
        width: 24px;
        height: 24px;
    }
    .player-cta {
        font-size: 0.85rem;
    }
}
