/*
Theme Name: WebNungAV Ultra Fast
Theme URI: https://เว็บหนังเอวี.com
Author: Antigravity
Author URI: https://เว็บหนังเอวี.com
Description: ธีมดูหนังเอวี สไตล์ MissAV สตรีมมิ่ง โครงสร้างเบา โหลดเร็วพิเศษ และปรับแต่ง SEO ครบวงจร
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: webnungav
*/

:root {
    --bg-main: #0d1117;
    --bg-card: #161b22;
    --bg-card-hover: #21262d;
    --bg-header: #090d13;
    --border-color: #30363d;
    --primary: #f43f5e;
    --primary-hover: #e11d48;
    --text-main: #f0f6fc;
    --text-muted: #8b949e;
    --text-tag: #58a6ff;
    --badge-bg: rgba(244, 63, 94, 0.15);
    --badge-color: #fb7185;
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.15s ease;
}

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

/* Container */
.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Header */
.site-header {
    background: var(--bg-header);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    gap: 16px;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.5px;
}

.site-logo span {
    color: var(--primary);
}

/* Search bar */
.search-form-wrap {
    flex: 1;
    max-width: 540px;
}

.search-form {
    display: flex;
    position: relative;
}

.search-input {
    width: 100%;
    height: 40px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 0 44px 0 18px;
    color: #fff;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.search-input:focus {
    border-color: var(--primary);
}

.search-btn {
    position: absolute;
    right: 4px;
    top: 4px;
    bottom: 4px;
    width: 34px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-btn:hover {
    color: var(--primary);
}

/* Navigation */
.header-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-link {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
}

.nav-link:hover, .nav-link.active {
    color: #fff;
}

/* Hero & Filter tags */
.filter-tags-bar {
    padding: 16px 0;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
}

.filter-tags-bar::-webkit-scrollbar {
    display: none;
}

.tag-pill {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
}

.tag-pill:hover, .tag-pill.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* Video Grid */
.section-title-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 20px 0 14px;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 18px;
    background: var(--primary);
    border-radius: 2px;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 36px;
}

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

@media (max-width: 768px) {
    .video-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .header-nav { display: none; }
    .header-inner { height: 56px; }
}

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

/* Video Card */
.video-card {
    background: var(--bg-card);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
    display: flex;
    flex-direction: column;
}

.video-card:hover {
    transform: translateY(-4px);
    border-color: #484f58;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.card-thumb-wrap {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    background: #000;
    overflow: hidden;
}

.card-thumb-wrap img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    loading: lazy;
}

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

.badge-code {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    color: #fff;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 4px;
    letter-spacing: 0.5px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.badge-hd {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--primary);
    color: #fff;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: 800;
    border-radius: 4px;
}

.badge-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
}

.card-info {
    padding: 12px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--text-main);
}

.card-meta {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
}

.card-actress {
    color: var(--text-tag);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 65%;
}

/* Single Video Player Page */
.player-section {
    margin: 20px 0 24px;
}

.video-player-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    border: 1px solid var(--border-color);
}

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

.no-video-alert {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 16px;
}

.single-details {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.single-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.35;
}

.single-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.meta-row {
    font-size: 13.5px;
    color: var(--text-muted);
}

.meta-row strong {
    color: #fff;
    margin-right: 6px;
}

.meta-row a {
    color: var(--text-tag);
}

.single-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.single-tag-badge {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    color: var(--text-muted);
}

.single-tag-badge:hover {
    color: #fff;
    border-color: var(--primary);
}

/* Pagination */
.pagination-wrap {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 36px 0 48px;
}

.page-numbers {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 13.5px;
    font-weight: 600;
}

.page-numbers.current {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.page-numbers:hover:not(.current) {
    background: var(--bg-card-hover);
    border-color: #555;
}

/* Footer */
.site-footer {
    background: var(--bg-header);
    border-top: 1px solid var(--border-color);
    padding: 30px 0;
    margin-top: 60px;
    color: var(--text-muted);
    font-size: 13px;
    text-align: center;
}
