/* Legal page styles - Professional design for MiraOPT */

:root {
    --bg: #f7f8f6;
    --surface: #ffffff;
    --surface-2: #f0f2ef;
    --text: #202722;
    --muted: #818b83;
    --accent: #168c72;
    --accent-2: #e5a45c;
    --accent-soft: rgba(22, 140, 114, 0.14);
    --accent-glow: rgba(22, 140, 114, 0.13);
    --border: rgba(34, 54, 41, 0.09);
    --shadow: 0 12px 45px rgba(26, 46, 34, 0.07);
    --radius: 16px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #121212;
        --surface: #1e1e1e;
        --surface-2: #1a1a1a;
        --text: #e6e6e6;
        --muted: #a8a8a8;
        --border: rgba(156, 156, 156, 0.2);
        --shadow: 0 12px 45px rgba(0, 0, 0, 0.3);
    }
}

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

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, var(--bg) 0%, #f1f3f0 100%);
    min-height: 100vh;
    color: var(--text);
    line-height: 1.6;
    padding: 40px 20px;
    position: relative;
    overflow-x: hidden;
}

/* CSS Wave Animation Background */
body::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 20c10-10 20 0 40 0s-10 20-40 20z' fill='%23ffffff' fill-opacity='0.03'/%3E%3C/svg%3E");
    background-size: 40px 40px;
    z-index: -1;
    opacity: 0.5;
    animation: waveScroll 20s linear infinite;
}

@keyframes waveScroll {
    0% { background-position: 0 0; }
    100% { background-position: 40px 40px; }
}

.legal-container {
    max-width: 900px;
    margin: 0 auto;
    background: color-mix(in srgb, var(--surface) 95%, transparent);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.legal-header {
    text-align: center;
    padding: 40px 30px 30px;
    background: color-mix(in srgb, var(--surface) 98%, transparent);
    border-bottom: 1px solid var(--border);
}

.legal-logo {
    width: 80px;
    height: 80px;
    margin-bottom: 16px;
    filter: drop-shadow(0 4px 12px var(--accent-glow));
    transition: transform 180ms cubic-bezier(.2,.8,.2,1);
    animation: float 6s ease-in-out infinite;
}

.legal-logo:hover {
    transform: scale(1.05);
}

.legal-title {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.legal-subtitle {
    font-size: 14px;
    color: var(--muted);
}

.legal-content {
    padding: 30px;
}

.legal-section {
    margin-bottom: 28px;
    padding: 0 8px;
}

.legal-section:last-of-type {
    margin-bottom: 0;
}

.legal-section h2 {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.3px;
    margin-bottom: 12px;
    position: relative;
    padding-left: 20px;
    color: var(--text);
}

.legal-section h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 5px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
}

.legal-section p {
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 12px;
}

.legal-section p strong {
    color: var(--text);
    font-weight: 600;
}

.legal-section p br + p {
    margin-top: 8px;
}

.legal-divider {
    color: var(--muted);
    margin: 0 8px;
}

.legal-footer {
    text-align: center;
    padding: 24px 30px;
    background: color-mix(in srgb, var(--surface) 98%, transparent);
    border-top: 1px solid var(--border);
    margin-top: auto;
}

.legal-footer p {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 8px;
}

.legal-links {
    font-size: 13px;
    display: flex;
    justify-content: center;
    gap: 16px;
}

.legal-links a {
    color: var(--accent);
    text-decoration: none;
    transition: color 180ms cubic-bezier(.2,.8,.2,1);
}

.legal-links a:hover {
    color: var(--accent);
    text-decoration: underline;
}

/* Animation for logo */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

.legal-logo {
    animation: float 6s ease-in-out infinite;
}

/* Language Selector */
.legal-lang-selector {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    gap: 8px;
    z-index: 100;
}

.legal-lang-selector .lang-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 2px solid var(--border);
    background: color-mix(in srgb, var(--surface) 90%, transparent);
    color: var(--text);
    font-weight: 600;
    cursor: pointer;
    transition: all 180ms cubic-bezier(.2,.8,.2,1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.legal-lang-selector .lang-btn:hover {
    background: var(--accent-soft);
    color: var(--accent);
    transform: scale(1.1);
}

.legal-lang-selector .lang-btn.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

/* Responsive */
@media (max-width: 600px) {
    .legal-container {
        margin: 20px;
        border-radius: 16px;
    }

    .legal-header {
        padding: 30px 20px 20px;
    }

    .legal-title {
        font-size: 22px;
    }

    .legal-content {
        padding: 20px;
    }

    body {
        padding: 20px 16px;
    }
}