/* Header & Navigation */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--gradient-primary);
    padding: 20px 60px;
    transition: background-color 0.3s ease;
}

.header.scrolled {
    background: var(--gradient-scrolled);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo img {
    height: 40px;
    width: auto;
    transition: opacity 0.3s ease;
}

.logo img:hover {
    opacity: 0.8;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 16px;
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-brand-text {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 18px;
    font-weight: 600;
    font-family: 'Nunito Sans', sans-serif;
    transition: color 0.3s ease;
}

.nav-brand-text:hover {
    color: var(--text-color);
}

/* Mobile Menu */
.hamburger-menu {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 8px;
    position: relative;
    z-index: 1001;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.hamburger-menu span {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

.hamburger-menu.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.98) 0%, rgba(0,0,0,0.95) 100%);
    backdrop-filter: blur(10px);
    padding: 20px;
    z-index: 999;
    border-top: 1px solid var(--primary-color);
}

.mobile-menu.active {
    display: block;
}

.mobile-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-menu li {
    margin-bottom: 15px;
}

.mobile-menu a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 18px;
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 500;
    display: block;
    padding: 10px 0;
    transition: color 0.3s ease;
}

.mobile-menu a:hover {
    color: var(--primary-color);
}

.mobile-menu .nav-brand-text {
    color: var(--primary-color);
    font-size: 20px;
    font-weight: 600;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

/* Footer */
.footer {
    background: linear-gradient(180deg, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.95) 100%);
    border-top: 1px solid var(--text-muted);
    padding: 40px 0;
    margin-top: 60px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
}

.footer-column {
    flex: 1;
    min-width: 200px;
}

.footer-social {
    text-align: left;
}

.footer-logo {
    text-align: center;
}

.footer-copyright {
    text-align: right;
}

.social-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 20px;
}

.social-item {
    margin: 0;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    text-decoration: none;
    padding: 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    width: 48px;
    height: 48px;
}

.social-link:hover {
    background: rgba(117, 251, 153, 0.1);
    transform: translateY(-2px);
    color: var(--primary-color);
}

.social-link i {
    width: 24px;
    height: 24px;
    stroke-width: 2;
}

.footer-logo-image {
    max-height: 35px;
    width: auto;
}

.footer-support-link {
    display: none;
    color: #75FB99;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    margin-top: 15px;
}

.footer-support-link:hover {
    color: #5ee080;
    text-decoration: underline;
}

.footer-text {
    color: var(--text-color);
    font-size: 14px;
    margin: 0;
    font-weight: 400;
}

/* Movie Detail Modal */
.movie-detail-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.movie-detail-overlay.active {
    display: flex;
}

.movie-detail-modal {
    background: #1a1a1a;
    border-radius: 8px;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* Hide scrollbar for movie detail modal */
.movie-detail-modal::-webkit-scrollbar {
    display: none;
}

.movie-detail-modal {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

.movie-detail-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
}

.movie-detail-close:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

.movie-detail-close i {
    color: #75FB99 !important;
    width: 20px;
    height: 20px;
    stroke-width: 2;
}

.movie-detail-visual {
    width: 100%;
    height: 400px;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
    position: relative;
    background: #000;
}

/* Video loader */
.movie-detail-video-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.movie-detail-video-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    display: none;
}

.movie-detail-video-loader.active {
    display: block;
}

.movie-detail-video-loader .loader-svg {
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.movie-detail-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.movie-detail-visual video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.movie-detail-controls {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    z-index: 10;
}

.movie-detail-sound-control,
.movie-detail-fullscreen-control {
    display: flex;
    align-items: center;
    color: white;
    cursor: pointer;
    padding: 8px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.movie-detail-sound-control:hover,
.movie-detail-fullscreen-control:hover {
    color: var(--primary-color);
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

.movie-detail-sound-control i,
.movie-detail-fullscreen-control i {
    width: 20px;
    height: 20px;
    stroke-width: 2.5;
}

.movie-detail-sound-control svg,
.movie-detail-fullscreen-control svg {
    width: 20px;
    height: 20px;
}

.movie-detail-gradient-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to bottom, transparent 0%, rgba(26, 26, 26, 0.3) 40%, rgba(26, 26, 26, 0.8) 80%, #1a1a1a 100%);
    pointer-events: none;
    z-index: 10;
}

/* Movie Detail Title Overlay */
.movie-detail-title-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    padding: 40px;
    z-index: 15;
    pointer-events: none; /* Allow clicks to pass through */
}

.movie-detail-kultura-logo {
    margin-bottom: 20px;
    pointer-events: auto; /* Enable clicks on logo */
}

.movie-detail-kultura-logo img {
    width: 60px;
    height: auto;
    opacity: 0.9;
}

.movie-detail-title-overlay .movie-detail-title {
    font-size: 48px;
    font-weight: 700;
    color: white;
    margin-bottom: 30px;
    line-height: 1.1;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    pointer-events: auto; /* Enable clicks on title */
}

.movie-detail-title-overlay .movie-detail-title img {
    max-width: 370px;
    max-height: 130px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.8));
}

.movie-detail-play-btn {
    font-size: 16px;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    pointer-events: auto; /* Enable clicks on button */
    border: none;
    cursor: pointer;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    line-height: 1;
    box-sizing: border-box;
}

button.movie-detail-play-btn {
    border: none;
    background-color: #ffffff;
    color: #000000;
    font-family: inherit;
    cursor: pointer;
}

button.movie-detail-play-btn:hover {
    background-color: #e6e6e6;
}

.movie-detail-trailer-btn {
    background: rgba(0, 0, 0, 0.7) !important;
    color: #ffffff !important;
    border: 2px solid rgba(255, 255, 255, 0.2) !important;
    backdrop-filter: blur(10px);
}

.movie-detail-trailer-btn:hover {
    background: rgba(0, 0, 0, 0.9) !important;
    color: var(--primary-color) !important;
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.3) !important;
}

.movie-detail-play-btn:hover:not(.movie-detail-trailer-btn) {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.movie-detail-trailer-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.movie-detail-play-buttons {
    display: flex;
    gap: 15px;
    align-items: center;
}

.movie-detail-content {
    padding: 30px;
}

/* Two-column layout for main content */
.movie-detail-main-content {
    display: grid;
    grid-template-columns: 1fr 200px;
    gap: 60px;
    margin-bottom: 30px;
}

.movie-detail-left-column {
    /* Left column takes 2/3 of the space */
}

.movie-detail-right-column {
    /* Right column takes 1/3 of the space */
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.movie-detail-metadata-item {
    margin-bottom: 15px;
}

.movie-detail-metadata-item strong {
    color: var(--text-color);
    font-weight: 600;
}

.movie-detail-metadata-item span {
    color: var(--text-color);
}

/* Override for non-accessibility items */
.movie-detail-metadata-item:not(.movie-detail-accessibility) span {
    color: #999;
}

/* Accessibility special styling */
.movie-detail-accessibility {
    text-align: right;
    margin-bottom: 20px;
}

.movie-detail-accessibility strong {
    background: #e50914;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 700;
}

/* Contains and Cast styling */
.movie-detail-metadata-item:not(.movie-detail-accessibility) {
    color: #999;
    font-size: 13px;
    margin-bottom: 10px;
}

.movie-detail-metadata-item:not(.movie-detail-accessibility) strong {
    color: white;
    font-weight: 600;
}

.movie-detail-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    justify-content: space-between;
}

.movie-detail-meta > span:last-child.movie-meta-separator {
    display: none;
}

.movie-genres {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 14px;
}

.movie-meta-separator {
    color: var(--text-muted);
    font-size: 14px;
}

.movie-year {
    color: var(--text-muted);
    font-size: 14px;
}

.movie-rating {
    background: #e50914;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    margin-left: auto;
    display: inline-block;
}

.movie-detail-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 20px;
    line-height: 1.2;
}

.movie-detail-title-logo {
    max-width: 370px;
    max-height: 120px;
    width: auto;
    height: auto;
    margin-bottom: 20px;
    object-fit: contain;
}

.movie-detail-description {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    margin-bottom: 20px;
}

.movie-detail-inspirational-header {
    font-size: 26px;
    font-weight: 800;
    color: var(--primary-color);
    margin: 40px 0 0 0;
    letter-spacing: 0.5px;
}

.movie-detail-cast {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 30px;
}

.movie-detail-cast strong {
    color: var(--text-color);
}

.movie-detail-similar {
    border-top: 1px solid var(--border-color);
    padding-top: 30px;
}

.movie-detail-similar-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 20px;
}

.movie-detail-similar-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.movie-detail-similar-item {
    cursor: pointer;
    transition: transform 0.3s ease;
    border-radius: 4px;
    overflow: hidden;
}

.movie-detail-similar-item:hover {
    transform: scale(1.05);
}

.movie-detail-similar-item img {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
}

/* Mobile Only Elements */
.mobile-only {
    display: none;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    /* Disable hover effects on mobile */
    .scroll-thumbnail:hover .scroll-thumbnail-title {
        transform: none;
    }
    
    .movie-detail-similar-item:hover {
        transform: none;
    }
    
    /* Hide overlay on mobile (logo, title, play button on video) */
    .movie-detail-title-overlay {
        display: none !important;
    }
    
    /* Show mobile-only elements */
    .mobile-only {
        display: block;
    }
    
    .movie-detail-modal {
        max-width: 95%;
        margin: 10px;
    }
    
    .movie-detail-content {
        padding: 20px;
    }
    
    /* Title in content section (mobile) */
    .movie-detail-content .movie-detail-title.mobile-only {
        font-size: 24px;
        margin-bottom: 20px;
    }
    
    /* Right column grid layout on mobile - 2 columns */
    .movie-detail-right-column {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }
    
    /* Play button in right column (mobile) - spans both columns */
    .movie-detail-right-column .movie-detail-play-buttons.mobile-only {
        grid-column: 1 / -1;
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin-bottom: 10px;
    }
    
    .movie-detail-right-column .movie-detail-play-buttons.mobile-only .movie-detail-play-btn {
        width: 100%;
        text-align: center;
    }
    
    /* Metadata items in grid */
    .movie-detail-right-column .movie-detail-metadata-item {
        margin-bottom: 0;
    }
    
    /* Show support link in footer on mobile */
    .footer-support-link {
        display: block;
    }
    
    .footer-branding {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .movie-detail-inspirational-header {
        font-size: 20px;
        margin: 30px 0 0 0;
    }
    
    .movie-detail-title-logo {
        max-width: 60%;
        max-height: 90px;
    }
    
    .movie-detail-similar-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .movie-detail-visual {
        height: 200px;
    }
    
    .movie-detail-title-overlay {
        padding: 20px;
    }
    
    .movie-detail-kultura-logo img {
        width: 48px;
        height: auto;
    }
    
    .movie-detail-title-overlay .movie-detail-title {
        font-size: 32px;
        margin-bottom: 20px;
    }
    
    .movie-detail-title-overlay .movie-detail-title img {
        max-width: min(50vw, 250px);
        max-height: 100px;
        object-fit: contain;
    }
    
    .movie-detail-play-btn {
        font-size: 14px;
        padding: 10px 20px;
    }
    
    /* Single column layout for mid-size screens */
    .movie-detail-main-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .movie-detail-right-column {
        order: 1; /* Move metadata after content on mid-size screens */
    }
    
    .movie-detail-left-column {
        order: 2; /* Move content after metadata on mid-size screens */
    }
    
    /* Style metadata items for mid-size screens */
    .movie-detail-metadata-item {
        margin-bottom: 15px;
        font-size: 15px;
    }
    
    .movie-detail-metadata-item strong {
        display: block;
        margin-bottom: 3px;
        font-size: 15px;
    }
    
    .movie-detail-metadata-item span {
        font-size: 14px;
        line-height: 1.4;
    }
}

@media (max-width: 480px) {
    .movie-detail-similar-grid {
        grid-template-columns: 1fr;
    }
    
    /* Further reduce title logo on small mobile */
    .movie-detail-title-logo {
        max-width: 60%;
        max-height: 70px;
    }
    
    .movie-detail-title-overlay .movie-detail-title img {
        max-width: min(45vw, 200px);
        max-height: 80px;
        object-fit: contain;
    }
    
    /* Mobile layout: single column with specific order */
    .movie-detail-main-content {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .movie-detail-right-column {
        order: 1; /* Move metadata after content on mobile */
    }
    
    .movie-detail-left-column {
        order: 2; /* Move content after metadata on mobile */
    }
    
    /* Style metadata items for mobile */
    .movie-detail-metadata-item {
        margin-bottom: 10px;
        font-size: 14px;
    }
    
    .movie-detail-metadata-item strong {
        display: block;
        margin-bottom: 2px;
        font-size: 14px;
    }
    
    .movie-detail-metadata-item span {
        font-size: 13px;
        line-height: 1.4;
    }
    
    /* Adjust meta info for mobile */
    .movie-detail-meta {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 0;
        font-size: 12px;
        justify-content: flex-start;
        margin-bottom: 15px;
    }
    
    .movie-genres,
    .movie-year {
        font-size: 12px;
    }
    
    .movie-meta-separator {
        font-size: 10px;
        margin: 0 4px;
    }
    
    .movie-meta-separator:last-of-type {
        display: none;
    }
    
    .movie-rating {
        margin-left: auto;
        order: 0;
    }
    
    /* Adjust inspirational header for mobile */
    .movie-detail-inspirational-header {
        font-size: 18px;
        margin: 20px 0 0 0;
    }
}

/* Scroll Thumbnail Title Styles - Hidden by default, shown on hover */
.scroll-thumbnail-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 20px 10px 10px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    z-index: 1;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.scroll-thumbnail:hover .scroll-thumbnail-title {
    transform: translateY(0);
}

/* Detailed Description Styles */
.movie-detail-detailed-description {
    margin: 0 0 20px 0;
    padding: 0;
    background: none;
    border-radius: 0;
    border-left: none;
}

.movie-detail-detailed-description h3 {
    display: none;
}

.movie-detail-detailed-content {
    color: var(--text-color);
    line-height: 1.6;
    font-size: 15px;
}

.movie-detail-detailed-content p {
    margin-bottom: 12px;
}

.movie-detail-detailed-content p:last-child {
    margin-bottom: 0;
}

.movie-detail-detailed-content ul,
.movie-detail-detailed-content ol {
    margin: 12px 0;
    padding-left: 20px;
}

.movie-detail-detailed-content li {
    margin-bottom: 6px;
}

.movie-detail-detailed-content strong {
    color: var(--primary-color);
    font-weight: 600;
}

.movie-detail-detailed-content em {
    color: var(--text-muted);
    font-style: italic;
}

.movie-detail-detailed-content u {
    text-decoration: underline;
    text-decoration-color: var(--primary-color);
}

/* Fullscreen Video Player */
.video-player-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(10px);
}

.video-player-modal.active {
    display: flex;
}

.video-player-container {
    position: relative;
    width: 90vw;
    height: 90vh;
    max-width: 1200px;
    max-height: 675px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.fullscreen-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

/* Video Player Close Button */
.video-player-close {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10001;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    transition: all 0.3s ease;
}

.video-player-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--primary-color);
    transform: scale(1.1);
}

.video-player-close i {
    width: 24px;
    height: 24px;
    stroke-width: 2.5;
}

.video-player-close svg {
    width: 24px;
    height: 24px;
}


/* Fullscreen control in hero */
.fullscreen-control {
    display: flex;
    align-items: center;
    color: white;
    cursor: pointer;
    padding: 8px;
}

.fullscreen-control i {
    width: 28px;
    height: 28px;
    stroke-width: 2.5;
}

.fullscreen-control svg {
    width: 28px;
    height: 28px;
}

.fullscreen-control:hover {
    color: var(--primary-color);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .video-player-container {
        width: 95vw;
        height: 85vh;
    }
}