/* VidSexMzi - Dark Theme RTL */
:root {
    --bg-dark: #0a0a0a;
    --bg-card: #141414;
    --bg-hover: #1f1f1f;
    --text: #ffffff;
    --text-muted: #a0a0a0;
    --primary: #ff2d55;
    --primary-hover: #e0264a;
    --border: #2a2a2a;
    --radius: 10px;
    --font: 'Heebo', Arial, sans-serif;
}

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

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

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

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

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

.header-inner {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 12px 0;
    flex-wrap: wrap;
}

.logo-box {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #111;
    border: 2px solid #3a0008;
    border-radius: 10px;
    padding: 6px 10px 6px 8px;
    white-space: nowrap;
}
.logo-plus {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: #e10600;
    color: #fff;
    font-weight: 800;
    font-size: 1.05rem;
    border-radius: 4px;
    line-height: 1;
}
.logo-word {
    font-size: 1.28rem;
    font-weight: 800;
    letter-spacing: -0.3px;
    color: #fff;
}
.logo-word span { color: #e10600; }
.logo-18 {
    background: #e10600;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 3px 6px;
    border-radius: 4px;
    line-height: 1;
}
.logo, .logo-sex, .badge-18 { /* fallback */ }
.logo { font-size: 1.5rem; font-weight: 700; }
.logo-sex { color: var(--primary); }
.badge-18 { background: var(--primary); color:#fff; font-size:0.65rem; padding:2px 6px; border-radius:4px; }


.search-form {
    flex: 1;
    min-width: 200px;
    display: flex;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 25px;
    overflow: hidden;
}

.search-form input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text);
    padding: 10px 16px;
    font-size: 0.95rem;
    outline: none;
}

.search-form button {
    background: transparent;
    border: none;
    padding: 0 16px;
    cursor: pointer;
    font-size: 1.1rem;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.main-nav a {
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: color 0.2s;
}

.main-nav a:hover {
    color: var(--text);
}

.premium-badge {
    background: linear-gradient(135deg, #ffd700, #ffaa00);
    color: #000;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Categories */
.categories-bar {
    background: var(--bg-dark);
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
}

.categories-scroll {
    display: flex;
    gap: 8px;
    padding: 12px 0;
    white-space: nowrap;
}

.cat-btn {
    padding: 6px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: all 0.2s;
}

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

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

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}

.btn-premium {
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    color: #000;
    font-weight: 600;
}

.btn-block {
    display: block;
    width: 100%;
}

/* Main */
.main-content {
    flex: 1;
    padding: 24px 0;
}

.page-title {
    font-size: 1.6rem;
    margin-bottom: 20px;
    font-weight: 600;
}

/* Video Grid */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.video-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
}

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

.video-thumb {
    position: relative;
    aspect-ratio: 16/9;
    background: #222;
    overflow: hidden;
}

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

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

.video-duration {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(0,0,0,0.85);
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.premium-lock {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0,0,0,0.8);
    color: #ffd700;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.video-info {
    padding: 12px;
}

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

.video-meta {
    display: flex;
    gap: 12px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.video-cat {
    color: var(--primary);
    font-size: 0.8rem;
    margin-top: 4px;
}

/* Forms */
.form-box {
    max-width: 480px;
    margin: 0 auto;
    background: var(--bg-card);
    padding: 32px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-family: var(--font);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.alert-success {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid #22c55e;
    color: #4ade80;
}

.alert-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid #ef4444;
    color: #f87171;
}

.alert-info {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid #3b82f6;
    color: #60a5fa;
}

/* Premium Cards */
.premium-plans {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.plan-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    text-align: center;
    transition: border-color 0.2s;
}

.plan-card:hover,
.plan-card.featured {
    border-color: var(--primary);
}

.plan-card.featured {
    position: relative;
    transform: scale(1.03);
}

.plan-card .price {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary);
    margin: 12px 0;
}

.plan-card .period {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.plan-features {
    list-style: none;
    margin: 20px 0;
    text-align: right;
}

.plan-features li {
    padding: 6px 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.plan-features li::before {
    content: "✓ ";
    color: var(--primary);
}

/* Articles */
.article-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 20px;
    display: flex;
    gap: 20px;
}

.article-card img {
    width: 200px;
    height: 140px;
    object-fit: cover;
}

.article-body {
    padding: 16px;
    flex: 1;
}

.article-body h2 {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.article-body p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 16px;
    z-index: 9999;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.5);
}

.cookie-content {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.cookie-content p {
    font-size: 0.9rem;
    color: var(--text-muted);
    flex: 1;
}

.cookie-buttons {
    display: flex;
    gap: 10px;
}

/* Footer */
.site-footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 40px 0 20px;
    margin-top: 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-col h3,
.footer-col h4 {
    margin-bottom: 12px;
    font-size: 1.1rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 6px;
}

.footer-col a {
    color: var(--text-muted);
    font-size: 0.9rem;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Age Gate */
.age-gate {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at center, #1a0a12 0%, #0a0a0a 70%);
    padding: 20px;
}

.age-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 40px;
    max-width: 440px;
    width: 100%;
    text-align: center;
}

.age-card .logo {
    font-size: 2rem;
    margin-bottom: 16px;
    display: block;
}

.age-card h1 {
    font-size: 1.3rem;
    margin-bottom: 12px;
}

.age-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 24px;
    line-height: 1.7;
}

.age-card .btn {
    width: 100%;
    margin-bottom: 10px;
    padding: 14px;
    font-size: 1rem;
}

.age-note {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 16px;
}

/* Video Player Page */
.video-player-wrap {
    background: #000;
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 20px;
}

.video-player-wrap video,
.video-player-wrap .placeholder-player {
    width: 100%;
    aspect-ratio: 16/9;
    background: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1.2rem;
}

.video-details h1 {
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.video-stats {
    display: flex;
    gap: 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 16px;
}

/* Admin */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
}

.admin-table th,
.admin-table td {
    padding: 12px 16px;
    text-align: right;
    border-bottom: 1px solid var(--border);
}

.admin-table th {
    background: var(--bg-hover);
    font-weight: 600;
    font-size: 0.85rem;
}

.admin-nav {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

/* Responsive */
@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-form {
        order: 3;
    }
    
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .article-card {
        flex-direction: column;
    }
    
    .article-card img {
        width: 100%;
        height: 180px;
    }
    
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }
}

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

/* Video embed responsive */
.embed-responsive {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    background: #000;
    border-radius: var(--radius);
}
.embed-responsive iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
.video-player-wrap video {
    display: block;
    width: 100%;
    max-height: 70vh;
    background: #000;
    border-radius: var(--radius);
}

.ad-banner {
    display: block;
    margin: 0 auto 22px;
    text-align: center;
}
.ad-banner img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}
.pager {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin: 28px 0 10px;
}
.pager-btn {
    min-width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    text-decoration: none;
    background: var(--bg-card);
}
.pager-btn.active, .pager-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}
.video-tags {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.home-head { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; margin-bottom:8px; }
.sort-bar { display:flex; gap:8px; }
.sort-btn { background:var(--bg-card); border:1px solid var(--border); border-radius:20px; padding:6px 14px; color:var(--text-muted); font-size:0.9rem; }
.sort-btn.active, .sort-btn:hover { background:var(--primary); border-color:var(--primary); color:#fff; }
.search-form { position: relative; }
.live-results {
    position:absolute; top:calc(100% + 6px); right:0; left:0;
    background:#141414; border:1px solid var(--border); border-radius:12px;
    z-index:200; overflow:hidden; box-shadow:0 12px 30px rgba(0,0,0,.45);
}
.live-item { display:flex; gap:10px; align-items:center; padding:8px 10px; color:#fff; }
.live-item:hover { background:#222; }
.live-item img { width:72px; height:42px; object-fit:cover; border-radius:6px; background:#000; }
.live-item small { color:var(--text-muted); }
.credit-cube {
    margin-top:10px; display:inline-block; background:#1a1a1a; border:1px solid var(--border);
    border-radius:10px; padding:8px 14px; font-weight:700;
}
.credit-cube a { color:var(--primary); }
.admin-live-search {
    width:100%; max-width:420px; margin:0 0 14px; padding:10px 14px;
    background:var(--bg-card); border:1px solid var(--border); border-radius:10px; color:#fff;
}
.cookie-banner { z-index: 9999; }
.video-actions { display:flex; gap:10px; flex-wrap:wrap; margin: 6px 0 16px; }
.action-btn {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 22px;
    padding: 8px 14px;
    cursor: pointer;
    font-family: inherit;
}
.action-btn.is-on { background: var(--primary); border-color: var(--primary); color:#fff; }
.tag-chip {
    display:inline-block;
    background:#1c1c1c;
    border:1px solid var(--border);
    border-radius:16px;
    padding:4px 10px;
    margin:0 6px 8px 0;
    color:var(--text-muted);
    font-size:0.85rem;
}
.tag-chip:hover { color:#fff; border-color:var(--primary); }
.video-credit { margin: 0 0 16px; display:block; }
.video-credit small { display:block; color:var(--text-muted); font-weight:500; font-size:0.75rem; }
.theme-toggle {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 20px;
    width: 34px; height: 34px;
    cursor: pointer;
}
html[data-theme="contrast"] {
    --bg-dark: #000;
    --bg-card: #000;
    --bg-hover: #111;
    --text: #fff;
    --text-muted: #eee;
    --primary: #ff3b3b;
    --border: #fff;
}
html[data-theme="contrast"] body { background:#000; color:#fff; }
html[data-theme="contrast"] .video-card,
html[data-theme="contrast"] .form-box,
html[data-theme="contrast"] .site-header { border:1px solid #fff; }
.thumb-row { display:flex; gap:8px; align-items:stretch; }
.thumb-row input { flex:1; }
.thumb-actions { display:flex; gap:8px; flex-wrap:wrap; margin-top:8px; }
.file-btn { display:inline-flex; align-items:center; justify-content:center; cursor:pointer; margin:0; }
.hint { color:var(--text-muted); font-size:0.8rem; margin-top:8px; line-height:1.5; }
.thumb-preview { display:block; max-width:280px; margin-top:10px; border-radius:8px; background:#000; }
html[data-theme="light"] {
    --bg-dark:#f3f3f3;
    --bg-card:#ffffff;
    --bg-hover:#ececec;
    --text:#111;
    --text-muted:#555;
    --primary:#d0123a;
    --primary-hover:#b10e30;
    --border:#ddd;
}
html[data-theme="light"] body { background:#f3f3f3; color:#111; }
html[data-theme="light"] .search-form,
html[data-theme="light"] .admin-live-search { background:#fff; }
.theme-toggle { width:auto; padding:0 10px; font-size:0.8rem; }
