/* Document layout styling for legal pages — visual language matches the
   Actions & Stuff RTX Patcher app / guild dashboard (dark, green accent, Segoe UI). */
:root {
    --bg-main: #181818;
    --bg-gradient: linear-gradient(180deg, #1e1e1e 0%, #181818 100%);
    --bg-card: #161616;
    --bg-sidebar: #161616;

    --border-color: #2a2a2a;
    --border-hover: rgba(255, 255, 255, 0.15);

    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;

    --primary-gradient: linear-gradient(135deg, #22c55e 0%, #15803d 100%);
    --primary-color: #22c55e;
    --accent-color: #15803d;
    --accent-red: #f87171;
    --accent-orange: #f59e0b;
    --accent-cyan: #38bdf8;

    --font-family-sans: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
    --transition-smooth: all 0.2s ease;
}

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

body {
    background: var(--bg-gradient);
    color: var(--text-primary);
    font-family: var(--font-family-sans);
    overflow-x: hidden;
    line-height: 1.6;
    border-top: 4px solid var(--primary-color);
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* Base layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px;
}

/* Header */
.legal-header {
    text-align: center;
    margin-bottom: 60px;
    position: relative;
}

.legal-header::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--primary-gradient);
    border-radius: 2px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
    margin-bottom: 16px;
    transition: var(--transition-smooth);
}

.brand:hover {
    opacity: 0.9;
}

.logo-icon {
    font-size: 32px;
    color: var(--primary-color);
    filter: drop-shadow(0 0 12px rgba(34, 197, 94, 0.4));
}

.brand-text h1 {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.brand-text span {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    display: block;
    text-align: left;
}

.page-title {
    font-size: 42px;
    font-weight: 800;
    letter-spacing: -1px;
    margin-top: 10px;
    color: #ffffff;
}

.last-updated {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 12px;
}

/* Split layout: sidebar list + main article */
.legal-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    align-items: start;
}

/* Sidebar navigation */
.legal-nav-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    position: sticky;
    top: 40px;
    box-shadow: 0 8px 24px 0 rgba(0, 0, 0, 0.4);
}

.legal-nav-card h3 {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.legal-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.legal-nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 14px;
    border-radius: 6px;
    transition: var(--transition-smooth);
    border-left: 2px solid transparent;
}

.legal-nav-link:hover, .legal-nav-link.active {
    color: var(--text-primary);
    background: rgba(34, 197, 94, 0.08);
    border-left-color: var(--primary-color);
    padding-left: 18px;
}

/* Content block */
.legal-content-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 8px 24px 0 rgba(0, 0, 0, 0.4);
    transition: var(--transition-smooth);
}

.legal-content-card:hover {
    border-color: var(--border-hover);
}

.legal-section {
    scroll-margin-top: 40px;
    margin-bottom: 40px;
}

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

.legal-section h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.legal-section h2 i {
    color: var(--primary-color);
}

.legal-section p {
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-size: 15px;
    line-height: 1.7;
}

.legal-section p a {
    color: var(--primary-color);
}

.legal-section ul {
    list-style: none;
    margin-left: 8px;
    margin-bottom: 16px;
}

.legal-section ul li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 10px;
    color: var(--text-secondary);
    font-size: 15px;
}

.legal-section ul li::before {
    content: "\f00c"; /* FontAwesome check */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    left: 0;
    top: 2px;
    font-size: 12px;
    color: var(--primary-color);
}

.legal-section.privacy-policy ul li::before {
    content: "\f023"; /* Lock icon for privacy */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: var(--accent-cyan);
}

.info-alert {
    background: rgba(34, 197, 94, 0.06);
    border-left: 4px solid var(--primary-color);
    border-radius: 0 8px 8px 0;
    padding: 16px;
    margin: 20px 0;
    color: var(--text-secondary);
    font-size: 14px;
}

.info-alert i {
    color: var(--primary-color);
    margin-right: 8px;
}

/* Buttons — chunky "pressed" style matching the dashboard/Patcher app */
.btn {
    font-family: var(--font-family-sans);
    font-weight: 700;
    font-size: 0.82rem;
    padding: 9px 18px;
    border-radius: 6px;
    border: 2px solid #0f0f10;
    cursor: pointer;
    transition: filter 0.1s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    text-decoration: none;
}
.btn:active { filter: brightness(0.9); }
.btn-primary { background: var(--primary-gradient); color: #08210f; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; color: var(--text-muted); border-color: rgba(255,255,255,0.12); }
.btn-ghost:hover { color: var(--text-primary); border-color: rgba(255,255,255,0.25); }
.btn-sm { padding: 6px 12px; font-size: 0.72rem; }

/* Footer */
.legal-footer {
    margin-top: 60px;
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.footer-nav {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

/* The impressum link stays a plain, deliberately understated text link (not a
   button) — legally required to be reachable, but not meant to draw the eye. */
.footer-link-quiet {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 10px;
    opacity: 0.3;
    transition: var(--transition-smooth);
}
.footer-link-quiet:hover { opacity: 0.7; }

.copyright {
    font-size: 12px;
    color: var(--text-muted);
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .legal-layout {
        grid-template-columns: 1fr;
    }
    .legal-nav-card {
        position: static;
        margin-bottom: 24px;
    }
    .legal-nav {
        flex-direction: row;
        flex-wrap: wrap;
    }
    .legal-nav-link {
        border-left: none;
        border-bottom: 2px solid transparent;
    }
    .legal-nav-link:hover, .legal-nav-link.active {
        border-bottom-color: var(--primary-color);
        border-left-color: transparent;
        padding-left: 14px;
    }
}

@media (max-width: 600px) {
    .container {
        padding: 24px 16px;
    }
    .page-title {
        font-size: 32px;
    }
    .legal-content-card {
        padding: 24px;
    }
}
