/* General Body Styles */
body {
    font-family: 'Roboto', 'Arial', sans-serif;
    margin: 0;
    background-color: #f0f2f5;
    color: #1c1e21;
    font-size: 16px;
}

a {
    color: #1877f2;
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    text-decoration: underline;
}

.container {
    padding: 20px;
    max-width: 1600px;
    margin: 0 auto;
}

/* Header and Search Bar */
header {
    background-color: #ffffff;
    padding: 15px 20px;
    text-align: center;
    border-bottom: 1px solid #dddfe2;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

header h1 {
    margin: 0;
    font-size: 2.2em;
    color: #ff3377;
    font-family: 'Lato', sans-serif;
    font-weight: bold;
    display: inline-block;
}

header form {
    margin: 15px 0 0;
    display: flex;
    justify-content: center;
}

header input[type="search"] {
    width: 60%;
    max-width: 600px;
    padding: 12px 20px;
    font-size: 1em;
    border: 1px solid #ccd0d5;
    border-radius: 25px 0 0 25px;
    background-color: #f5f6f7;
    color: #1c1e21;
    transition: all 0.2s ease-in-out;
}

header input[type="search"]:focus {
    outline: none;
    border-color: #ff3377;
    background-color: #fff;
    box-shadow: 0 0 5px rgba(255, 51, 119, 0.5);
}

header button {
    padding: 12px 25px;
    border: none;
    background-color: #ff3377;
    color: white;
    font-size: 1em;
    cursor: pointer;
    border-radius: 0 25px 25px 0;
    transition: background-color 0.3s;
}

header button:hover {
    background-color: #e6005c;
}

/* Section Titles */
h2 {
    font-size: 1.8em;
    margin-top: 40px;
    margin-bottom: 20px;
    color: #333;
    font-weight: 500;
    border-bottom: 2px solid #ff3377;
    padding-bottom: 10px;
    display: inline-block;
}

.no-results {
    font-size: 1.2em;
    text-align: center;
    margin-top: 50px;
}

/* Video Grid */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.video-card {
    background-color: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

.video-card img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    border-bottom: 1px solid #eee;
}

.video-card h3 {
    padding: 12px 15px;
    margin: 0;
    font-size: 1em;
    color: #333;
    font-weight: 500;
    line-height: 1.4;
    flex-grow: 1;
}

/* --- FIX: WIDE SCREEN CENTERING FOR VIDEO PAGE --- */
.video-page-container {
    max-width: 1200px; /* This is the main content width */
    margin: 0 auto;    /* This centers the container */
    padding: 20px;
}

.video-player {
    position: relative;
    width: 100%;
    margin: 20px 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.video-player::before {
    content: '';
    display: block;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
}

.video-player iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.video-page-container h2 {
    font-size: 2.2em;
    text-align: left; /* Aligns title with the content block */
    border: none;
    padding: 0;
    margin-top: 0;
}

/* --- NEW: STATS AND RATING BAR --- */
.video-stats-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    background-color: #ffffff;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-top: 25px; /* More space between video and bar */
    margin-bottom: 25px;
    gap: 20px;
}


.video-stats-bar .views {
    font-size: 1.1em;
    color: #555;
    font-weight: 500;
}

.rating-widget {
    display: flex;
    align-items: center;
    gap: 15px;
}

.stars {
    display: flex;
    flex-direction: row-reverse; /* To make the hover effect work correctly */
    font-size: 2em;
    color: #ccc;
}

.stars .star {
    cursor: pointer;
    transition: color 0.2s;
}

.stars .star:hover,
.stars .star:hover ~ .star {
    color: #ffc107;
}

.rating-info {
    font-size: 0.9em;
    color: #777;
    min-width: 100px;
}

/* --- NEW: TAGS SECTION --- */
.tags-container {
    margin-top: 20px;
    padding-bottom: 20px;
}

.tags-container h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.2em;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    background-color: #e4e6eb;
    color: #333;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.9em;
    text-transform: capitalize;
    transition: background-color 0.3s;
}

.tag:hover {
    background-color: #d0d2d6;
    text-decoration: none;
}

/* Other Sections */
.recommended-videos {
    width: 100%;
    max-width: 1600px;
    margin: 40px auto;
    padding: 20px;
}
.recommended-videos h2 {
    text-align: left;
    font-size: 1.8em;
    border-bottom: 2px solid #ff3377;
    padding-bottom: 10px;
    display: inline-block;
    margin-bottom: 25px;
}

/* --- PAGINATION STYLES --- */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 0;
    list-style-type: none;
    margin: 0;
}

.pagination li {
    margin: 0 5px;
}

.pagination a {
    color: #ff3377;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    text-decoration: none;
    transition: all 0.3s;
    font-weight: 500;
}

.pagination a:hover {
    background-color: #ff3377;
    color: #fff;
    border-color: #ff3377;
}

.pagination .current {
    background-color: #ff3377;
    color: #fff;
    border-color: #ff3377;
    padding: 10px 15px;
    border-radius: 5px;
    font-weight: 500;.vi
}

.pagination .disabled {
    color: #aaa;
    pointer-events: none;
    border-color: #eee;
}

#age-gate-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.95); /* Darker overlay */
z-index: 2000;
display: flex;
justify-content: center;
align-items: center;
}

#age-gate-modal {
background-color: #1c1e21; /* Dark background for the modal */
padding: 40px;
border-radius: 12px;
text-align: center;
max-width: 500px;
width: 90%;
border: 1px solid #ff3377;
box-shadow: 0 0 30px rgba(255, 51, 119, 0.3);
}

#age-gate-modal h2 {
color: #ffffff;
font-size: 2.5em;
margin-top: 0;
border: none;
}

#age-gate-modal .age-badge {
display: inline-block;
font-size: 1.5em;
font-weight: bold;
color: #1c1e21;
background-color: #ff3377;
padding: 10px 20px;
border-radius: 8px;
margin-bottom: 20px;
}

#age-gate-modal p {
color: #ccc;
line-height: 1.6;
margin: 20px 0;
}

#age-gate-buttons {
margin-top: 30px;
display: flex;
justify-content: center;
gap: 20px;
}

#age-gate-buttons button {
padding: 15px 30px;
border: none;
border-radius: 8px;
font-size: 1.1em;
font-weight: bold;
cursor: pointer;
transition: all 0.3s;
}

#age-gate-enter {
background-color: #ff3377;
color: #fff;
}

#age-gate-enter:hover {
background-color: #fff;
color: #ff3377;
}

#age-gate-exit {
background-color: #555;
color: #fff;
}

#age-gate-exit:hover {
background-color: #777;
}
