/*
Theme Name: SmartLive Dark
Theme URI: https://example.com/smartlive
Description: תבנית כהה מקצועית בסגנון פלטפורמת שידורים חיים — מותאמת לתוסף SmartLive
Version: 1.0.0
Author: SmartLive
Text Domain: smartlive-theme
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
*/

/* ═══════════════════════════════════════════════════════════
   SmartLive Dark Theme — MyCam-Inspired
   ═══════════════════════════════════════════════════════════ */
:root {
    --bg:           #0a0a0a;
    --bg-deep:      #000000;
    --bg-card:      #141414;
    --bg-card-h:    #1a1a1a;
    --bg-surface:   #0e0e0e;
    --bg-input:     #111111;
    --border:       #1e1e1e;
    --border-lt:    #2a2a2a;
    --accent:       #e84393;
    --accent-h:     #d63384;
    --accent-lt:    #fd79a8;
    --accent-soft:  rgba(232,67,147,0.10);
    --gold:         #f9a825;
    --gold-soft:    rgba(249,168,37,0.08);
    --green:        #00e676;
    --green-soft:   rgba(0,230,118,0.10);
    --purple:       #a855f7;
    --red:          #ef4444;
    --text:         #e0e0e0;
    --text-muted:   #777777;
    --text-dim:     #444444;
    --white:        #ffffff;
    --radius:       8px;
    --radius-lg:    12px;
    --font:         -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --max-w:        1280px;
    --header-h:     60px;
}

/* ── Reset ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

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

a { color: var(--accent-lt); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; display: block; }

.container { width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 20px; }

/* ═══════════════════════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════════════════════ */
.site-header {
    background: var(--bg-surface); border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 100; backdrop-filter: blur(12px);
    background: rgba(14,14,14,0.92);
}
.header-inner {
    max-width: var(--max-w); margin: 0 auto; padding: 0 20px;
    display: flex; align-items: center; justify-content: space-between;
    height: var(--header-h);
}

/* Logo */
.site-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.site-logo-text {
    font-size: 22px; font-weight: 800; color: var(--white);
    letter-spacing: -0.5px;
}
.site-logo-text span { color: var(--accent); }
.site-logo img { height: 34px; width: auto; }

/* Nav */
.header-nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.header-nav a {
    padding: 6px 14px; border-radius: 6px; font-size: 13px;
    font-weight: 500; color: var(--text-muted); transition: all 0.15s;
    white-space: nowrap;
}
.header-nav a:hover, .header-nav a.active {
    color: var(--white); background: rgba(255,255,255,0.06);
}

/* Header actions */
.header-actions { display: flex; align-items: center; gap: 8px; }
.btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 18px; border-radius: var(--radius); font-size: 13px;
    font-weight: 600; border: none; cursor: pointer; font-family: var(--font);
    text-decoration: none; transition: all 0.15s; line-height: 1.4;
}
.btn-primary { background: var(--accent); color: var(--white); }
.btn-primary:hover { background: var(--accent-h); color: var(--white); }
.btn-ghost {
    background: transparent; color: var(--text-muted);
    border: 1px solid var(--border);
}
.btn-ghost:hover { color: var(--white); border-color: var(--border-lt); }
.btn-sm { padding: 5px 12px; font-size: 12px; }

/* Mobile menu toggle */
.menu-toggle {
    display: none; background: none; border: none; color: var(--text);
    font-size: 24px; cursor: pointer; padding: 4px;
}

/* ═══════════════════════════════════════════════════════════
   CATEGORY BAR
   ═══════════════════════════════════════════════════════════ */
.category-bar {
    background: var(--bg); border-bottom: 1px solid var(--border);
    overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.category-bar::-webkit-scrollbar { display: none; }
.category-bar-inner {
    max-width: var(--max-w); margin: 0 auto; padding: 0 20px;
    display: flex; gap: 4px; white-space: nowrap;
}
.category-bar a {
    padding: 10px 16px; font-size: 12px; font-weight: 500;
    color: var(--text-muted); border-bottom: 2px solid transparent;
    transition: all 0.15s;
}
.category-bar a:hover, .category-bar a.active {
    color: var(--accent-lt); border-bottom-color: var(--accent);
}

/* ═══════════════════════════════════════════════════════════
   HERO BANNER
   ═══════════════════════════════════════════════════════════ */
.hero-banner {
    background: linear-gradient(135deg, rgba(232,67,147,0.08), rgba(168,85,247,0.06));
    border-bottom: 1px solid var(--border); padding: 24px 0;
}
.hero-inner {
    max-width: var(--max-w); margin: 0 auto; padding: 0 20px;
    display: flex; align-items: center; justify-content: space-between;
    gap: 20px; flex-wrap: wrap;
}
.hero-text h1 {
    font-size: 22px; font-weight: 800; color: var(--white);
    margin-bottom: 4px;
}
.hero-text p { font-size: 13px; color: var(--text-muted); }
.hero-text .live-count {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--red); color: var(--white); padding: 3px 10px;
    border-radius: 4px; font-size: 11px; font-weight: 700;
    text-transform: uppercase; margin-right: 10px;
}
.hero-text .live-dot {
    width: 6px; height: 6px; border-radius: 50%; background: var(--white);
    animation: pulse 1.5s infinite;
}

/* ═══════════════════════════════════════════════════════════
   MAIN CONTENT
   ═══════════════════════════════════════════════════════════ */
.site-main { flex: 1; padding: 20px 0 40px; }
.main-inner { max-width: var(--max-w); margin: 0 auto; padding: 0 20px; }

.section-title {
    font-size: 18px; font-weight: 700; color: var(--white);
    margin-bottom: 16px; display: flex; align-items: center; gap: 8px;
}

/* ═══════════════════════════════════════════════════════════
   STREAM CARDS GRID
   ═══════════════════════════════════════════════════════════ */
.streams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 14px;
}
.stream-card {
    background: var(--bg-card); border-radius: var(--radius-lg);
    overflow: hidden; border: 1px solid var(--border);
    text-decoration: none; color: var(--text); display: block;
    transition: all 0.2s ease;
}
.stream-card:hover {
    transform: translateY(-3px); border-color: var(--accent);
    box-shadow: 0 4px 20px rgba(232,67,147,0.12);
}

.stream-thumb {
    position: relative; height: 155px; overflow: hidden; background: #080808;
}
.stream-thumb img { width: 100%; height: 100%; object-fit: cover; }
.stream-thumb-placeholder {
    height: 100%; display: flex; align-items: center; justify-content: center;
}
.stream-thumb-placeholder img {
    width: 52px; height: 52px; border-radius: 50%; opacity: 0.2;
}

/* Status badges */
.badge-live {
    position: absolute; top: 8px; right: 8px; background: var(--red);
    padding: 2px 8px; border-radius: 3px; font-size: 9px;
    font-weight: 700; color: var(--white); text-transform: uppercase;
    letter-spacing: 0.5px;
}
.badge-viewers {
    position: absolute; top: 8px; left: 8px;
    background: rgba(0,0,0,0.65); backdrop-filter: blur(4px);
    padding: 2px 8px; border-radius: 3px; font-size: 10px; color: var(--text-muted);
}
.badge-cat {
    position: absolute; bottom: 8px; right: 8px;
    background: rgba(168,85,247,0.65); backdrop-filter: blur(4px);
    padding: 2px 10px; border-radius: 3px; font-size: 9px; color: var(--white);
}

/* Online indicator dot */
.stream-online-dot {
    width: 8px; height: 8px; border-radius: 50%; background: var(--green);
    position: absolute; bottom: -2px; right: -2px;
    border: 2px solid var(--bg-card);
}

.stream-info { padding: 12px 14px; }
.stream-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.stream-avatar-wrap { position: relative; flex-shrink: 0; }
.stream-avatar { width: 30px; height: 30px; border-radius: 50%; }
.stream-name { font-weight: 700; font-size: 13px; color: var(--white); }
.stream-title {
    font-size: 11px; color: var(--text-muted);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px;
}
.stream-cta {
    width: 100%; background: var(--accent); border-radius: var(--radius);
    padding: 7px; text-align: center; font-weight: 600; font-size: 12px;
    color: var(--white); transition: background 0.15s;
}
.stream-card:hover .stream-cta { background: var(--accent-h); }

/* ═══════════════════════════════════════════════════════════
   SIDEBAR WIDGET (Optional)
   ═══════════════════════════════════════════════════════════ */
.sidebar { width: 280px; flex-shrink: 0; }
.widget {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 16px; margin-bottom: 14px;
}
.widget-title {
    font-size: 13px; font-weight: 700; color: var(--white);
    margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border);
}

/* ═══════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════ */
.site-footer {
    background: var(--bg-surface); border-top: 1px solid var(--border);
    padding: 30px 0 20px; margin-top: auto;
}
.footer-inner {
    max-width: var(--max-w); margin: 0 auto; padding: 0 20px;
}
.footer-grid {
    display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 30px; margin-bottom: 24px;
}
.footer-brand .site-logo-text { font-size: 20px; margin-bottom: 8px; display: block; }
.footer-brand p { font-size: 12px; color: var(--text-dim); line-height: 1.7; max-width: 300px; }
.footer-social { display: flex; gap: 10px; margin-top: 12px; }
.footer-social a {
    width: 34px; height: 34px; border-radius: 8px;
    background: rgba(255,255,255,0.04); border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; color: var(--text-muted); transition: all 0.15s;
}
.footer-social a:hover { background: var(--accent-soft); color: var(--accent-lt); border-color: var(--accent); }

.footer-col h4 {
    font-size: 13px; font-weight: 700; color: var(--white);
    margin-bottom: 10px;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 6px; }
.footer-col a { font-size: 12px; color: var(--text-muted); }
.footer-col a:hover { color: var(--accent-lt); }

.footer-bottom {
    border-top: 1px solid var(--border); padding-top: 16px;
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 10px;
}
.footer-bottom p { font-size: 11px; color: var(--text-dim); }
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-links a { font-size: 11px; color: var(--text-dim); }
.footer-links a:hover { color: var(--text-muted); }

/* Payment icons row */
.footer-payments { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.footer-payments img { height: 22px; opacity: 0.5; transition: opacity 0.15s; }
.footer-payments img:hover { opacity: 0.8; }

/* ═══════════════════════════════════════════════════════════
   WORDPRESS DEFAULTS
   ═══════════════════════════════════════════════════════════ */
.entry-content { padding: 20px 0; }
.entry-content h1, .entry-content h2, .entry-content h3 { color: var(--white); margin: 20px 0 10px; }
.entry-content p { margin-bottom: 14px; color: var(--text); }
.entry-content ul, .entry-content ol { margin: 0 20px 14px; color: var(--text); }
.entry-content a { color: var(--accent-lt); }

/* WP Widgets in sidebar */
.widget_text, .widget_recent_entries, .widget_categories {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 16px; margin-bottom: 14px;
}

/* Forms */
input[type="text"], input[type="email"], input[type="password"],
input[type="search"], input[type="url"], textarea, select {
    background: var(--bg-input); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 10px 12px; color: var(--text);
    font-size: 13px; font-family: var(--font); outline: none; width: 100%;
}
input:focus, textarea:focus, select:focus { border-color: var(--accent); }
input::placeholder, textarea::placeholder { color: var(--text-dim); }

/* ═══════════════════════════════════════════════════════════
   UTILITY
   ═══════════════════════════════════════════════════════════ */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; }
.hidden { display: none !important; }

/* ═══════════════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════════════ */
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 960px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .header-nav { display: none; }
    .header-nav.open { display: flex; flex-direction: column; position: absolute;
        top: var(--header-h); right: 0; left: 0; background: var(--bg-surface);
        border-bottom: 1px solid var(--border); padding: 10px 20px; z-index: 99; }
    .menu-toggle { display: block; }
}
@media (max-width: 768px) {
    .hero-inner { flex-direction: column; text-align: center; }
    .streams-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
    .stream-thumb { height: 120px; }
    .footer-grid { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 480px) {
    .streams-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .stream-thumb { height: 105px; }
    .stream-info { padding: 8px 10px; }
    .stream-cta { padding: 6px; font-size: 11px; }
    .header-inner { padding: 0 12px; }
}

/* ═══════════════════════════════════════════════════════════
   HOMEPAGE — MyCam Style Cards & Banner
   ═══════════════════════════════════════════════════════════ */

/* Banner */
.sl-banner-section { padding: 0; margin-bottom: 20px; }
.sl-banner-default {
    background: linear-gradient(135deg, #0d2137, #1a0a20, #0d1a2e);
    border-radius: var(--radius-lg); overflow: hidden; padding: 30px; text-align: center;
    border: 1px solid #1a2a3a; position: relative;
}
.sl-banner-badge {
    display: inline-block; background: rgba(232,67,147,0.15); border: 1px solid rgba(232,67,147,0.3);
    color: var(--accent-lt); padding: 4px 16px; border-radius: 20px; font-size: 12px;
    font-weight: 600; margin-bottom: 12px;
}
.sl-banner-default h2 { font-size: 28px; font-weight: 800; color: var(--white); margin: 0 0 8px; }
.sl-banner-default h2 span { color: var(--accent); }
.sl-banner-default p { color: var(--text-muted); font-size: 14px; margin-bottom: 16px; }
.sl-banner-cta {
    display: inline-block; background: var(--accent); color: var(--white); padding: 12px 32px;
    border-radius: var(--radius); font-weight: 700; font-size: 15px; text-decoration: none;
    transition: background 0.15s;
}
.sl-banner-cta:hover { background: var(--accent-h); color: var(--white); }
.sl-banner-widget img { width: 100%; height: auto; border-radius: var(--radius-lg); }

/* Section header */
.sl-section-header { margin: 20px 0 16px; display: flex; align-items: center; gap: 8px; }
.sl-section-header h2 { font-size: 18px; font-weight: 700; color: var(--white); display: flex; align-items: center; gap: 8px; }
.sl-live-dot-big {
    width: 10px; height: 10px; border-radius: 50%; background: var(--red);
    display: inline-block; animation: pulse 1.5s infinite;
    box-shadow: 0 0 8px rgba(239,68,68,0.5);
}

/* ── Cam Cards Grid ───────────────────────────────────────── */
.sl-cam-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.sl-cam-card {
    background: var(--bg-card); border-radius: var(--radius-lg); overflow: hidden;
    border: 1px solid var(--border); text-decoration: none; color: var(--text);
    display: block; transition: all 0.2s ease; position: relative;
}
.sl-cam-card:hover {
    transform: translateY(-4px); border-color: var(--accent);
    box-shadow: 0 8px 30px rgba(232,67,147,0.15);
}

/* Thumbnail */
.sl-cam-thumb {
    position: relative; width: 100%; padding-top: 130%; overflow: hidden; background: #080808;
}
.sl-cam-thumb img {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover;
}
.sl-cam-avatar-img { object-fit: contain !important; opacity: 0.3; }
.sl-cam-badge-live {
    position: absolute; top: 8px; left: 8px; background: var(--red);
    padding: 2px 10px; border-radius: 4px; font-size: 10px; font-weight: 700;
    color: var(--white); letter-spacing: 0.5px;
}
.sl-cam-badge-viewers {
    position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px); padding: 2px 8px; border-radius: 4px;
    font-size: 10px; color: var(--text-muted);
}
.sl-cam-badge-cat {
    position: absolute; bottom: 8px; right: 8px; background: rgba(168,85,247,0.7);
    padding: 2px 10px; border-radius: 4px; font-size: 9px; color: var(--white);
}

/* Name */
.sl-cam-name {
    text-align: center; padding: 10px 10px 4px; font-weight: 700; font-size: 15px;
    color: var(--white); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Action bar */
.sl-cam-actions { padding: 0 10px 6px; text-align: center; }
.sl-cam-status {
    display: inline-block; background: var(--accent); color: var(--white); padding: 5px 16px;
    border-radius: 20px; font-size: 12px; font-weight: 600; transition: background 0.15s;
}
.sl-cam-card:hover .sl-cam-status { background: var(--accent-h); }

/* Description */
.sl-cam-desc {
    padding: 0 10px 8px; font-size: 12px; color: var(--text-muted);
    text-align: center; line-height: 1.5; display: -webkit-box;
    -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.sl-cam-meta {
    padding: 0 10px 10px; font-size: 11px; color: var(--text-dim); text-align: center;
}

/* No streams */
.sl-no-streams { text-align: center; padding: 60px 20px; }
.sl-no-streams-icon { font-size: 48px; margin-bottom: 12px; opacity: 0.3; }
.sl-no-streams h2 { color: var(--white); font-size: 20px; margin-bottom: 8px; }
.sl-no-streams p { color: var(--text-muted); font-size: 14px; margin-bottom: 16px; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 1100px) {
    .sl-cam-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
    .sl-cam-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .sl-cam-thumb { padding-top: 140%; }
    .sl-cam-name { font-size: 13px; padding: 8px 8px 3px; }
    .sl-cam-status { font-size: 10px; padding: 4px 12px; }
    .sl-cam-desc { font-size: 11px; }
    .sl-banner-default h2 { font-size: 22px; }
    .sl-banner-default { padding: 20px; }
}
@media (max-width: 480px) {
    .sl-cam-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .sl-cam-thumb { padding-top: 150%; }
    .sl-cam-name { font-size: 12px; }
    .sl-cam-actions { padding: 0 6px 4px; }
    .sl-cam-desc { display: none; }
}
