/* ==========================================================
   VideoTube Engine - Dark Mode Tube & TikTok Responsive UI
   Accent: Cyan / Teal (#00c2cb / #00e5ff)
   ========================================================== */

:root {
    --bg-main: #0a0a0a;
    --bg-card: #151515;
    --bg-card-hover: #1f1f1f;
    --accent: #00c2cb;
    --accent-hover: #00e5ff;
    --text-main: #ffffff;
    --text-muted: #999999;
    --text-dim: #666666;
    --border-color: #262626;
    --badge-bg: rgba(0, 0, 0, 0.85);
    --badge-hd: #111111;
    --danger: #ff4757;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: inherit;
    text-decoration: none;
}

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

.container {
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ==========================================================
   TOP BAR & NAVIGATION
   ========================================================== */
.site-header {
    background-color: #111111;
    border-bottom: 1px solid var(--border-color);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    flex-wrap: wrap;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    width: 34px;
    height: 34px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    font-size: 16px;
    font-weight: bold;
    box-shadow: 0 0 12px rgba(0, 194, 203, 0.5);
}

.logo-icon svg {
    fill: #000;
    width: 16px;
    height: 16px;
    margin-left: 2px;
}

.logo-text h1 {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #fff;
    line-height: 1.1;
}

.logo-text p {
    font-size: 11px;
    color: var(--text-muted);
}

.search-box {
    display: flex;
    flex: 1;
    max-width: 500px;
    min-width: 250px;
}

.search-input {
    width: 100%;
    padding: 9px 15px;
    background: #1c1c1c;
    border: 1px solid var(--border-color);
    border-right: none;
    border-radius: 4px 0 0 4px;
    color: #fff;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

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

.search-btn {
    background: var(--accent);
    color: #000;
    border: none;
    padding: 0 18px;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

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

.nav-links {
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 13px;
    font-weight: 600;
}

.nav-links a {
    color: #ccc;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--accent);
}

/* Secondary Desktop Bar */
.secondary-nav {
    background: #161616;
    border-bottom: 1px solid var(--border-color);
    padding: 8px 0;
    font-size: 13px;
}

.cat-scroll {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
}

.cat-scroll::-webkit-scrollbar {
    display: none;
}

.cat-pill {
    padding: 4px 12px;
    background: #222;
    border-radius: 20px;
    color: #bbb;
    font-size: 12px;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.cat-pill:hover, .cat-pill.active {
    background: var(--accent);
    color: #000;
    font-weight: 600;
}

/* SEO Keyword Banner */
.seo-header-banner {
    background: linear-gradient(135deg, #141414 0%, #1a1a1a 100%);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 0;
    font-size: 12px;
    color: #888;
    line-height: 1.6;
}

.seo-header-banner strong {
    color: #ddd;
}

.kw-highlight {
    color: var(--accent);
}

/* ==========================================================
   VIDEO GRID & CARDS (Modeled after screenshots)
   ========================================================== */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0 15px 0;
    padding-left: 10px;
    border-left: 4px solid var(--accent);
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    text-transform: capitalize;
}

.sort-select {
    background: #1c1c1c;
    color: #fff;
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    outline: none;
    cursor: pointer;
}

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

@media (min-width: 600px) {
    .video-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }
}

@media (min-width: 900px) {
    .video-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 16px;
    }
}

@media (min-width: 1150px) {
    .video-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 16px;
    }
}

.video-card {
    background: var(--bg-card);
    border-radius: 6px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #1e1e1e;
    display: flex;
    flex-direction: column;
}

.video-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.6);
    border-color: #333;
}

.thumb-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    background: #000;
    overflow: hidden;
}

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

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

/* Center Play Button Overlay */
.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    background: rgba(0, 0, 0, 0.65);
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.85;
    transition: all 0.2s;
}

.play-overlay svg {
    fill: #fff;
    width: 16px;
    height: 16px;
    margin-left: 2px;
}

.video-card:hover .play-overlay {
    background: var(--accent);
    border-color: var(--accent);
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

.video-card:hover .play-overlay svg {
    fill: #000;
}

/* HD Badge */
.badge-hd {
    position: absolute;
    top: 6px;
    right: 6px;
    background: #000;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 5px;
    border-radius: 3px;
    border: 1px solid #333;
    letter-spacing: 0.5px;
}

/* Bottom Thumbnail Meta Bar */
.thumb-meta {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 4px 8px;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.4) 70%, transparent 100%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
}

.meta-views, .meta-duration {
    display: flex;
    align-items: center;
    gap: 4px;
}

.meta-views svg, .meta-duration svg {
    width: 12px;
    height: 12px;
    fill: #ccc;
}

/* Like Bar below thumb */
.card-like-bar {
    background: #111;
    padding: 3px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 700;
    color: #ddd;
    border-bottom: 1px solid #1a1a1a;
}

.card-like-bar svg {
    width: 12px;
    height: 12px;
    fill: var(--accent);
}

/* Card Content / Title */
.card-content {
    padding: 8px 10px 10px 10px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.video-title {
    font-size: 13px;
    font-weight: 600;
    color: #eee;
    line-height: 1.35;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s;
}

.video-card:hover .video-title {
    color: var(--accent);
}

/* ==========================================================
   PAGINATION (Square Modern Style)
   ========================================================== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin: 30px 0 50px 0;
    flex-wrap: wrap;
}

.page-btn {
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    background: #1f1f1f;
    color: #ccc;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
    border: 1px solid #2a2a2a;
}

.page-btn:hover {
    background: #333;
    color: #fff;
    border-color: #444;
}

.page-btn.active {
    background: var(--accent);
    color: #000;
    font-weight: 700;
    border-color: var(--accent);
    box-shadow: 0 0 10px rgba(0, 194, 203, 0.4);
}

/* Scroll To Top Button */
.scroll-top {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 44px;
    height: 44px;
    background: var(--accent);
    color: #000;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.7);
    cursor: pointer;
    z-index: 999;
    transition: all 0.2s;
    opacity: 0.9;
}

.scroll-top:hover {
    background: var(--accent-hover);
    transform: translateY(-3px);
    opacity: 1;
}

/* ==========================================================
   TIKTOK STYLE SINGLE VIDEO VIEW
   ========================================================== */
.tiktok-view-wrapper {
    max-width: 480px;
    margin: 0 auto 30px auto;
    position: relative;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    border: 1px solid #222;
}

@media (min-width: 768px) {
    .tiktok-view-wrapper {
        margin-top: 20px;
    }
}

/* Top TikTok Navigation Bar */
.tiktok-top-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 30;
    padding: 12px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(to bottom, rgba(0,0,0,0.85) 0%, transparent 100%);
}

.tiktok-back-btn, .tiktok-search-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
}

.tiktok-back-btn svg, .tiktok-search-btn svg {
    width: 22px;
    height: 22px;
    fill: #fff;
}

.tiktok-topic {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* TikTok Player Container */
.tiktok-player-container {
    position: relative;
    width: 100%;
    min-height: 520px;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tiktok-player-container iframe {
    width: 100%;
    height: 520px;
    border: none;
    display: block;
}

/* Right Floating Action Column */
.tiktok-actions {
    position: absolute;
    right: 12px;
    bottom: 90px;
    z-index: 25;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

.action-icon-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(30, 30, 30, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, background 0.2s;
}

.action-icon-circle svg {
    width: 24px;
    height: 24px;
    fill: #fff;
    transition: fill 0.2s;
}

.action-item:hover .action-icon-circle {
    transform: scale(1.1);
    background: rgba(0, 0, 0, 0.85);
}

.action-item.active .action-icon-circle svg {
    fill: var(--danger);
}

.action-count {
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.9);
}

/* Profile Avatar with Plus */
.avatar-action {
    position: relative;
    margin-bottom: 5px;
}

.avatar-img {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 2px solid #fff;
    object-fit: cover;
}

.avatar-plus {
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--danger);
    width: 18px;
    height: 18px;
    border-radius: 50%;
    color: #fff;
    font-size: 13px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #000;
}

/* Vinyl Music Disc */
.vinyl-disc {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #111;
    border: 6px solid #222;
    box-shadow: 0 0 10px rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: spin 4s linear infinite;
}

.vinyl-disc img {
    width: 22px;
    height: 22px;
    border-radius: 50%;
}

@keyframes spin {
    100% { transform: rotate(360deg); }
}

/* Bottom Overlay Info */
.tiktok-bottom-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 70px; /* Space for action icons */
    padding: 15px;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.6) 70%, transparent 100%);
    z-index: 20;
    color: #fff;
}

.channel-name {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.verified-badge {
    background: var(--accent);
    color: #000;
    border-radius: 50%;
    width: 14px;
    height: 14px;
    font-size: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.caption-text {
    font-size: 13px;
    line-height: 1.4;
    color: #eee;
    margin-bottom: 8px;
}

.caption-text.collapsed {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.toggle-more-btn {
    color: var(--accent);
    cursor: pointer;
    font-weight: 700;
    font-size: 12px;
    margin-left: 5px;
}

.video-tags-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.v-tag {
    font-size: 12px;
    color: var(--accent);
    font-weight: 600;
}

.sound-track {
    font-size: 12px;
    color: #ccc;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sound-track svg {
    width: 14px;
    height: 14px;
    fill: #ccc;
}

/* Full SEO Article below TikTok player */
.single-seo-details {
    background: #141414;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin: 25px auto 40px auto;
    max-width: 900px;
}

.single-seo-details h1 {
    font-size: 20px;
    margin-bottom: 12px;
    color: #fff;
}

.single-seo-details h2 {
    font-size: 16px;
    color: var(--accent);
    margin: 18px 0 8px 0;
}

.single-seo-details h3 {
    font-size: 14px;
    color: #ddd;
    margin: 15px 0 6px 0;
}

.single-seo-details p {
    color: #bbb;
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 10px;
}

.seo-specs {
    list-style: none;
    margin-left: 0;
    padding-left: 0;
    margin-bottom: 12px;
}

.seo-specs li {
    font-size: 13px;
    color: #aaa;
    margin-bottom: 4px;
}

.seo-specs strong {
    color: #eee;
}

.seo-injected-kw {
    color: var(--accent);
    font-weight: 600;
}

.seo-kw-block {
    margin-top: 15px;
    padding: 10px;
    background: #1c1c1c;
    border-radius: 4px;
    border-left: 3px solid var(--accent);
    font-size: 12px;
    color: #aaa;
}

/* Comments Modal / Drawer */
.comment-drawer {
    position: fixed;
    bottom: -100%;
    left: 0;
    right: 0;
    height: 60vh;
    background: #181818;
    border-top: 1px solid #333;
    border-radius: 16px 16px 0 0;
    z-index: 2000;
    transition: bottom 0.3s ease;
    display: flex;
    flex-direction: column;
}

.comment-drawer.open {
    bottom: 0;
}

.drawer-header {
    padding: 12px 15px;
    border-bottom: 1px solid #282828;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    font-weight: 700;
}

.drawer-close {
    cursor: pointer;
    font-size: 20px;
    color: #888;
}

.drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}

.single-comment {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.comment-user-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #333;
}

.comment-content h5 {
    font-size: 12px;
    color: #aaa;
    margin-bottom: 3px;
}

.comment-content p {
    font-size: 13px;
    color: #eee;
}

.drawer-footer {
    padding: 10px 15px;
    border-top: 1px solid #282828;
    display: flex;
    gap: 10px;
}

.comment-input {
    flex: 1;
    background: #252525;
    border: 1px solid #333;
    border-radius: 20px;
    padding: 8px 14px;
    color: #fff;
    outline: none;
    font-size: 13px;
}

.comment-send-btn {
    background: var(--accent);
    color: #000;
    border: none;
    border-radius: 20px;
    padding: 0 16px;
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
}

/* Toast Message */
.toast-msg {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 194, 203, 0.95);
    color: #000;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 13px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    z-index: 3000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.toast-msg.show {
    opacity: 1;
}

/* Footer */
.site-footer {
    background: #0d0d0d;
    border-top: 1px solid var(--border-color);
    padding: 25px 0;
    margin-top: auto;
    font-size: 12px;
    color: #666;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.footer-links a:hover {
    color: var(--accent);
}
/* Append to style.css: Search & Category Landing Article + FAQ */

.seo-search-landing {
    background: #141414;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 24px;
    margin: 20px 0 30px 0;
    line-height: 1.65;
    font-size: 13.5px;
    color: #ccc;
}

.landing-main-title {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 14px;
    line-height: 1.35;
}

.landing-header-seo p {
    margin-bottom: 12px;
    color: #bbb;
}

.landing-header-seo strong, .landing-closing-section strong {
    color: #fff;
}

.landing-section-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--accent);
    margin: 20px 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    background: #1a1a1a;
    padding: 12px 16px;
    border-radius: 6px;
    border-left: 3px solid var(--accent);
}

.faq-question {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 6px;
}

.faq-answer {
    font-size: 13px;
    color: #aaa;
    line-height: 1.5;
}

.landing-closing-section {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #222;
}
