/* StreamFlix Plugin Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background: #141414;
    color: #fff;
    overflow-x: hidden;
    line-height: 1.5;
}

.streamflix-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(20, 20, 20, 0.8);
    backdrop-filter: blur(10px);
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 1000;
    transition: background 0.3s;
}

.streamflix-header.scrolled {
    background: #141414;
}

.streamflix-logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #e50914;
    text-decoration: none;
}

.streamflix-nav {
    display: flex;
    align-items: center;
}

.streamflix-nav ul {
    display: flex;
    list-style: none;
    gap: 20px;
}

.streamflix-nav ul li a {
    color: #fff;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s;
}

.streamflix-nav ul li a:hover,
.streamflix-nav ul li a:focus {
    color: #e50914;
}

.streamflix-search {
    position: relative;
    margin-left: 20px;
}

.streamflix-search input {
    background: #333;
    border: none;
    padding: 5px 10px;
    color: #fff;
    border-radius: 4px;
    width: 200px;
    transition: width 0.3s;
}

.streamflix-search input:focus {
    width: 300px;
    outline: none;
}

.streamflix-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #181818;
    border-radius: 4px;
    padding: 20px;
    z-index: 1000;
    display: none;
    max-height: 400px;
    overflow-y: auto;
    box-shadow: 0 4px 8px rgba(0,0,0,0.5);
}

.streamflix-search-results .streamflix-content-row {
    flex-wrap: wrap;
    gap: 10px;
}

.streamflix-search-results p {
    font-size: 0.9rem;
    color: #ccc;
    text-align: center;
}

.streamflix-profile {
    width: 30px;
    height: 30px;
    background: #e50914;
    border-radius: 50%;
    margin-left: 20px;
    cursor: pointer;
}

.streamflix-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.streamflix-hamburger span {
    width: 25px;
    height: 3px;
    background: #fff;
    transition: all 0.3s;
}

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

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

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

.streamflix-hero {
    position: relative;
    height: 70vh;
    background: center/cover no-repeat;
    margin-top: 60px;
}

.streamflix-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.6), rgba(0,0,0,0.3) 30%, transparent 50%, rgba(0,0,0,0.7));
    display: flex;
    align-items: flex-end;
    padding: 40px 20px;
}

.streamflix-hero-content {
    max-width: 50%;
}

.streamflix-hero-content h1 {
    font-size: 3rem;
    margin-bottom: 10px;
}

.streamflix-hero-content p {
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.streamflix-hero-buttons button {
    background: #e50914;
    color: #fff;
    border: none;
    padding: 10px 20px;
    font-size: 1rem;
    cursor: pointer;
    margin-right: 10px;
    border-radius: 4px;
    transition: background 0.3s;
}

.streamflix-hero-buttons button:hover,
.streamflix-hero-buttons button:focus {
    background: #f40612;
}

.streamflix-hero-buttons button.secondary {
    background: rgba(109, 109, 110, 0.7);
}

.streamflix-hero-buttons button.secondary:hover,
.streamflix-hero-buttons button.secondary:focus {
    background: rgba(109, 109, 110, 1);
}

.streamflix-content-section {
    padding: 20px;
    margin-top: -50px;
    position: relative;
    z-index: 10;
}

.streamflix-content-section h2 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.streamflix-row-container {
    position: relative;
}

.streamflix-content-row {
    display: flex;
    overflow-x: auto;
    gap: 5px;
    padding-bottom: 10px;
    scrollbar-width: none;
    scroll-behavior: smooth;
    -ms-overflow-style: none;
}

.streamflix-content-row::-webkit-scrollbar {
    display: none;
}

.streamflix-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: #fff;
    border: none;
    padding: 10px;
    cursor: pointer;
    z-index: 15;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 1.5rem;
}

.streamflix-row-container:hover .streamflix-arrow {
    opacity: 1;
}

.streamflix-arrow-left {
    left: 0;
}

.streamflix-arrow-right {
    right: 0;
}

.streamflix-arrow:focus {
    outline: none;
    opacity: 1;
}

.streamflix-content-card {
    flex: 0 0 15%;
    aspect-ratio: 2/3;
    background: center/cover no-repeat;
    border-radius: 4px;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    cursor: pointer;
}

.streamflix-content-card:hover,
.streamflix-content-card:focus {
    transform: scale(1.3);
    z-index: 20;
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}

.streamflix-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent 50%);
    opacity: 0;
    transition: opacity 0.3s;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 10px;
}

.streamflix-content-card:hover .streamflix-card-overlay,
.streamflix-content-card:focus .streamflix-card-overlay {
    opacity: 1;
}

.streamflix-card-overlay h3 {
    font-size: 1rem;
    margin-bottom: 5px;
}

.streamflix-card-overlay p {
    font-size: 0.8rem;
    color: #ccc;
    margin-bottom: 10px;
}

.streamflix-card-buttons {
    display: flex;
    gap: 5px;
}

.streamflix-card-buttons button {
    background: #fff;
    color: #000;
    border: none;
    padding: 5px 10px;
    font-size: 0.8rem;
    cursor: pointer;
    border-radius: 50px;
    transition: background 0.3s, color 0.3s;
}

.streamflix-card-buttons button:hover,
.streamflix-card-buttons button:focus {
    background: #e50914;
    color: #fff;
}

.streamflix-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    overflow: auto;
}

.streamflix-modal-content {
    background: #181818;
    padding: 20px;
    border-radius: 8px;
    max-width: 80%;
    width: 100%;
    position: relative;
    text-align: left;
}

.streamflix-modal-content h2 {
    font-size: 2rem;
    margin-bottom: 15px;
}

.streamflix-modal-content p {
    font-size: 1rem;
    color: #ccc;
    margin-bottom: 15px;
}

.streamflix-video-player {
    width: 100%;
    max-height: 50vh;
    border-radius: 4px;
    margin-bottom: 20px;
}

.streamflix-video-player .vjs-control-bar {
    background: rgba(0,0,0,0.8);
    border-radius: 0 0 4px 4px;
}

.streamflix-video-player .vjs-big-play-button {
    background: #e50914;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    line-height: 60px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.streamflix-video-player .vjs-big-play-button:hover,
.streamflix-video-player .vjs-big-play-button:focus {
    background: #f40612;
}

.streamflix-video-player .vjs-play-progress,
.streamflix-video-player .vjs-volume-level {
    background: #e50914;
}

.streamflix-modal-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.streamflix-modal-buttons button {
    background: #e50914;
    color: #fff;
    border: none;
    padding: 10px 20px;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.3s;
}

.streamflix-modal-buttons button:hover,
.streamflix-modal-buttons button:focus {
    background: #f40612;
}

.streamflix-modal-close-button {
    background: rgba(109, 109, 110, 0.7);
}

.streamflix-modal-close-button:hover,
.streamflix-modal-close-button:focus {
    background: rgba(109, 109, 110, 1);
}

.streamflix-close-modal {
    position: absolute;
    top: 10px;
    right: 10px;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
}

.streamflix-close-modal:hover,
.streamflix-close-modal:focus {
    color: #e50914;
}

.streamflix-footer {
    background: #000;
    padding: 40px 20px;
    text-align: center;
    font-size: 0.8rem;
    color: #777;
}

.streamflix-footer a {
    color: #777;
    text-decoration: none;
    margin: 0 10px;
}

.streamflix-footer a:hover,
.streamflix-footer a:focus {
    color: #fff;
}

/* Accessibility improvements */
[role="button"] {
    cursor: pointer;
}

a, button, .streamflix-content-card, .streamflix-profile, .streamflix-hamburger {
    outline: none;
}

a:focus, button:focus, .streamflix-content-card:focus, .streamflix-profile:focus, .streamflix-hamburger:focus {
    outline: 2px solid #e50914;
}

/* Fix potential UI bugs */
.streamflix-content-row {
    overscroll-behavior-x: contain;
}

.streamflix-content-card {
    will-change: transform;
}

/* Responsive design */
@media (max-width: 1024px) {
    .streamflix-hero {
        height: 60vh;
    }
    .streamflix-hero-content {
        max-width: 70%;
    }
    .streamflix-hero-content h1 {
        font-size: 2.5rem;
    }
    .streamflix-content-card {
        flex: 0 0 20%;
    }
    .streamflix-modal-content {
        max-width: 90%;
    }
}

@media (max-width: 768px) {
    .streamflix-hero {
        height: 50vh;
    }
    .streamflix-hero-content h1 {
        font-size: 2rem;
    }
    .streamflix-hero-content p {
        font-size: 1rem;
    }
    .streamflix-content-card {
        flex: 0 0 25%;
    }
    .streamflix-nav ul {
        gap: 10px;
    }
    .streamflix-search input {
        width: 150px;
    }
    .streamflix-search input:focus {
        width: 200px;
    }
    .streamflix-arrow {
        padding: 8px;
        font-size: 1.2rem;
    }
    .streamflix-search-results {
        max-height: 300px;
    }
}

@media (max-width: 480px) {
    .streamflix-header {
        padding: 10px;
    }
    .streamflix-nav ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        background: #141414;
        padding: 20px;
        gap: 15px;
    }
    .streamflix-nav ul.active {
        display: flex;
    }
    .streamflix-hamburger {
        display: flex;
        margin-left: auto;
    }
    .streamflix-search {
        margin-left: 10px;
        order: -1;
    }
    .streamflix-profile {
        margin-left: 10px;
    }
    .streamflix-hero {
        height: 50vh;
    }
    .streamflix-hero-content {
        max-width: 100%;
        text-align: center;
        padding: 0 10px;
    }
    .streamflix-hero-content h1 {
        font-size: 1.8rem;
    }
    .streamflix-hero-content p {
        font-size: 0.9rem;
    }
    .streamflix-content-card {
        flex: 0 0 33.33%;
    }
    .streamflix-content-card:hover,
    .streamflix-content-card:focus {
        transform: scale(1.1);
    }
    .streamflix-arrow {
        padding: 5px;
        font-size: 1rem;
        opacity: 0.7;
    }
    .streamflix-row-container:hover .streamflix-arrow {
        opacity: 1;
    }
    .streamflix-modal-content {
        max-width: 95%;
        padding: 15px;
    }
    .streamflix-modal-content h2 {
        font-size: 1.5rem;
    }
    .streamflix-video-player {
        max-height: 40vh;
    }
}