/**
 * Cam-World - Основной CSS
 * Общий дизайн для всех страниц
 */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg-primary: #0f0f0f;
    --bg-secondary: #1a1a1a;
    --bg-card: #252525;
    --text-primary: #ffffff;
    --text-secondary: #aaaaaa;
    --accent-pink: #FF486A;
    --accent-purple: #9333EA;
    --accent-green: #22c55e;
    --border: #333333;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
}

body.light-theme {
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f5;
    --bg-card: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --border: #e0e0e0;
}

html { scroll-behavior: smooth; }

/* Header */
.header {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(26, 26, 26, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(51, 51, 51, 0.5);
    padding: 14px 20px;
    z-index: 1001;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.3s ease;
}

body.light-theme .header {
    background: rgba(245, 245, 245, 0.55);
    border-bottom-color: rgba(224, 224, 224, 0.5);
}

.header-hidden { transform: translateY(-100%); }
.header-visible { transform: translateY(0); }

.header-left { display: flex; align-items: center; gap: 20px; }

.logo {
    font-size: 22px;
    font-weight: 800;
    color: #ffffff;
    text-decoration: none;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 2px;
}

.logo .logo-dash { margin: 0 1px; }
.logo .logo-world { color: #ff486a; }

body.light-theme .logo { color: #2d2d2d; }
body.light-theme .logo .logo-world { color: #ff486a; }

.nav-links { display: flex; gap: 8px; }

.nav-link {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.nav-link:hover, .nav-link.active {
    color: var(--text-primary);
    background: var(--bg-card);
}

.header-right { display: flex; gap: 8px; align-items: center; }

.icon-btn {
    background: rgba(37, 37, 37, 0.8);
    border: 1px solid var(--border);
    color: var(--text-primary);
    width: 42px;
    height: 42px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    text-decoration: none;
}

body.light-theme .icon-btn {
    background: rgba(255, 255, 255, 0.8);
}

.icon-btn:hover {
    border-color: var(--accent-pink);
    color: var(--accent-pink);
}

/* Lang Selector */
.lang-selector { position: relative; }

.lang-btn {
    background: rgba(37, 37, 37, 0.8);
    border: 1px solid var(--border);
    color: var(--text-primary);
    height: 42px;
    padding: 0 10px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s;
}

body.light-theme .lang-btn {
    background: rgba(255, 255, 255, 0.8);
}

.lang-btn-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 13px;
    flex-shrink: 0;
}

.lang-btn-flag svg {
    width: 18px;
    height: 13px;
    border-radius: 2px;
}

.lang-flag { display: inline-block; width: 18px; height: 13px; border-radius: 2px; overflow: hidden; vertical-align: middle; flex-shrink: 0; }
.lang-flag svg { width: 100%; height: 100%; display: block; }

.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 6px;
    display: none;
    z-index: 200;
    max-height: 400px;
    overflow-y: auto;
    min-width: 160px;
}

.lang-dropdown.show {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.lang-option {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-primary);
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    text-align: left;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.lang-option:hover { border-color: var(--border); }
.lang-option.active { border-color: var(--accent-pink); }

/* Mobile */
@media (max-width: 1023px) {
    .nav-links { display: none; }
}

/* SEO-реестр: отключенная ссылка рендерится как обычный текст (без подчёркивания и курсора-указателя) */
.link-disabled {
    color: inherit;
    text-decoration: none;
    cursor: text;
}

/* =====================================================
   LIVE/OFFLINE Ribbon Badges (global)
   ===================================================== */

/* LIVE ribbon - top-right corner */
.card-live-top {
    position: absolute;
    top: -2px; right: -2px;
    background: #22c55e;
    color: #fff;
    padding: 5px 12px;
    border-radius: 0 12px 0 12px;
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: none;
    align-items: center;
    gap: 4px;
    z-index: 3;
    box-shadow: 0 3px 12px rgba(34,197,94,0.4);
}
.card:has(.card-status.online) .card-live-top,
.similar-card:has(.card-status.online) .card-live-top { display: flex; }
.card:has(.card-live-top) .card-status.online,
.similar-card:has(.card-live-top) .card-status.online { display: none !important; }

/* OFFLINE ribbon - top-right corner */
.card-offline-top {
    position: absolute;
    top: -2px; right: -2px;
    background: rgba(102, 102, 102, 0.9);
    color: #fff;
    padding: 5px 12px;
    border-radius: 0 12px 0 12px;
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: none;
    align-items: center;
    gap: 4px;
    z-index: 3;
    box-shadow: 0 3px 12px rgba(0,0,0,0.3);
}
.card:has(.card-status.offline) .card-offline-top,
.similar-card:has(.card-status.offline) .card-offline-top { display: flex; }
.card:has(.card-offline-top) .card-status.offline,
.similar-card:has(.card-offline-top) .card-status.offline { display: none !important; }

/* Pulsing dot in LIVE ribbon */
.live-dot-pulse {
    width: 5px; height: 5px;
    border-radius: 50%;
    background: #fff;
    animation: ribbon-dot-pulse 1.2s infinite;
}
@keyframes ribbon-dot-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.4); opacity: 0.7; }
}

/* Light theme adjustments */
body.light-theme .card-live-top { box-shadow: 0 3px 15px rgba(34,197,94,0.5); }
body.light-theme .card:has(.card-status.online):hover,
body.light-theme .similar-card:has(.card-status.online):hover,
body.light-theme .card:has(.card-status.offline):hover,
body.light-theme .similar-card:has(.card-status.offline):hover {
    border-color: var(--accent-pink);
}

/* =====================================================
   Sticky Footer - footer always at bottom
   ===================================================== */
html {
    height: 100%;
}
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
.site-main,
main {
    flex: 1 0 auto;
}
.site-footer,
footer {
    flex-shrink: 0;
    margin-top: auto;
}
