/* Modern Adult Site Style - porn5xxx.com inspired */

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

body {
    font-family: 'Prompt', 'Arial', sans-serif;
    background: #0a0a0a;
    color: #e0e0e0;
    line-height: 1.6;
}

a {
    color: #fff;
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: #ff4757;
}

.container-fluid {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Top Navigation */
.top-nav {
    background: #1a1a1a;
    border-bottom: 2px solid #ff4757;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.nav-wrapper {
    display: flex;
    align-items: center;
    gap: 30px;
    padding: 15px 0;
    flex-wrap: wrap;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: #ff4757;
    white-space: nowrap;
}

.nav-search {
    display: flex;
    flex: 0 0 300px;
}

.nav-search input {
    flex: 1;
    padding: 10px 15px;
    background: #2d2d2d;
    border: 1px solid #3d3d3d;
    color: #fff;
    border-radius: 5px 0 0 5px;
    outline: none;
}

.nav-search input:focus {
    border-color: #ff4757;
}

.nav-search button {
    padding: 10px 20px;
    background: #ff4757;
    border: none;
    color: #fff;
    cursor: pointer;
    border-radius: 0 5px 5px 0;
    font-size: 16px;
}

.nav-search button:hover {
    background: #ff3545;
}

.nav-menu {
    display: flex;
    gap: 5px;
    flex-wrap: nowrap; /* ไม่ขึ้นบรรทัดใหม่ */
    flex: 1;
    overflow-x: auto; /* เลื่อนได้ถ้าเกินจอ */
    overflow-y: hidden;
    scrollbar-width: thin;
    scrollbar-color: #ff4757 #2d2d2d;
}

/* Webkit scrollbar */
.nav-menu::-webkit-scrollbar {
    height: 4px;
}

.nav-menu::-webkit-scrollbar-track {
    background: #2d2d2d;
}

.nav-menu::-webkit-scrollbar-thumb {
    background: #ff4757;
    border-radius: 2px;
}

.nav-menu::-webkit-scrollbar-thumb:hover {
    background: #ff3545;
}

.nav-menu a {
    padding: 8px 15px;
    background: #2d2d2d;
    border-radius: 5px;
    font-size: 14px;
    transition: all 0.2s;
}

.nav-menu a:hover,
.nav-menu a.active {
    background: #ff4757;
    color: #fff;
}

/* Main Container */
.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.page-header-compact {
    margin-bottom: 20px;
}

.page-header-compact h1 {
    font-size: 28px;
    color: #ff4757;
    font-weight: 600;
}

/* Video Grid - Modern Style */
.video-grid-modern {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

@media (max-width: 768px) {
    .video-grid-modern {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
}

.video-item {
    background: #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.video-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(255, 71, 87, 0.3);
}

.video-thumbnail {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #2d2d2d;
}

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

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

.video-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.8);
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
}

.video-quality {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #ff4757;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    text-transform: uppercase;
}

.video-details {
    padding: 12px;
}

.video-title {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 8px;
    height: 40px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.video-title a {
    color: #e0e0e0;
}

.video-title a:hover {
    color: #ff4757;
}

.video-description {
    font-size: 12px;
    color: #999;
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.inline-tag {
    color: #777;
    font-size: 11px;
}

.inline-tag:hover {
    color: #ff4757;
}

/* No Results */
.no-results-simple {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.no-results-simple p {
    font-size: 24px;
    margin-bottom: 20px;
}

.no-results-simple a {
    display: inline-block;
    padding: 12px 30px;
    background: #ff4757;
    color: #fff;
    border-radius: 5px;
    font-weight: 600;
}

/* Pagination Modern */
.pagination-modern {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 40px 0;
    flex-wrap: wrap;
}

.pagination-btn,
.pagination-number {
    padding: 10px 15px;
    background: #2d2d2d;
    border-radius: 5px;
    font-size: 14px;
    transition: all 0.2s;
    min-width: 45px;
    text-align: center;
}

.pagination-btn:hover,
.pagination-number:hover {
    background: #3d3d3d;
    color: #ff4757;
}

.pagination-number.active {
    background: #ff4757;
    color: #fff;
    font-weight: 600;
}

.pagination-dots {
    color: #666;
    padding: 0 5px;
}

/* Recent Searches - Simple Text */
.recent-searches-section {
    margin: 20px 0;
    padding: 15px 0;
    border-bottom: 1px solid #333;
}

.recent-searches-section h3 {
    font-size: 13px;
    margin-bottom: 10px;
    color: #888;
    font-weight: 500;
}

.recent-searches-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 15px;
}

.recent-search-item {
    color: #aaa;
    font-size: 13px;
    transition: color 0.2s;
}

.recent-search-item:hover {
    color: #ff4757;
}

/* Keywords Section - Simple Text */
.keywords-section {
    margin: 20px 0;
    padding: 15px 0;
    border-bottom: 1px solid #333;
}

.keywords-section h3 {
    font-size: 13px;
    margin-bottom: 10px;
    color: #888;
    font-weight: 500;
}

.keywords-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 15px;
}

.keyword-item {
    color: #aaa;
    font-size: 13px;
    transition: color 0.2s;
}

.keyword-item:hover {
    color: #ff4757;
}

/* Popular Tags Section - Simple Text */
.popular-tags-section {
    margin: 20px 0;
    padding: 15px 0;
}

.popular-tags-section h3 {
    font-size: 13px;
    margin-bottom: 10px;
    color: #888;
    font-weight: 500;
    color: #ff4757;
}

.tags-cloud-modern {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 15px;
}

.tag-item {
    color: #aaa;
    font-size: 13px;
    transition: color 0.2s;
}

.tag-item:hover {
    color: #ff4757;
}

/* Footer Modern */
.footer-modern {
    background: #1a1a1a;
    border-top: 2px solid #2d2d2d;
    padding: 30px 0;
    margin-top: 60px;
    text-align: center;
    color: #999;
}

.footer-modern p {
    font-size: 14px;
}

/* Responsive */
@media (max-width: 1024px) {
    .nav-wrapper {
        gap: 15px;
    }
    
    .nav-menu {
        width: 100%;
        justify-content: flex-start;
    }
    
    .nav-search {
        flex: 0 0 250px;
    }
}

@media (max-width: 768px) {
    .logo {
        font-size: 20px;
    }
    
    .nav-search {
        flex: 1 1 100%;
        order: 3;
    }
    
    .nav-menu {
        font-size: 13px;
    }
    
    .nav-menu a {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .video-grid-modern {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .page-header-compact h1 {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .main-container {
        padding: 15px 10px;
    }
    
    .video-grid-modern {
        gap: 10px;
    }
    
    .video-title {
        font-size: 13px;
    }
}

/* Loading Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.video-item {
    animation: fadeIn 0.3s ease-out;
}

/* ==========================
   Video Player Page Styles
   ========================== */

.player-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Video Player */
.video-player-wrapper {
    background: #1a1a1a;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 30px;
}

.video-player {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.video-player iframe,
.video-player video {
    width: 100%;
    height: 100%;
    border: none;
}

/* Video Info */
.video-info {
    background: #1a1a1a;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.video-title-main {
    font-size: 24px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 15px;
    line-height: 1.4;
}

.video-meta-main {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #2d2d2d;
}

.meta-item-main {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #999;
}

.meta-item-main svg {
    width: 18px;
    height: 18px;
}

.quality-badge-main {
    background: #ff4757;
    color: #fff;
    padding: 4px 12px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
}

/* Video Details Section */
.video-details-section {
    display: grid;
    gap: 15px;
    margin-bottom: 20px;
}

.detail-row {
    display: flex;
    gap: 10px;
    font-size: 14px;
}

.detail-row strong {
    color: #ff4757;
    min-width: 100px;
}

.detail-row a {
    color: #fff;
    padding: 3px 10px;
    background: #2d2d2d;
    border-radius: 4px;
    transition: all 0.2s;
}

.detail-row a:hover {
    background: #ff4757;
}

/* Video Tags */
.video-tags-section {
    margin-top: 20px;
}

.video-tags-section strong {
    display: block;
    color: #ff4757;
    margin-bottom: 10px;
    font-size: 14px;
}

.video-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tags-row {
    margin-bottom: 12px;
}

.tags-row strong {
    display: block;
    color: #888;
    font-size: 12px;
    margin-bottom: 6px;
}

.video-tag-item {
    background: #2d2d2d;
    color: #aaa;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 13px;
    transition: all 0.2s;
    text-decoration: none;
}

.video-tag-item:hover {
    background: #ff3545;
    color: #fff;
}

.video-tag-item.tag-th {
    background: #3d2d35; /* ไทย: สีม่วงเข้ม */
    color: #ff9aa2;
}

.video-tag-item.tag-en {
    background: #2d2d2d; /* อังกฤษ: สีเทา */
    color: #aaa;
}

.video-tag-item.tag-th:hover,
.video-tag-item.tag-en:hover {
    background: #ff3545;
    color: #fff;
}

/* Keywords in Player Page */
.keywords-section-player {
    margin-top: 20px;
    padding: 15px 0;
    border-top: 1px solid #333;
}

.keywords-section-player strong {
    display: block;
    color: #888;
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: 500;
}

.keywords-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 15px;
}

.keyword-link {
    color: #aaa;
    font-size: 13px;
    transition: color 0.2s;
}

.keyword-link:hover {
    color: #ff4757;
}

/* Related Videos */
.related-videos-section {
    margin-top: 40px;
}

.related-videos-section h2 {
    font-size: 22px;
    color: #ff4757;
    margin-bottom: 20px;
    font-weight: 600;
}

/* ชื่อวิดีโอที่เกี่ยวข้อง - ให้เท่าหน้าแรก */
.related-videos-section .video-grid-modern .video-item .video-details .video-title,
.related-videos-section .video-grid-modern .video-item .video-details h2.video-title {
    font-size: 14px !important;
    font-weight: 500 !important;
    line-height: 1.4 !important;
    margin-bottom: 8px !important;
    height: 40px !important;
}

.related-videos-section .video-grid-modern .video-item .video-details .video-title a,
.related-videos-section .video-grid-modern .video-item .video-details h2.video-title a {
    font-size: 14px !important;
    font-weight: 500 !important;
}

.related-videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

/* Banner Spacing */
.banner-before-player,
.banner-after-player {
    margin: 20px 0;
    text-align: center;
}

.banner-before-player img,
.banner-after-player img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Responsive Player */
@media (max-width: 768px) {
    .player-container {
        padding: 15px 10px;
    }
    
    .video-title-main {
        font-size: 18px;
    }
    
    .video-info {
        padding: 15px;
    }
    
    .video-meta-main {
        gap: 15px;
    }
    
    .meta-item-main {
        font-size: 13px;
    }
    
    .detail-row {
        flex-direction: column;
        gap: 5px;
    }
    
    .detail-row strong {
        min-width: auto;
    }
    
    .related-videos-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

/* FORCE: ชื่อวิดีโอที่เกี่ยวข้องให้เท่าหน้าแรก - ต้องอยู่ท้ายสุด! */
section.related-videos-section div.video-grid-modern article.video-item div.video-details h2.video-title {
    font-size: 14px !important;
}

section.related-videos-section div.video-grid-modern article.video-item div.video-details h2.video-title a {
    font-size: 14px !important;
}

/* ===== PWA Install Banner ===== */
.pwa-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-top: 2px solid #ff4757;
    padding: 15px 20px;
    z-index: 9999;
    animation: slideUp 0.4s ease-out;
    box-shadow: 0 -5px 30px rgba(0,0,0,0.5);
}

@keyframes slideUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.pwa-banner-content {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 15px;
}

.pwa-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(255, 71, 87, 0.3);
}

.pwa-text {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.pwa-text strong {
    font-size: 16px;
    color: #fff;
}

.pwa-text span {
    font-size: 13px;
    color: #999;
}

.pwa-btn {
    background: linear-gradient(135deg, #ff4757, #ff6b7a);
    color: #fff;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Prompt', sans-serif;
}

.pwa-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(255, 71, 87, 0.5);
}

.pwa-close {
    background: transparent;
    border: none;
    color: #666;
    font-size: 24px;
    cursor: pointer;
    padding: 5px 10px;
    transition: color 0.2s;
}

.pwa-close:hover {
    color: #fff;
}

/* ===== In-App Browser Modal ===== */
.inapp-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.9);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.inapp-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 20px;
    padding: 40px 30px;
    text-align: center;
    max-width: 400px;
    width: 100%;
    border: 1px solid #333;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.inapp-icon {
    font-size: 60px;
    margin-bottom: 20px;
}

.inapp-content h3 {
    font-size: 22px;
    color: #fff;
    margin-bottom: 15px;
}

.inapp-content > p {
    color: #999;
    font-size: 14px;
    margin-bottom: 25px;
}

.inapp-instructions {
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    text-align: left;
}

.inapp-instructions p {
    font-size: 13px;
    color: #ccc;
    margin-bottom: 10px;
}

.inapp-instructions p:last-child {
    margin-bottom: 0;
}

.icon-hint {
    display: inline-block;
    background: #333;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 16px;
}

.inapp-btn {
    background: linear-gradient(135deg, #ff4757, #ff6b7a);
    color: #fff;
    border: none;
    padding: 15px 40px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Prompt', sans-serif;
}

.inapp-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 25px rgba(255, 71, 87, 0.5);
}

/* Mobile responsive for PWA elements */
@media (max-width: 480px) {
    .pwa-banner {
        padding: 12px 15px;
    }
    
    .pwa-banner-content {
        gap: 10px;
    }
    
    .pwa-icon {
        width: 40px;
        height: 40px;
    }
    
    .pwa-text strong {
        font-size: 14px;
    }
    
    .pwa-text span {
        font-size: 12px;
    }
    
    .pwa-btn {
        padding: 10px 18px;
        font-size: 13px;
    }
    
    .inapp-content {
        padding: 30px 20px;
    }
    
    .inapp-icon {
        font-size: 50px;
    }
    
    .inapp-content h3 {
        font-size: 18px;
    }
}

