/* XVideos Style - Dark Theme */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background-color: #1a1a1a;
    color: #e0e0e0;
    line-height: 1.4;
}

.container {
    max-width: 1480px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header */
header {
    background-color: #000000;
    border-bottom: 1px solid #2a2a2a;
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    padding: 12px 0;
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.logo {
    font-size: 26px;
    font-weight: bold;
    color: #ff6500;
    text-decoration: none;
    letter-spacing: -1px;
}

/* Search Form */
.search-form {
    flex: 1;
    max-width: 600px;
    display: flex;
    gap: 8px;
}

.search-form input {
    flex: 1;
    padding: 8px 15px;
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 4px;
    color: #e0e0e0;
    font-size: 14px;
}

.search-form input:focus {
    outline: none;
    border-color: #ff6500;
    background: #333;
}

.search-form button {
    padding: 8px 20px;
    background: #ff6500;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
}

.search-form button:hover {
    background: #ff7a1f;
}

.nav-links a {
    color: #999;
    text-decoration: none;
    font-size: 14px;
    margin-left: 20px;
}

.nav-links a:hover {
    color: #ff6500;
}

/* Teen Categories Navigation */
.categories-nav {
    background-color: #0f0f0f;
    padding: 10px 0;
    border-bottom: 1px solid #2a2a2a;
}

.categories-nav .container {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.all-tags-container {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #2a2a2a;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 500px;
    }
}

.cat-link {
    display: inline-block;
    background: #2a2a2a;
    color: #e0e0e0 !important;
    padding: 6px 14px;
    border-radius: 3px;
    text-decoration: none !important;
    font-size: 13px;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.cat-link:hover {
    background: #ff6500;
    color: #fff !important;
    transform: translateY(-1px);
}

.cat-link.active {
    background: #ff6500;
    color: #fff !important;
}

.more-tags-btn {
    background: #ff6500;
    color: #fff !important;
    font-weight: bold;
}
    font-weight: normal;
    transition: all 0.2s ease;
}

.cat-link:hover {
    background: #ff6500;
    color: white !important;
}

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

h1 {
    margin-bottom: 20px;
    color: #e0e0e0;
    font-size: 24px;
    font-weight: normal;
}

/* Video Grid - XVideos style with exact thumbnail size */
.video-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px 16px;
    margin-bottom: 20px;
}

.video-card {
    background: transparent;
    border-radius: 0;
    overflow: hidden;
    transition: opacity 0.2s;
}

.video-card:hover {
    opacity: 0.85;
}

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

.video-thumbnail {
    position: relative;
    width: 100%;
    height: 198px; /* XVideos exact height */
    background: #0a0a0a;
    overflow: hidden;
    border-radius: 4px;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s;
    display: block;
}

.video-card:hover .video-thumbnail img {
    transform: scale(1.05);
}

.duration {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 3px 8px;
    font-size: 12px;
    border-radius: 3px;
    font-weight: bold;
}

.video-info {
    padding: 8px 0;
}

.video-info h3 {
    font-size: 14px;
    margin-bottom: 4px;
    color: #e0e0e0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.3;
    font-weight: normal;
    min-height: 36px;
}

.video-info h3:hover {
    color: #ff6500;
}

.meta {
    display: flex;
    gap: 10px;
    font-size: 12px;
    color: #999;
}

.meta span {
    display: flex;
    align-items: center;
    gap: 3px;
}

/* Video Page */
.video-page h1 {
    font-size: 20px;
    margin-bottom: 15px;
    font-weight: normal;
}

.video-player {
    background: #000;
    border-radius: 0;
    overflow: hidden;
    margin-bottom: 20px;
    width: 100%;
}

.video-player iframe {
    width: 100%;
    height: 600px;
    border: none;
    display: block;
}

.video-details {
    background: #0f0f0f;
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 20px;
    border: 1px solid #2a2a2a;
}

.stats {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    font-size: 13px;
    color: #999;
}

.stats strong {
    color: #e0e0e0;
}

.tags {
    margin: 15px 0;
}

.tags h3 {
    margin-bottom: 10px;
    font-size: 16px;
    font-weight: normal;
    color: #e0e0e0;
}

.tag {
    display: inline-block;
    background: #2a2a2a;
    color: #e0e0e0;
    padding: 5px 12px;
    border-radius: 3px;
    margin: 3px;
    text-decoration: none;
    font-size: 12px;
    transition: background 0.2s;
}

.tag:hover {
    background: #ff6500;
    color: white;
}

.cta-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #2a2a2a;
}

.cta-button {
    display: inline-block;
    background: #ff6500;
    color: white;
    padding: 12px 30px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 15px;
    font-weight: bold;
    transition: background 0.2s;
}

.cta-button:hover {
    background: #ff7a1f;
}

/* Pagination - XVideos style */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.page-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 10px;
    background: #2a2a2a;
    color: #e0e0e0;
    text-decoration: none;
    font-size: 13px;
    border-radius: 3px;
    transition: background 0.2s;
}

.page-num:hover {
    background: #3a3a3a;
}

.page-num.active {
    background: #ff6500;
    color: white;
    font-weight: bold;
}

.page-next {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    background: #ff6500;
    color: white;
    text-decoration: none;
    font-size: 13px;
    font-weight: bold;
    border-radius: 3px;
    transition: background 0.2s;
    margin-left: 4px;
}

.page-next:hover {
    background: #ff7a1f;
}

.page-ellipsis {
    color: #999;
    font-size: 13px;
    padding: 0 5px;
}

/* Footer */
footer {
    background: #000000;
    color: #666;
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
    border-top: 1px solid #2a2a2a;
    font-size: 12px;
}

.footer-description {
    max-width: 900px;
    margin: 0 auto 20px auto;
    padding: 20px;
    background: #1a1a1a;
    border-radius: 8px;
    text-align: left;
    line-height: 1.6;
}

.footer-description p {
    color: #999;
    font-size: 13px;
    margin: 0;
}

/* Stats Page */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: #0f0f0f;
    color: white;
    padding: 30px;
    border-radius: 4px;
    text-align: center;
    border: 1px solid #2a2a2a;
}

.stat-card h2 {
    font-size: 36px;
    margin-bottom: 10px;
    color: #ff6500;
}

.stat-card p {
    color: #999;
    font-size: 14px;
}

.stats-section {
    background: #0f0f0f;
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 20px;
    border: 1px solid #2a2a2a;
}

.stats-section h2 {
    margin-bottom: 15px;
    color: #e0e0e0;
    font-size: 18px;
    font-weight: normal;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th,
table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #2a2a2a;
    font-size: 13px;
}

table th {
    background: #000000;
    color: #ff6500;
    font-weight: normal;
}

table td {
    color: #e0e0e0;
}

table tr:hover {
    background: #1a1a1a;
}

/* Responsive Design */

/* Large Desktop (1400px+) - 4 columns */
@media (min-width: 1400px) {
    .container {
        max-width: 1480px;
    }
    .video-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px 16px;
    }
    .video-thumbnail {
        height: 198px;
    }
}

/* Desktop (1200-1399px) - 4 columns, slightly narrower */
@media (min-width: 1200px) and (max-width: 1399px) {
    .container {
        max-width: 1200px;
    }
    .video-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 18px 14px;
    }
    .video-thumbnail {
        height: 180px;
    }
}

/* Medium Desktop (992-1199px) - 3 columns */
@media (min-width: 992px) and (max-width: 1199px) {
    .container {
        max-width: 970px;
    }
    .video-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 18px 14px;
    }
    .video-thumbnail {
        height: 182px;
    }
}

/* Tablet Landscape (768-991px) - 3 columns */
@media (min-width: 768px) and (max-width: 991px) {
    .container {
        max-width: 750px;
    }
    .video-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px 12px;
    }
    .video-thumbnail {
        height: 140px;
    }
    .video-info h3 {
        font-size: 13px;
        min-height: 32px;
    }
}

/* Tablet Portrait & Large Phone (576-767px) - 2 columns */
@media (min-width: 576px) and (max-width: 767px) {
    nav .container {
        flex-direction: column;
        gap: 10px;
    }

    .search-form {
        max-width: 100%;
    }

    .video-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px 12px;
    }

    .video-thumbnail {
        height: 160px;
    }

    .video-info h3 {
        font-size: 13px;
        min-height: 32px;
    }

    .video-player iframe {
        height: 350px;
    }

    .categories-nav .container {
        justify-content: flex-start;
    }
    
    h1 {
        font-size: 20px;
    }
    
    .cat-link {
        font-size: 12px;
        padding: 5px 10px;
    }
}

/* Phone (480-575px) - 2 columns */
@media (min-width: 480px) and (max-width: 575px) {
    nav .container {
        flex-direction: column;
        gap: 10px;
    }

    .search-form {
        max-width: 100%;
    }

    .logo {
        font-size: 22px;
    }

    .video-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px 10px;
    }

    .video-thumbnail {
        height: 130px;
    }

    .video-info h3 {
        font-size: 12px;
        min-height: 30px;
        -webkit-line-clamp: 2;
    }

    .meta {
        font-size: 11px;
    }

    .duration {
        font-size: 11px;
        padding: 2px 6px;
    }

    .video-player iframe {
        height: 280px;
    }

    .categories-nav .container {
        justify-content: flex-start;
    }
    
    h1 {
        font-size: 18px;
    }
    
    .cat-link {
        font-size: 11px;
        padding: 5px 9px;
    }
}

/* Small Phone (<480px) - 2 columns compact */
@media (max-width: 479px) {
    nav .container {
        flex-direction: column;
        gap: 8px;
    }

    .search-form {
        max-width: 100%;
    }

    .logo {
        font-size: 20px;
    }

    .video-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px 8px;
    }

    .video-thumbnail {
        height: 110px;
    }

    .video-info {
        padding: 6px 0;
    }

    .video-info h3 {
        font-size: 11px;
        min-height: 28px;
        -webkit-line-clamp: 2;
        line-height: 1.3;
    }

    .meta {
        font-size: 10px;
    }

    .duration {
        font-size: 10px;
        padding: 2px 5px;
        bottom: 4px;
        right: 4px;
    }

    .video-player iframe {
        height: 220px;
    }

    .categories-nav {
        padding: 8px 0;
    }

    .categories-nav .container {
        gap: 6px;
        justify-content: flex-start;
    }
    
    h1 {
        font-size: 16px;
        margin-bottom: 15px;
    }
    
    .cat-link {
        font-size: 10px;
        padding: 4px 8px;
    }

    .container {
        padding: 0 10px;
    }

    footer {
        font-size: 11px;
        padding: 15px 0;
    }

    .footer-description {
        padding: 15px;
        font-size: 11px;
    }

    /* Pagination adjustments */
    .pagination {
        gap: 4px;
        margin: 20px 0;
    }

    .page-num {
        min-width: 28px;
        height: 28px;
        font-size: 12px;
        padding: 0 6px;
    }

    .page-next {
        padding: 6px 12px;
        font-size: 12px;
    }

    .page-ellipsis {
        font-size: 12px;
    }
}
