.terms-hero {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    color: white;
    padding: var(--space-24) 0 var(--space-16);
    position: relative;
    overflow: hidden;
}

.terms-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="shield" width="50" height="50" patternUnits="userSpaceOnUse"><path d="M25 10 L40 15 L25 40 L10 15 Z" fill="rgba(255,255,255,0.05)" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23shield)"/></svg>');
    animation: slide 25s linear infinite;
}

@keyframes slide {
    0% { transform: translateX(-50px); }
    100% { transform: translateX(0px); }
}

.terms-hero .container {
    position: relative;
    z-index: 2;
}

.terms-hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--space-6);
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.terms-hero p {
    font-size: var(--font-size-xl);
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
    margin: 0 auto;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.terms-content {
    background: var(--color-background);
    position: relative;
}

.content-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    padding: var(--space-20) var(--space-4);
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: var(--space-12);
    align-items: start;
}

.sidebar {
    position: sticky;
    top: 10rem;
    background: var(--color-surface);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-lg);
}

.sidebar h3 {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
    color: var(--color-text);
    margin-bottom: var(--space-6);
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.sidebar h3::before {
    content: '';
    font-size: var(--font-size-xl);
}

.toc {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc li {
    margin-bottom: var(--space-2);
}

.toc a {
    display: block;
    padding: var(--space-3) var(--space-4);
    color: var(--color-text-muted);
    text-decoration: none;
    border-radius: var(--radius-base);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    transition: all var(--transition-base);
    border-left: 3px solid transparent;
}

.toc a:hover {
    background: var(--color-accent);
    color: white;
    border-left-color: var(--color-primary);
    transform: translateX(4px);
}

.main-content {
    background: white;
    border-radius: var(--radius-xl);
    padding: var(--space-10);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--color-border);
}

[data-theme="dark"] .main-content {
    background: var(--color-surface);
}

.last-updated {
    background: linear-gradient(135deg, var(--color-accent), var(--color-primary));
    color: white;
    padding: var(--space-4) var(--space-6);
    border-radius: var(--radius-full);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    margin-bottom: var(--space-10);
    text-align: center;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.important-notice {
    background: linear-gradient(135deg, var(--color-warning), #f59e0b);
    color: var(--color-gray-900);
    padding: var(--space-6);
    border-radius: var(--radius-lg);
    margin: var(--space-6) 0;
    font-weight: var(--font-weight-medium);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.important-notice::before {
    content: '';
    font-size: var(--font-size-lg);
}

.legal-section {
    margin-bottom: var(--space-12);
    scroll-margin-top: var(--space-20);
}

.legal-section h2 {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-primary);
    margin-bottom: var(--space-6);
    position: relative;
    text-decoration: underline;
}

.legal-section h3 {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text);
    margin: var(--space-8) 0 var(--space-4);
    padding: var(--space-3) var(--space-4);
    background: var(--color-surface);
    border-radius: var(--radius-base);
    border-left: 4px solid var(--color-accent);
}

.legal-section p {
    color: var(--color-text);
    line-height: var(--line-height-relaxed);
    margin-bottom: var(--space-4);
    font-size: var(--font-size-base);
}

.legal-section ul, .legal-section ol {
    margin: var(--space-4) 0;
    padding-left: 0;
    list-style: none;
}

.legal-section li {
    position: relative;
    padding: var(--space-2) 0 var(--space-2) var(--space-8);
    color: var(--color-text);
    line-height: var(--line-height-relaxed);
    margin-bottom: var(--space-2);
}

.legal-section ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: var(--space-5);
    width: var(--space-2);
    height: var(--space-2);
    background: var(--color-accent);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-bold);
}

.legal-section ol {
    counter-reset: list-counter;
}

.legal-section ol li {
    counter-increment: list-counter;
}

.legal-section ol li::before {
    content: counter(list-counter);
    position: absolute;
    left: 0;
    top: var(--space-2);
    width: var(--space-5);
    height: var(--space-5);
    background: var(--color-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-bold);
}

.contact-highlight {
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    color: white;
    padding: var(--space-8);
    border-radius: var(--radius-xl);
    margin: var(--space-10) 0;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.contact-highlight::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: rotate 8s linear infinite;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.contact-highlight h2 {
    color: white;
    margin-bottom: var(--space-4);
    position: relative;
    z-index: 2;
}

.contact-highlight h2::before {
    background: white;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.3);
}

.contact-highlight p {
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: var(--space-3);
    position: relative;
    z-index: 2;
    font-weight: var(--font-weight-medium);
}

.contact-highlight a {
    color: white;
    text-decoration: none;
    font-weight: var(--font-weight-bold);
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    transition: border-color var(--transition-base);
}

.contact-highlight a:hover {
    border-bottom-color: white;
}

.section-icon {
    display: inline-block;
    margin-right: var(--space-3);
    font-size: var(--font-size-lg);
}

.highlight-box {
    background: var(--color-surface);
    border: 2px solid var(--color-accent);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    margin: var(--space-6) 0;
    position: relative;
}

.highlight-box::before {
    content: '';
    position: absolute;
    top: var(--space-4);
    right: var(--space-4);
    font-size: var(--font-size-xl);
}

@media (max-width: 768px) {
    .content-wrapper {
        grid-template-columns: 1fr;
        gap: var(--space-8);
        padding: var(--space-8) var(--space-4);
    }

    .sidebar {
        position: static;
        order: -1;
    }

    .sidebar h3 {
        font-size: var(--font-size-base);
    }

    .toc {
        display: flex;
        flex-wrap: wrap;
        gap: var(--space-2);
    }

    .toc li {
        margin: 0;
    }

    .toc a {
        padding: var(--space-2) var(--space-3);
        font-size: var(--font-size-xs);
        white-space: nowrap;
    }

    .main-content {
        padding: var(--space-6);
    }

    .legal-section h2 {
        font-size: var(--font-size-xl);
        padding-left: var(--space-8);
    }

    .legal-section h2::before {
        width: var(--space-4);
        height: var(--space-4);
    }

    .terms-hero {
        padding: var(--space-16) 0 var(--space-12);
    }
}
