/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.nav-brand h1 {
    color: #764ba2;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: -5px;
}

.tagline {
    color: #666;
    font-size: 0.9rem;
    font-style: italic;
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.nav a:hover {
    background: #764ba2;
    color: white;
    transform: translateY(-2px);
}

/* Main content */
.main {
    background: white;
    margin: 2rem auto;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 3rem 2rem;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(255, 255, 255, 0.05) 10px,
        rgba(255, 255, 255, 0.05) 20px
    );
    animation: float 20s linear infinite;
}

@keyframes float {
    0% { transform: translateX(-100px) translateY(-100px); }
    100% { transform: translateX(100px) translateY(100px); }
}

.page-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.last-updated {
    font-size: 1.1rem;
    opacity: 0.9;
    position: relative;
    z-index: 2;
}

/* Content wrapper */
.content-wrapper {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 3rem;
    padding: 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Table of contents */
.table-of-contents {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 15px;
    height: fit-content;
    position: sticky;
    top: 120px;
    border: 1px solid #e9ecef;
}

.table-of-contents h3 {
    color: #764ba2;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    border-bottom: 2px solid #764ba2;
    padding-bottom: 0.5rem;
}

.table-of-contents ul {
    list-style: none;
}

.table-of-contents li {
    margin-bottom: 0.8rem;
}

.table-of-contents a {
    color: #555;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem;
    display: block;
    border-radius: 8px;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.table-of-contents a:hover {
    background: #667eea;
    color: white;
    transform: translateX(5px);
    border-left-color: #764ba2;
}

/* Terms content */
.terms-content {
    background: white;
}

.term-section {
    margin-bottom: 3rem;
    padding: 2rem;
    border-radius: 15px;
    background: #fafbfc;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.term-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.term-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    background: white;
}

.term-section h2 {
    color: #764ba2;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e9ecef;
    font-weight: 600;
}

.term-section p {
    margin-bottom: 1.2rem;
    font-size: 1.05rem;
    line-height: 1.7;
    color: #444;
}

.term-section ul {
    margin-bottom: 1.2rem;
    padding-left: 2rem;
}

.term-section li {
    margin-bottom: 0.8rem;
    font-size: 1.05rem;
    line-height: 1.6;
    color: #555;
}

.contact-info {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 10px;
    margin: 1.5rem 0;
}

.contact-info a {
    color: white;
    text-decoration: underline;
    font-weight: 500;
}

.contact-info a:hover {
    color: #f0f8ff;
}

.update-notice {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 2rem;
    font-style: italic;
    color: #856404;
}

/* Footer */
.footer {
    background: rgba(0, 0, 0, 0.9);
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
}

.footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.footer a:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Responsive design */
@media (max-width: 768px) {
    .content-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 2rem 1rem;
    }
    
    .table-of-contents {
        position: static;
        order: 2;
        margin-top: 2rem;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .nav {
        gap: 1rem;
    }
    
    .nav a {
        padding: 0.3rem 0.8rem;
        font-size: 0.9rem;
    }
    
    .header .container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .hero-section {
        padding: 2rem 1rem;
    }
    
    .term-section {
        padding: 1.5rem;
    }
    
    .main {
        margin: 1rem;
        border-radius: 15px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .page-title {
        font-size: 1.5rem;
    }
    
    .term-section h2 {
        font-size: 1.4rem;
    }
    
    .back-to-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
    }
}