/* RESET & STRUCTURAL BASE */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #000000; /* Pitch Black background */
    color: #FFFFFF;
    padding-bottom: 70px; /* Space buffer to avoid sticky footer coverage */
}

/* BRAND HEADER */
.main-header {
    background-color: #121212;
    padding: 15px;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid #222222;
}

.brand-logo {
    font-size: 24px;
    text-align: center;
    margin-bottom: 12px;
    letter-spacing: 1px;
}

.brand-logo span {
    color: #ff0055; /* Electric accent styling color */
}

.search-box {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.search-box input {
    width: 100%;
    padding: 10px 15px;
    background-color: #222222;
    border: 1px solid #333333;
    border-radius: 25px;
    color: white;
    font-size: 14px;
    outline: none;
    transition: border 0.2s ease;
}

.search-box input:focus {
    border-color: #ff0055;
}

/* RESPONSIBLE AD CONTAINERS */
.ad-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 15px auto;
    width: 100%;
}

.ad-placeholder {
    background-color: #1a1a1a;
    border: 1px dashed #444444;
    color: #777777;
    font-size: 11px;
    text-align: center;
    padding: 10px;
    width: 100%;
    max-width: 728px;
    border-radius: 4px;
}

.sticky-footer-ad {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #0a0a0a;
    z-index: 200;
    display: flex;
    justify-content: center;
    padding: 5px 0;
    border-top: 1px solid #222222;
}

/* TUBE DISPLAY GRID */
.content-container {
    padding: 10px;
    max-width: 1200px;
    margin: 0 auto;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* STRICTLY 2 COLUMNS ON MOBILE LAYOUTS */
    gap: 10px;
}

/* VIDEO CARD ITEM STYLE */
.video-card {
    background-color: #121212;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.thumbnail-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* Force 16:9 widescreen aspect scaling ratio */
    background-color: #1f1f1f;
}

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

.duration-tag {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background-color: rgba(0, 0, 0, 0.8);
    color: #fff;
    font-size: 11px;
    padding: 2px 5px;
    border-radius: 3px;
    font-weight: bold;
}

.video-title {
    font-size: 13px;
    font-weight: 500;
    padding: 8px;
    line-height: 1.3;
    color: #e5e5e5;
    /* Two-line ellipsis clamping text logic */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* NATIVE AD CARD MATCHING VIDEO MIXINS */
.native-ad-card {
    background-color: #1a1517;
    border: 1px solid rgba(255, 0, 85, 0.2);
}
.native-ad-label {
    position: absolute;
    top: 6px;
    left: 6px;
    background-color: #ff0055;
    color: white;
    font-size: 10px;
    padding: 1px 4px;
    font-weight: bold;
    border-radius: 2px;
}

/* FIXED MODAL PLAYER SCREEN WINDOW */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease;
}

.modal.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
}

.modal-wrapper {
    position: relative;
    width: 95%;
    max-width: 700px;
    background-color: #121212;
    border-radius: 8px;
    overflow: hidden;
    z-index: 510;
    padding: 10px;
    border: 1px solid #222222;
}

.close-modal-btn {
    position: absolute;
    top: 5px;
    right: 12px;
    color: #aaaaaa;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    z-index: 520;
}

.close-modal-btn:hover {
    color: #ff0055;
}

.iframe-aspect-ratio-box {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Frame aspect sizing window */
    margin-top: 25px;
    background-color: #000;
}

.iframe-aspect-ratio-box iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.modal-title {
    font-size: 15px;
    padding: 10px 0;
    font-weight: 500;
    border-bottom: 1px solid #222222;
}

/* MEDIA QUERY RESPONSIVENESS SCALING DESKTOP SYSTEM UPGRADES */
@media (min-width: 600px) {
    .video-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 900px) {
    .video-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}