/* ==========================================================================
   e7v.ru - Legal Pages & Modals Theme (Cyberpunk / Clean Dark 2026)
   ========================================================================== */

:root {
    --legal-bg: #050510;
    --legal-card-bg: rgba(10, 12, 22, 0.85);
    --legal-card-border: rgba(0, 243, 255, 0.18);
    --legal-card-border-glow: rgba(0, 243, 255, 0.35);
    --legal-cyan: #00f3ff;
    --legal-purple: #bc13fe;
    --legal-text: #f1f5f9;
    --legal-text-secondary: #94a3b8;
    --legal-text-muted: #64748b;
    --legal-code-bg: rgba(0, 0, 0, 0.5);
    --legal-font-sans: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --legal-font-mono: 'JetBrains Mono', monospace, Consolas;
}

body.legal-page-body {
    margin: 0;
    padding: 0;
    background-color: var(--legal-bg);
    color: var(--legal-text);
    font-family: var(--legal-font-sans);
    line-height: 1.7;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-image: 
        radial-gradient(ellipse 60% 40% at 50% -20%, rgba(188, 19, 254, 0.15), transparent),
        radial-gradient(ellipse 40% 30% at 50% 100%, rgba(0, 243, 255, 0.1), transparent);
    background-attachment: fixed;
}

.legal-container {
    max-width: 960px;
    margin: 0 auto;
    padding: 40px 20px 80px;
    width: 100%;
    box-sizing: border-box;
}

/* Header & Navigation */
.legal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    padding-bottom: 24px;
    margin-bottom: 32px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.legal-logo-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    text-decoration: none;
    font-family: var(--legal-font-mono);
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: 1px;
    transition: color 0.25s ease;
}

.legal-logo-link:hover {
    color: var(--legal-cyan);
}

.legal-logo-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--legal-cyan);
    box-shadow: 0 0 12px var(--legal-cyan);
}

.legal-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    background: rgba(0, 243, 255, 0.06);
    border: 1px solid rgba(0, 243, 255, 0.3);
    border-radius: 8px;
    color: var(--legal-cyan);
    font-family: var(--legal-font-mono);
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.25s ease;
}

.legal-back-btn:hover {
    background: rgba(0, 243, 255, 0.15);
    border-color: var(--legal-cyan);
    box-shadow: 0 0 16px rgba(0, 243, 255, 0.25);
    transform: translateX(-2px);
}

/* Tab navigation between legal documents */
.legal-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 36px;
    background: rgba(14, 16, 30, 0.6);
    padding: 6px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.legal-tab {
    padding: 10px 18px;
    border-radius: 8px;
    color: var(--legal-text-secondary);
    text-decoration: none;
    font-family: var(--legal-font-mono);
    font-size: 0.82rem;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.legal-tab:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.04);
}

.legal-tab.active {
    color: #050510;
    background: var(--legal-cyan);
    font-weight: 600;
    box-shadow: 0 0 18px rgba(0, 243, 255, 0.4);
}

/* Content Card */
.legal-card {
    background: var(--legal-card-bg);
    border: 1px solid var(--legal-card-border);
    border-radius: 16px;
    padding: 44px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.legal-badge {
    display: inline-block;
    padding: 5px 12px;
    background: rgba(188, 19, 254, 0.15);
    border: 1px solid rgba(188, 19, 254, 0.4);
    border-radius: 6px;
    color: #d8b4fe;
    font-family: var(--legal-font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 18px;
}

.legal-title {
    font-size: 2.2rem;
    font-weight: 800;
    margin: 0 0 12px;
    line-height: 1.25;
    background: linear-gradient(135deg, #ffffff 40%, var(--legal-cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.legal-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    font-family: var(--legal-font-mono);
    font-size: 0.8rem;
    color: var(--legal-text-muted);
    margin-bottom: 36px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.legal-card h2 {
    font-size: 1.45rem;
    font-weight: 700;
    margin: 36px 0 16px;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 12px;
}

.legal-card h2::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 1.2em;
    background: var(--legal-cyan);
    border-radius: 2px;
    box-shadow: 0 0 8px var(--legal-cyan);
}

.legal-card h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin: 24px 0 12px;
    color: #e2e8f0;
}

.legal-card p {
    margin: 0 0 16px;
    color: var(--legal-text-secondary);
    font-size: 0.96rem;
}

.legal-card ul, .legal-card ol {
    margin: 0 0 20px 20px;
    padding: 0;
    color: var(--legal-text-secondary);
    font-size: 0.96rem;
}

.legal-card li {
    margin-bottom: 8px;
}

.legal-card strong {
    color: #fff;
    font-weight: 600;
}

.legal-alert {
    background: rgba(0, 243, 255, 0.05);
    border-left: 3px solid var(--legal-cyan);
    border-radius: 0 10px 10px 0;
    padding: 18px 22px;
    margin: 24px 0;
    color: #e2e8f0;
    font-size: 0.92rem;
}

.legal-alert.warning {
    background: rgba(188, 19, 254, 0.08);
    border-left-color: var(--legal-purple);
}

.legal-card a {
    color: var(--legal-cyan);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: opacity 0.2s;
}

.legal-card a:hover {
    opacity: 0.8;
}

.legal-footer {
    margin-top: auto;
    padding: 40px 20px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    font-family: var(--legal-font-mono);
    font-size: 0.8rem;
    color: var(--legal-text-muted);
}

.legal-footer a {
    color: var(--legal-text-secondary);
    text-decoration: none;
    margin: 0 10px;
    transition: color 0.2s;
}

.legal-footer a:hover {
    color: var(--legal-cyan);
}

/* ==========================================================================
   Footer Legal Section on Main Page
   ========================================================================== */
.footer-legal {
    margin-top: 80px;
    padding: 26px 0 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    gap: 14px;
    font-family: var(--legal-font-mono);
    position: relative;
    z-index: 2;
}

.legal-links-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    font-size: 0.82rem;
}

.legal-footer-link {
    color: #94a3b8;
    text-decoration: none;
    transition: all 0.25s ease;
    cursor: pointer;
}

.legal-footer-link:hover {
    color: var(--legal-cyan);
    text-shadow: 0 0 10px rgba(0, 243, 255, 0.5);
}

.legal-separator {
    color: rgba(255, 255, 255, 0.2);
    font-size: 0.75rem;
}

.legal-disclaimer {
    font-size: 0.76rem;
    line-height: 1.6;
    color: #64748b;
    max-width: 960px;
}

/* ==========================================================================
   Cookie Banner Styles
   ========================================================================== */
.e7v-cookie-banner {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(150%);
    width: calc(100% - 40px);
    max-width: 820px;
    background: rgba(8, 10, 20, 0.94);
    border: 1px solid rgba(0, 243, 255, 0.35);
    border-radius: 16px;
    padding: 22px 28px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), 0 0 25px rgba(0, 243, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
    box-sizing: border-box;
    font-family: var(--legal-font-sans);
}

.e7v-cookie-banner.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.e7v-cookie-content {
    flex: 1;
}

.e7v-cookie-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.e7v-cookie-badge {
    font-family: var(--legal-font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--legal-cyan);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.e7v-cookie-badge::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--legal-cyan);
    box-shadow: 0 0 8px var(--legal-cyan);
}

.e7v-cookie-text {
    font-size: 0.86rem;
    line-height: 1.55;
    color: #cbd5e1;
    margin: 0;
}

.e7v-cookie-text a {
    color: var(--legal-cyan);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.e7v-cookie-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.e7v-cookie-btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-family: var(--legal-font-mono);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    white-space: nowrap;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.e7v-cookie-btn-primary {
    background: var(--legal-cyan);
    color: #050510;
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.4);
}

.e7v-cookie-btn-primary:hover {
    background: #fff;
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.7);
    transform: translateY(-1px);
}

.e7v-cookie-btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #e2e8f0;
}

.e7v-cookie-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.3);
}

/* ==========================================================================
   Legal Modal Styles (Embedded Viewer on Main Page)
   ========================================================================== */
.e7v-legal-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(5, 5, 16, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.e7v-legal-modal-backdrop.active {
    display: flex;
    opacity: 1;
}

.e7v-legal-modal {
    background: #090b16;
    border: 1px solid rgba(0, 243, 255, 0.3);
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.9), 0 0 35px rgba(0, 243, 255, 0.15);
    border-radius: 18px;
    width: calc(100% - 32px);
    max-width: 920px;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: modalIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.96) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.e7v-legal-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 26px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(14, 16, 30, 0.8);
}

.e7v-legal-modal-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.e7v-legal-modal-tabs::-webkit-scrollbar {
    display: none;
}

.e7v-modal-tab-btn {
    padding: 8px 14px;
    border-radius: 6px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--legal-text-secondary);
    font-family: var(--legal-font-mono);
    font-size: 0.78rem;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.e7v-modal-tab-btn:hover {
    color: #fff;
    border-color: rgba(0, 243, 255, 0.3);
}

.e7v-modal-tab-btn.active {
    background: var(--legal-cyan);
    color: #050510;
    font-weight: 700;
    border-color: var(--legal-cyan);
    box-shadow: 0 0 12px rgba(0, 243, 255, 0.3);
}

.e7v-modal-close {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.2s;
    flex-shrink: 0;
    margin-left: 12px;
}

.e7v-modal-close:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--legal-cyan);
    color: var(--legal-cyan);
}

.e7v-legal-modal-body {
    padding: 30px 36px;
    overflow-y: auto;
    font-family: var(--legal-font-sans);
    line-height: 1.7;
    color: var(--legal-text);
    scrollbar-color: var(--legal-cyan) rgba(10, 12, 22, 0.5);
    scrollbar-width: thin;
}

.e7v-legal-modal-body h2 {
    color: #fff;
    font-size: 1.4rem;
    margin-top: 24px;
    margin-bottom: 12px;
}

.e7v-legal-modal-body h3 {
    color: #e2e8f0;
    font-size: 1.1rem;
    margin-top: 18px;
    margin-bottom: 8px;
}

.e7v-legal-modal-body p, .e7v-legal-modal-body li {
    color: var(--legal-text-secondary);
    font-size: 0.94rem;
}

.e7v-legal-modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 26px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(10, 12, 22, 0.8);
    font-family: var(--legal-font-mono);
    font-size: 0.78rem;
    color: var(--legal-text-muted);
}

.e7v-legal-modal-footer a {
    color: var(--legal-cyan);
    text-decoration: none;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 768px) {
    .legal-card {
        padding: 24px 20px;
    }

    .legal-title {
        font-size: 1.6rem;
    }

    .e7v-cookie-banner {
        flex-direction: column;
        align-items: flex-start;
        padding: 18px 20px;
        gap: 16px;
        bottom: 16px;
    }

    .e7v-cookie-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .e7v-cookie-btn {
        flex: 1;
        text-align: center;
    }

    .e7v-legal-modal-body {
        padding: 20px;
    }
}
