/* assets/style.css */

:root {
    /* Premium Dark Palette */
    --bg-body: #121212;
    --bg-surface: #1e1e1e;
    --bg-card: #252525;
    --text-primary: #e0e0e0;
    --text-secondary: #a0a0a0;
    --accent-color: #bb86fc;
    /* Premium Purple */
    --accent-hover: #996bf5;
    --border-color: #333333;

    /* Layout */
    --header-height: 70px;
    --container-width: 1200px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-body);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
}

a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s;
}

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

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

/* --- Layout Containers --- */

.row {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.clear {
    clear: both;
}

/* --- Header (#masthead) --- */

.site-header {
    background-color: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    /* Enhanced shadow */
}

.site-branding {
    justify-content: space-between;
    padding-bottom: 10px;
    align-items: center;
    /* Align items vertically */
}

.site-title {
    font-size: 1.8rem;
    font-weight: 700;
}

.site-title i {
    color: var(--accent-color);
}

.site-description {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: -5px;
}

.header-search {
    flex: 0 0 300px;
}

#searchform {
    display: flex;
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.input-group-field {
    background: transparent;
    border: none;
    color: var(--text-primary);
    padding: 10px 15px;
    /* Bigger touch target */
    flex-grow: 1;
    outline: none;
    font-size: 0.95rem;
}

#searchsubmit {
    background: var(--bg-card);
    border: none;
    color: var(--text-secondary);
    padding: 0 15px;
    cursor: pointer;
}

#searchsubmit:hover {
    color: var(--accent-color);
}

/* --- Navigation --- */

.main-navigation {
    background-color: var(--bg-card);
    border-top: 1px solid var(--border-color);
    position: relative;
    /* For absolute mobile menu */
}

.nav-container {
    /* Container inherits row max-width and centering */
    padding: 0 15px;
}

#head-mobile {
    display: none;
    padding: 15px;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--text-primary);
    order: 2;
    /* Force right of logo in mobile flex row */
    margin-left: auto;
    /* Push to far right */
}

.main-navigation ul {
    display: flex;
    overflow-x: auto;
    margin: 0;
    padding: 0;
    list-style: none;
}

.main-navigation li {
    margin-right: 5px;
    list-style: none;
}

.main-navigation a {
    display: block;
    padding: 12px 15px;
    /* Added padding for better touch target */
    font-weight: 500;
    font-size: 0.95rem;
    white-space: nowrap;
}

.main-navigation .current-menu-item a {
    color: var(--accent-color);
    border-bottom: 2px solid var(--accent-color);
}

/* Mobile Menu Styles */
@media (max-width: 768px) {
    .header-search {
        display: none;
    }

    #head-mobile {
        display: block;
        margin-left: auto;
        /* Push to the right */
    }

    .nav-container {
        position: static;
        padding: 0;
    }

    .main-navigation ul {
        display: none;
        /* Hide menu by default */
        flex-direction: column;
        width: 100%;
        background-color: var(--bg-card);
        border-top: 1px solid var(--border-color);
        position: absolute;
        top: 100%;
        left: 0;
        z-index: 999;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    }

    .main-navigation ul.active {
        display: block;
        /* Show when active */
    }

    .main-navigation li {
        width: 100%;
        margin: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .main-navigation a {
        padding: 15px;
    }

    .main-navigation .current-menu-item a {
        border-bottom: none;
        border-left: 4px solid var(--accent-color);
        background: rgba(255, 255, 255, 0.02);
    }
}

/* --- Main Content --- */

.site-main {
    max-width: var(--container-width);
    margin: 30px auto;
    padding: 0 15px;
    min-height: 80vh;
}

.page-header {
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
}

.widget-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--accent-color);
}

/* --- Video Grid (.videos-list) --- */

.videos-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* Strict 4-column desktop */
    gap: 20px;
    margin-bottom: 40px;
}

@media (max-width: 992px) {
    .videos-list {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .videos-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .videos-list {
        grid-template-columns: 1fr;
    }
}

/* --- Video Card (article.loop-video) --- */

.loop-video {
    background-color: var(--bg-card);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.loop-video:hover {
    transform: translateY(-7px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
    border-color: var(--accent-color);
}

.post-thumbnail {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

/* Gradient overlay for better text readability */
.post-thumbnail::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    pointer-events: none;
}

.video-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 3px 6px;
    font-size: 0.75rem;
    border-radius: 4px;
    font-weight: 600;
    z-index: 2;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.video-views {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 3px 6px;
    font-size: 0.75rem;
    border-radius: 4px;
    font-weight: 600;
    z-index: 2;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.video-views i {
    margin-right: 3px;
}

.entry-header {
    padding: 12px;
}

.entry-header span {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    /* Standard property for compatibility */
    -webkit-box-orient: vertical;
    margin-bottom: 5px;
    color: var(--text-primary);
}

.entry-meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
}

/* --- Video Detail Page --- */

.video-player-container {
    margin-bottom: 20px;
}

.video-player-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 */
    height: 0;
    overflow: hidden;
    background: #000;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

.video-player-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-info h1 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.video-meta {
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.video-meta span {
    margin-right: 20px;
}

.video-actions {
    margin-bottom: 20px;
}

.btn-download {
    display: inline-block;
    background: var(--accent-color);
    color: #000;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: 700;
    transition: background 0.2s;
}

.btn-download:hover {
    background: var(--accent-hover);
}

.section-more {
    text-align: center;
    margin-top: 20px;
    margin-bottom: 10px;
}

.btn-more {
    display: inline-block;
    background: transparent;
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
    padding: 10px 25px;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-more:hover {
    background: var(--accent-color);
    color: #000;
}

.btn-more i {
    margin-left: 8px;
    transition: transform 0.3s ease;
}

.btn-more:hover i {
    transform: translateX(5px);
}

.video-taxonomies {
    margin-top: 20px;
    padding: 15px;
    background: var(--bg-card);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.taxonomy-label {
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.taxonomy-label i {
    margin-right: 8px;
    color: var(--accent-color);
}

.category-links,
.tag-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.video-taxonomies .tag-links {
    margin-top: 0;
}

.category-links a,
.tag-links a {
    background: var(--bg-surface);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.category-links a:hover,
.tag-links a:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    background: rgba(255, 204, 0, 0.1);
}

/* --- Pagination --- */

.pagination {
    margin-top: 40px;
    text-align: center;
}

.pagination ul {
    display: inline-flex;
    gap: 5px;
}

.pagination a {
    display: block;
    padding: 10px 15px;
    background: var(--bg-card);
    border-radius: 4px;
    transition: background 0.2s;
}

.pagination a.current,
.pagination a:hover {
    background: var(--accent-color);
    color: #000;
    font-weight: bold;
}

/* --- Footer --- */

.site-footer {
    background: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    padding: 40px 0;
    margin-top: 40px;
    text-align: center;
}

.happy-footer {
    margin-bottom: 20px;
    color: var(--text-secondary);
}

.menu-footer-container ul {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.menu-footer-container a {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.site-info {
    font-size: 0.8rem;
    color: var(--text-secondary);
    opacity: 0.7;
}

/* --- Utility --- */
.text-center {
    text-align: center;
}

/* --- Tags Grid --- */
.tags-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    /* Slightly larger */
    gap: 15px;
    margin-bottom: 40px;
}

.tag-card {
    background: var(--bg-card);
    aspect-ratio: 16/9;
    /* Standard video aspect */
    border-radius: 8px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    text-decoration: none;
}

.tag-card:hover {
    border-color: var(--accent-color);
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.tag-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.tag-bg-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    opacity: 0.85;
    /* Brighter by default */
}

.tag-card:hover .tag-bg-image img {
    transform: scale(1.1);
    opacity: 0.6;
    /* Darken slightly on hover */
}

/* Gradient overlay */
.tag-bg-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.2) 100%);
    pointer-events: none;
}

.tag-content {
    position: relative;
    z-index: 2;
    padding: 10px;
    width: 100%;
}

.tag-name {
    font-weight: 700;
    color: #fff;
    /* Always white on bg */
    margin-bottom: 5px;
    font-size: 1.1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    word-wrap: break-word;
    /* Prevent overflow */
}

.tag-count {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    background: rgba(0, 0, 0, 0.5);
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
}

/* --- Static Pages (DMCA, Copyright, Contact, etc.) --- */

.static-page {
    background: var(--bg-card);
    border-radius: 8px;
    padding: 30px;
    border: 1px solid var(--border-color);
}

.static-page h1 {
    font-size: 1.8rem;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--accent-color);
    color: var(--text-primary);
}

.static-page h1 i {
    margin-right: 12px;
    color: var(--accent-color);
}

.static-page h3 {
    font-size: 1.2rem;
    margin-top: 25px;
    margin-bottom: 12px;
    color: var(--accent-color);
}

.page-content {
    color: var(--text-secondary);
    line-height: 1.8;
}

.page-content p {
    margin-bottom: 15px;
}

.page-content ul {
    margin: 15px 0;
    padding-left: 25px;
}

.page-content ul li {
    margin-bottom: 8px;
    list-style: disc;
}

.contact-email {
    text-align: center;
    margin: 20px 0;
}

.contact-email a {
    display: inline-block;
    background: var(--accent-color);
    color: #000;
    padding: 15px 30px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.contact-email a:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 204, 0, 0.3);
}

.contact-email i {
    margin-right: 10px;
}

.contact-links {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.contact-links li {
    margin-bottom: 10px;
}

.contact-links a {
    display: inline-block;
    padding: 10px 20px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    transition: all 0.2s ease;
}

.contact-links a:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.contact-links i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.notice-warning {
    background: rgba(255, 193, 7, 0.1);
    border-left: 4px solid #ffc107;
    padding: 15px 20px;
    border-radius: 0 6px 6px 0;
    margin-top: 25px;
}

.notice-info {
    background: rgba(0, 123, 255, 0.1);
    border-left: 4px solid #007bff;
    padding: 15px 20px;
    border-radius: 0 6px 6px 0;
    margin-top: 25px;
}

.notice-info i {
    margin-right: 10px;
    color: #007bff;
}

/* --- SEO Hero Section --- */

.seo-hero {
    margin-top: 50px;
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-surface) 100%);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.seo-hero-content {
    padding: 40px 30px;
}

.seo-hero h1 {
    font-size: 1.6rem;
    color: var(--text-primary);
    margin-bottom: 15px;
    line-height: 1.4;
}

.seo-hero h1 i {
    color: var(--accent-color);
    margin-right: 10px;
}

.hero-tagline {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 30px;
}

/* Features Grid */
.seo-features {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.feature-item {
    background: var(--bg-body);
    padding: 25px 20px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.feature-item:hover {
    border-color: var(--accent-color);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.feature-item i {
    font-size: 2rem;
    color: var(--accent-color);
    margin-bottom: 15px;
    display: block;
}

.feature-item h3 {
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.feature-item p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Categories Section */
.seo-categories {
    background: var(--bg-body);
    padding: 25px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    margin-bottom: 30px;
}

.seo-categories h2 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.seo-categories h2 i {
    color: var(--accent-color);
    margin-right: 10px;
}

.seo-categories>p {
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.category-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.category-pill {
    display: inline-block;
    padding: 8px 18px;
    background: linear-gradient(135deg, var(--accent-color), #e6b800);
    color: #000;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.category-pill:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(255, 204, 0, 0.4);
}

/* About Section */
.seo-about {
    background: var(--bg-body);
    padding: 25px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.seo-about h2 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.seo-about h2 i {
    color: var(--accent-color);
    margin-right: 10px;
}

.seo-about p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 15px;
}

.seo-about p:last-child {
    margin-bottom: 0;
}

/* Responsive */
@media (max-width: 992px) {
    .seo-features {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .seo-hero-content {
        padding: 25px 20px;
    }

    .seo-hero h1 {
        font-size: 1.3rem;
    }

    .seo-features {
        grid-template-columns: 1fr;
    }

    .feature-item {
        padding: 20px 15px;
    }

    .category-pill {
        padding: 6px 14px;
        font-size: 0.85rem;
    }
}