/* ---------------------------------- */
/* 1. CSS Reset & Global Variables */
/* ---------------------------------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    /* Define dark theme colors */
    --clr-bg-dark: #121212;        /* Primary Dark Background */
    --clr-bg-card: #1e1e1e;        /* Lighter background for elements */
    --clr-text-light: #e0e0e0;     /* Primary text color */
    --clr-text-secondary: #aaaaaa; /* Secondary text color */
    --clr-primary-accent: #BB86FC; /* Primary accent (Purple/Blue) */
    --clr-secondary-accent: #03DAC6; /* Secondary accent (Teal) */
    --clr-border: #333333;         /* Dark border color */
    
    --font-family-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-family-primary);
    background-color: var(--clr-bg-dark);
    color: var(--clr-text-light);
    line-height: 1.6;
}

a {
    color: var(--clr-primary-accent);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--clr-secondary-accent);
}

/* Shared CTA Button Style */
.cta-button {
    display: inline-block;
    background-color: var(--clr-primary-accent);
    color: var(--clr-bg-dark);
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    border: none;
    cursor: pointer;
}

.cta-button:hover {
    background-color: var(--clr-secondary-accent);
    color: var(--clr-bg-dark);
    transform: translateY(-1px);
}

/* ---------------------------------- */
/* 2. Main Site Structure & Header */
/* ---------------------------------- */

#main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background-color: var(--clr-bg-card);
    border-bottom: 1px solid var(--clr-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 10px;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

.header-left, 
.header-right {
    display: flex;
    align-items: center;
    gap: 1em;
}

.header-right {
    margin-right: 20px;
}
.header-left {
    margin-left: 1.2em;
}

.logo {
    font-size: 1.5em;
    font-weight: bold;
    background-image: linear-gradient(to right, var(--clr-primary-accent), var(--clr-secondary-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--clr-secondary-accent);
    display: flex;

    white-space: nowrap;   /* Prevent line breaks */
    gap: 0;                /* Remove spacing between flex items */
}

.logo span {font-size:0.5em;font-weight: 300;}

.privacy-section h3,.about-section h3 {
    color: var(--clr-primary-accent);
}

/* Desktop Navigation */
#desktop-nav ul {
    list-style: none;
    display: flex;
}

#desktop-nav ul li {
    margin-left: 20px;
}

#desktop-nav ul li a {
    color: var(--clr-text-light);
    font-weight: 500;
}

/* Search Bar Styling */
#search-form {
    display: flex;
    background-color: var(--clr-bg-dark);
    border-radius: 5px;
    border: 1px solid var(--clr-border);
    overflow: hidden;
}

#search-form input[type="search"] {
    padding: 5px 10px;
    border: none;
    background: transparent;
    color: var(--clr-text-light);
    width: 200px;
    outline: none;
}

#search-form button {
    padding: 0 12px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--clr-primary-accent);
    color: var(--clr-bg-dark);
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
}

/* Mobile Menu Toggle */
.menu-icon {
    display: none;
    background: none;
    border: none;
    color: var(--clr-text-light);
    font-size: 1.5em;
    cursor: pointer;
}

/* Mobile Menu Overlay */
#mobile-menu-overlay {
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    height: calc(100% - 60px);
    background-color: rgba(18, 18, 18, 0.98);
    z-index: 999;
    padding: 20px;
    display: none;
    flex-direction: column;
    align-items: center;
}

#mobile-menu-overlay.open {
    display: flex;
}

#mobile-menu-overlay ul {
    list-style: none;
    width: 100%;
    text-align: center;
}

#mobile-menu-overlay ul li a {
    display: block;
    padding: 15px 0;
    font-size: 1.4em;
    color: var(--clr-text-light);
    border-bottom: 1px solid var(--clr-border);
}

#mobile-menu-overlay ul li:last-child a {
    border-bottom: none;
}

/* ---------------------------------- */
/* 3. Main Content & Video Post Page */
/* ---------------------------------- */

#site-content {
    margin-top: 60px;
    padding: 50px auto 10px auto;
}

.index-content {
    padding-left: 20px;
    padding-right: 20px;
}

.video-post-container {
    max-width: 1000px;
    margin: 10px auto;
}

  .video-player {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 aspect ratio */
    background-color: #000;
    margin-bottom: 20px;
    border-radius: 4px;
    overflow: hidden;
}

#post-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-color: #000;
}

.video-player {
    position: relative;
}

/* Fullscreen button */
#fullscreen-container {
    position: relative;
     
    z-index: 10; 
    justify-content: center;
    align-items: center;
    display: flex;
    gap: 3px;
    bottom: 1em;
}
#fullscreen-btn {
    padding: 4px 7px;
    background-color: rgba(0,0,0,0.5);
    color: #BCBCBC;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.2s;
    font-weight: 300;
}

#fullscreen-btn:hover {
    background-color: rgba(0,0,0,0.8);
}

#remove-btn {background: none;border:none;color:white;cursor: pointer; font-size: 1.3em}

.player-placeholder {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background-color: #000;
    color: var(--clr-text-secondary);
    display: flex;
    justify-content: center;
    align-items: center;
}

.video-info-card {
    background-color: var(--clr-bg-card);
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid var(--clr-border);
}

.info-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding-bottom: 15px;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--clr-border);
}

.video-title {
    font-size: 1.8em;
    color: var(--clr-secondary-accent);
    margin-bottom: 5px;
    display: flex;
    width: 100%;
    justify-content: space-between;
}

.post-hot {
    background: linear-gradient(270deg, var(--clr-primary-accent), var(--clr-secondary-accent),red,yellow);
    background-size: 600% 100%; /* Make gradient larger than text for animation */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--clr-secondary-accent);
    padding: 0px 7px;
    border-radius: 3px;
    font-weight: bold;
    box-shadow: 0px 2px 8px #42445A;

    animation: gradientMove 5s linear infinite; /* Animation */
}

@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}


.channel-info {
    color: var(--clr-secondary-accent);
}

.post-link {
    color: var(--clr-secondary-accent);
}

.video-stats {
    font-size: 0.9em;
    color: var(--clr-text-secondary);
    display: flex;
    gap: 15px;
}

.description-text {
    margin-bottom: 15px;
    color: var(--clr-text-secondary);
}


.metadata-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    padding-top: 10px;
    border-top: 1px dashed var(--clr-border);
}

.meta-label {
    font-weight: bold;
    color: var(--clr-primary-accent);
    margin-right: 5px;
}

.meta-link {
    color: var(--clr-secondary-accent);
}

/* Toggle Button */
.toggle-button {
    background-color: var(--clr-bg-dark);
    color: var(--clr-text-light);
    border: 1px solid var(--clr-border);
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

#video-description-content {
    max-height: 500px;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out, padding 0.4s ease, border-top 0.4s ease;
    padding-top: 15px;
    border-top: 1px solid var(--clr-border);
}

#video-description-content.collapsed {
    max-height: 0;
    padding-top: 0;
    border-top: 0;
}

/* Arrow rotation when expanded */
#video-description-content:not(.collapsed) + .toggle-button i {
    transform: rotate(180deg);
}

.toggle-button i {
    transition: transform 0.3s ease;
}

.share-button {
     
    color: var(--clr-secondary-accent);
}

.share-button span {
    color: var(--clr-primary-accent);
    font-weight: bold;
}

/* ---------------------------------- */
/* 4. Tabbed Menu System */
/* ---------------------------------- */

.video-tabs {
    margin-bottom: 30px;
}

.tab-menu {
    display: flex;
    border-bottom: 2px solid var(--clr-border);
    margin-bottom: 20px;
    gap:7%;
    font-size: 18px;
    margin: 3px 1em;
}

.tab-button {
    background: none;
    border: none;
    padding: 15px 12px;
    color: var(--clr-text-secondary);
    cursor: pointer;
    font-size: 18px;
    font-weight: 500;
    transition: color 0.3s, border-bottom 0.3s;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.tab-button:hover {
    color: var(--clr-text-light);
}

.tab-button.active {
    color: var(--clr-primary-accent);
    border-bottom: 2px solid var(--clr-primary-accent);
    font-weight: bold;
}

.tab-content {
    background-color: var(--clr-bg-card);
    padding: 10px 25px 10px 25px;
    border-radius: 8px;
    border: 1px solid var(--clr-border);
    display: none;
    margin: 3px 1em;
}

.tab-content.active {
    display: block;
}

#reportBtn {
  background: linear-gradient(to right, var(--clr-primary-accent), var(--clr-secondary-accent));
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 1em; 
  display: flex; 
  position: relative; 
  padding: 4px 8px;
  border-radius: 8px;
}

/* Overlay popup container */
.report-popup {
  display: none; /* hidden by default */
  position: fixed; /* fixed to viewport */
  inset: 0; /* top:0; right:0; bottom:0; left:0 */
  background: rgba(0, 0, 0, 0.6); /* semi-transparent dark overlay */
  justify-content: center; /* center horizontally */
  align-items: center; /* center vertically */
  z-index: 9999;
}

/* Inner popup box */
.report-box {
  background: var(--clr-bg-card);
  padding: 20px;
  width: 90%;
  max-width: 450px;
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
  position: relative;
  display: flex;
  flex-direction: column;
}
.report-box h3 {color: var(--clr-secondary-accent);}
/* Optional: style inputs */
.report-box input[type="text"],
.report-box input[type="email"] {
  width: 100%;
  padding: 8px;
  margin: 5px 0 10px;
  border-radius: 5px;
  border: 1px solid #ccc;
  color: black;
  outline: none;
}

/* Buttons */
.report-box .popup-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.report-box .submit-btn,
.report-box .close-btn {
  padding: 8px 12px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.report-box .submit-btn {
  background-color: #28a745;
  color: #fff;
}

.report-box .close-btn {
  background-color: #dc3545;
  color: #fff;
}
 
 

.recommended-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    margin-top: 15px;
}

.rec-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: #111;
    cursor: pointer;
    transition: transform 0.3s ease;
    margin-bottom:15px;
    padding-bottom:10px;
     
    
}

.rec-item:hover {
    transform: scale(1.05);
}

.rec-thumb {
    width: 100%;
    height: 480px; 
    object-fit: cover;
    display: block;
}

.is-hot {
    display: flex;
    position: absolute;
    margin-top: 3px;
    right: 5px;
    background: linear-gradient(90deg, var(--clr-primary-accent), var(--clr-secondary-accent));
    color: #fff;
    font-size: 0.7em;
    padding: 3px 6px;
    border-radius: 3px;
    font-weight: bold;
    box-shadow: 0px 2px 8px #42445A;
     
}



#recommended {
    padding: 10px 35px;
}

.rec-item {
    padding-bottom: 10px;
    font-size: 25px;
}

.rec-title {
    margin-top: 15px;
     
color: var(--clr-secondary-accent);
    font-weight: bold;
}

.rec-model {
     
    color: #aaa;
}

.rec-hot {
    display:fixed;
    position:absolute;
top:4px;
right:8px;
padding:1px 4px;
font-size: 0.7em;
box-shadow: 0px 2px 8px #42445A;
background:linear-gradient(to right, var(--clr-primary-accent), var(--clr-secondary-accent));
color: white;
border-radius:4px;
font-weight:bold;
}

#show-more-rec {
    background: linear-gradient(to right, var(--clr-primary-accent), var(--clr-secondary-accent));
    border: none;
    color: white;
    border-radius: 5px;
    padding:3px 6px;
}

#auth-container input,#comment-name {
    background: #111;
    border-radius: 5px;
    border: solid 1px var(--clr-border);
    padding:6px 12px;
    outline: none;
    color: white;
}

#auth-container button {
    padding: 7px 10px;
    background: linear-gradient(to right, var(--clr-primary-accent), var(--clr-secondary-accent));
    color: #fff;
    border: none;
    border-radius: 5px;
}

.comment-email,#comment-name {
    width: 100%;
     
    height: 15px;
    display: flex;
    flex-direction: column;
    padding:15px 8px;
    border: 1px solid #444;
    border-radius: 4px;
     
     
}

#comment-input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #444;
    background: #111;
    color: #eee;
    resize: vertical;
    font-size: 15px;
    outline: none;
}

#save-name-btn {
    padding: 1px 3px 1px 3px;
background: linear-gradient(to right, var(--clr-primary-accent), var(--clr-secondary-accent));
color: #fff;
border-radius: 5px;
border: none;
}
#submit-comment {
    padding: 10px 12px;
    background: linear-gradient(to right,var(--clr-primary-accent),var(--clr-secondary-accent));
    color: #fff;
    border: none;
    width: 120px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: opacity .2s;
    margin-bottom:1em;
}

.submit-comment:hover {
    opacity: 0.8;
}

.comment-user {
    font-weight: bold;
    font-style: italic;
}
.comment-text {
    color: var(--clr-secondary-accent);
}

.delete-btn {
    border:none;
    background: var(--clr-primary-accent);
    padding: 2px 4px;
     
}

.comment-card{
    border:solid 1px var(--clr-secondary-accent);
    padding: 3px 4px;
    border-top-right-radius: 6px;
    border-bottom-right-radius: 6px;
    border-left: solid 8px var(--clr-primary-accent);
    margin-top: 12px;
}

/* ---------------------------------- */
/* 5. Footer */
/* ---------------------------------- */

#main-footer {
    width: 100%;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--clr-bg-card);
    border-top: 1px solid var(--clr-border); 
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.5); 
    padding: 0 10px;
    margin-top: 30px;
    font-size: 0.9em;
    color: var(--clr-text-secondary);
    margin-bottom: 0px;
}

/* ---------------------------------- */
/* 6. Pagination */
#pagination-controls {
    margin: auto;
    text-align: center;
}

#pagination-controls ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

#pagination-controls li a {
    display: block;
    padding: 4px 8px;
    background-color: var(--clr-bg-card);
    color: var(--clr-text-light);
    border: 1px solid #333;
    border-radius: 4px;
    transition: background-color 0.2s, color 0.2s;
    font-weight: 500;
}

#pagination-controls li a:hover {
    background-color: #555;
}

#pagination-controls li a.active {
    background-color: #e50914;
    font-weight: bold;
}

#pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 30px 0;
    gap: 10px;
}

.page-btn {
    padding: 6px 12px;
    border: none;
    background: var(--clr-bg-card);
    color: var(--clr-text-light);
    cursor: pointer;
    border-radius: 5px;
    font-size: 14px;
}

.page-btn:hover {
    background: #444;
}

.page-number {
    padding: 6px 12px;
    border-radius: 5px;
    cursor: pointer;
    background: var(--clr-bg-card);
    border: 1px solid #333;
}

.page-number.active {
    background: #e50914;
    color: #fff;
    font-weight: bold;
}

.page-number:hover {
    background: #555;
}

/* ---------------------------------- */
/* 7. Video Grid & Thumbnails */
.video-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumbnail-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}

#video-list-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 20px;
}


#results-container {
    display:grid; grid-template-columns:repeat(auto-fill, minmax(330px,1fr)); gap:15px;
}
/* ---------------------------------- */
/* 8. Media Queries */
/* ---------------------------------- */
/* Desktop: 2 per row */
 
@media (max-width: 900px) {
    #desktop-nav {
        display: none;
    }
    .menu-icon {
        display: block;
    }
    #search-form input[type="search"] {
        width: 100px;
    }
}

@media (max-width: 600px) {
    #search-form input[type="search"] {
        width: 100%; 
        padding: 5px 5px;
    }
    .header-right {
        margin-right: 10px;
        margin-left: 1em;
    }
    .header-left {
        margin-left:0.5em;
    }
    .video-title {
        font-size: 1.5em;
    }
    .tab-button {
        padding: 15px 5px;
        font-size: 0.9em;
    }
    .metadata-grid {
        grid-template-columns: 1fr;
    }
    
    #results-container {
        display: fixed;
        position: relative;
        width: 250px;
    }
    
    
    .rec-item {
    padding-bottom: 5px;
    font-size: 15px;
    }
    .rec-thumb {
    height: 160px;
    }
    #recommended {
        padding:10px 10px;
    }
    
    
}


.ads {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
}


.video-player {
    position: relative;
}

.video-overlay {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(6px);
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.overlay-box {
     
    text-align: center;
    color: #fff;
    background: rgba(0, 0, 0, 0.6);
    padding: 20px;
    border-radius: 10px;
    
}
.overlay-btn {
    display: flex;
    justify-content: center;
    align-items: center;
}

.overlay-box button {
    padding: 12px 20px;
    font-size: 16px;
    align-self: center;
    text-align: center;
    background: linear-gradient(to right,var(--clr-primary-accent),var(--clr-secondary-accent));
    border:none;
}