/* style.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #0a0a0a;
    color: #e0e0e0;
    line-height: 1.6;
}

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

/* Header */
header {
    background: #1a1a1a;
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
    position: sticky;
    top: 0;
    z-index: 100;
}

header h1 {
    color: #ff0050;
    margin-bottom: 15px;
    font-size: 28px;
}

header h1 a {
    color: #ff0050;
    text-decoration: none;
}

nav {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

nav a {
    color: #b0b0b0;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s;
    font-size: 14px;
}

nav a:hover {
    background: #2a2a2a;
    color: #fff;
}

nav a.active {
    background: #ff0050;
    color: #fff;
}

/* Main Content */
main {
    padding: 40px 20px;
    min-height: calc(100vh - 200px);
}

/* Video Grid */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.video-card {
    background: #1a1a1a;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(255, 0, 80, 0.3);
}

.video-card a {
    text-decoration: none;
    color: inherit;
}

.video-thumbnail {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    background: #2a2a2a;
    overflow: hidden;
}

.video-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.placeholder-thumb {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: #ff0050;
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
}

.duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.8);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.video-info {
    padding: 15px;
}

.video-info h3 {
    font-size: 16px;
    margin-bottom: 8px;
    color: #fff;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.views {
    font-size: 13px;
    color: #888;
}

/* ================= WATCH PAGE ================= */

.watch-container {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 30px;
}

.player-section {
    width: 100%;
}

/* 🔥 FIXED VIDEO PLAYER (MOBILE SAFE) */
.video-player {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9; /* modern + mobile fix */
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
}

/* 🔥 THIS WAS MISSING */
.video-player iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.video-details {
    background: #1a1a1a;
    padding: 20px;
    border-radius: 12px;
}

.video-details h2 {
    font-size: 24px;
    margin-bottom: 12px;
    color: #fff;
}

.video-meta {
    display: flex;
    gap: 10px;
    align-items: center;
    font-size: 14px;
    color: #888;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.category-badge {
    background: #ff0050;
    color: #fff;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.video-description {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #2a2a2a;
    color: #b0b0b0;
    line-height: 1.8;
}

/* Related Videos */
.related-videos {
    background: #1a1a1a;
    padding: 20px;
    border-radius: 12px;
    height: fit-content;
}

.related-videos h3 {
    margin-bottom: 20px;
    color: #fff;
    font-size: 18px;
}

.related-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.related-video-card {
    display: flex;
    gap: 12px;
    background: #0a0a0a;
    border-radius: 8px;
    overflow: hidden;
    transition: background 0.3s;
}

.related-video-card:hover {
    background: #2a2a2a;
}

.related-video-card a {
    display: flex;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    width: 100%;
}

.related-thumbnail {
    position: relative;
    width: 160px;
    min-width: 160px;
    height: 90px;
    background: #2a2a2a;
}

.related-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.placeholder-thumb-small {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #ff0050;
}

.related-info {
    flex: 1;
    padding: 8px 8px 8px 0;
}

.related-info h4 {
    font-size: 14px;
    margin-bottom: 6px;
    color: #fff;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.related-info p {
    font-size: 12px;
    color: #888;
}

/* Footer */
footer {
    background: #1a1a1a;
    padding: 30px 0;
    text-align: center;
    color: #888;
    margin-top: 60px;
}

/* ================= RESPONSIVE ================= */

@media (max-width: 1024px) {
    .watch-container {
        grid-template-columns: 1fr;
    }

    .related-videos {
        margin-top: 30px;
    }

    .related-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }

    .related-video-card {
        flex-direction: column;
    }

    .related-thumbnail {
        width: 100%;
        height: 180px;
    }
}

@media (max-width: 768px) {
    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 20px;
    }

    header h1 {
        font-size: 22px;
    }

    nav {
        gap: 10px;
    }

    nav a {
        font-size: 13px;
        padding: 6px 12px;
    }
}

@media (max-width: 480px) {
    .video-player {
        border-radius: 0;
    }

    main {
        padding: 20px 10px;
    }
}

