/* ============================================
   1. RESET & BASE STYLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #160a22;
    color: #e0e0e0;
    line-height: 1.6;
    min-height: 100vh;
}

body.legal-page {
    line-height: 1.8;
}

strong {
    color: #e0e0e0;
}

/* ============================================
   2. NAVIGATION
   ============================================ */
nav {
    background-color: #310c55;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    position: sticky;
    top: 0;
    z-index: 100;
    height: 64px;
}

nav .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}

/* Brand */
nav .nav-brand {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

nav .nav-brand a {
    color: #fff;
    font-size: 1.5rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.3s;
}

nav .nav-brand a:hover {
    color: #b388ff;
}

nav .nav-brand a:hover .nav-logo {
    transform: scale(1.1);
}

nav .nav-logo {
    height: 32px;
    width: auto;
    display: block;
    transition: transform 0.3s ease;
}

/* Navigation Links */
nav .links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

nav .links a {
    color: #e0e0e0;
    text-decoration: none;
    transition: color 0.3s;
}

nav .links a:hover {
    color: #b388ff;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    height: 40px;
    width: 40px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.hamburger-line {
    width: 24px;
    height: 2px;
    background-color: #e0e0e0;
    transition: all 0.3s ease;
    border-radius: 1px;
    display: block;
}

/* ============================================
   3. LAYOUT CONTAINERS
   ============================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* ============================================
   4. HERO SECTION
   ============================================ */
.hero {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #310c55 0%, #4a148c 100%);
    border-radius: 1rem;
    margin-bottom: 3rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.hero h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #fff;
}

.hero p {
    font-size: 1.2rem;
    color: #e0e0e0;
    max-width: 600px;
    margin: 0 auto;
}

/* Hero Title & Logo */
.hero-title-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.hero-logo {
    width: 60px;
    height: 60px;
    display: inline-block;
    animation: float 3s ease-in-out infinite;
}

.hero-title {
    font-size: 3rem;
    margin: 0;
    background: linear-gradient(90deg, #b388ff, #d4b5ff, #9575cd, #b388ff);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-slide 4s ease infinite;
    display: inline-block;
}

/* ============================================
   5. FEATURES GRID
   ============================================ */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.feature-card {
    background-color: #1e0f33;
    padding: 2rem;
    border-radius: 0.5rem;
    border: 1px solid #310c55;
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(179, 136, 255, 0.2);
}

.feature-card h3 {
    color: #b388ff;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.feature-card p {
    color: #b0b0b0;
}

/* ============================================
   6. CONTENT SECTIONS
   ============================================ */
.content-section,
.content {
    background-color: #1e0f33;
    padding: 2rem;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
    border: 1px solid #310c55;
}

.content {
    max-width: 900px;
    margin: 2rem auto;
    padding: 3rem;
}

/* Headings */
.content h1 {
    color: #b388ff;
    margin-bottom: 1.5rem;
    font-size: 2.5rem;
    text-align: center;
}

.content h2,
.content-section h2 {
    color: #9575cd;
    margin-top: 2.5rem;
    margin-bottom: 0.75rem;
    font-size: 1.5rem;
}

.content-section h2 {
    color: #b388ff;
    font-size: 2rem;
}

.content-section h2:first-child {
    margin-top: 0;
}

.content-section h3,
.content h3 {
    color: #b388ff;
    margin-top: 2rem;
    margin-bottom: 0.5rem;
}

/* Text & Lists */
.content-section p,
.content-section li,
.content p,
.content li {
    color: #b0b0b0;
    margin-bottom: 0.5rem;
}

.content-section ul,
.content ul,
.content ol {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

/* Links */
.content-section a,
.content a {
    color: #b388ff;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
    transition: all 0.3s ease;
}

.content-section a:hover,
.content a:hover {
    color: #d4b5ff;
    text-decoration-thickness: 2px;
}

.content-section a:focus,
.content a:focus {
    outline: 2px solid #b388ff;
    outline-offset: 2px;
    border-radius: 2px;
}

/* Code Blocks */
.content-section code,
.content code,
code {
    background-color: #160a22;
    padding: 0.2rem 0.4rem;
    border-radius: 0.2rem;
    color: #b388ff;
    font-family: 'Courier New', monospace;
}

.content-section pre,
.content pre,
pre {
    background-color: #160a22;
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 1rem 0;
}

/* Horizontal Rules */
hr {
    border: none;
    border-top: 1px solid #310c55;
    margin-top: 2rem;
}

/* ============================================
   7. SPECIAL COMPONENTS
   ============================================ */

/* Info Box */
.info-box {
    background-color: #2a1545;
    border-left: 4px solid #b388ff;
    padding: 1rem;
    margin: 1.5rem 0;
    border-radius: 0.3rem;
}

.info-box p {
    margin-bottom: 0.5rem;
}

/* Alert Boxes */
.alert {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 10px;
    margin: 10px 0;
    border-radius: 5px;
}

.error-alert {
    background: #f8d7da;
    border-left-color: #dc3545;
}

.success-alert {
    background: #d4edda;
    border-left-color: #28a745;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

table th {
    background-color: #310c55;
    color: #e0e0e0;
    padding: 0.75rem;
    text-align: left;
}

table td {
    padding: 0.75rem;
    border-bottom: 1px solid #310c55;
    color: #b0b0b0;
}

/* Last Updated Section */
.last-updated {
    text-align: center;
    color: #808080;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #310c55;
    font-size: 0.9rem;
}

/* ============================================
   8. FOOTER
   ============================================ */
footer {
    background-color: #0d0514;
    text-align: center;
    padding: 2rem;
    margin-top: 4rem;
    color: #808080;
}

footer a {
    color: #b388ff;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
    transition: all 0.3s ease;
}

footer a:hover {
    text-decoration-thickness: 2px;
    color: #d4b5ff;
}

footer a:focus {
    outline: 2px solid #b388ff;
    outline-offset: 2px;
    border-radius: 2px;
}

/* ============================================
   9. ANIMATIONS
   ============================================ */
@keyframes gradient-slide {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

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

/* ============================================
   10. UTILITY CLASSES
   ============================================ */
.emoji {
    font-size: 1.2em;
}

/* ============================================
   11. RESPONSIVE DESIGN
   ============================================ */

/* Tablet & Mobile (≤768px) */
@media (max-width: 768px) {
    /* Hero Adjustments */
    .hero h2 {
        font-size: 2rem;
    }
    
    .hero-title-wrapper {
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero-logo {
        width: 50px;
        height: 50px;
    }
    
    .hero-title {
        font-size: 1.8rem;
        text-align: center;
    }
    
    /* Mobile Navigation */
    .mobile-menu-toggle {
        display: flex;
    }
    
    .mobile-menu-toggle.active .hamburger-line:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }
    
    .mobile-menu-toggle.active .hamburger-line:nth-child(2) {
        transform: rotate(-45deg) translate(6px, -6px);
    }
    
    nav .links {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background-color: #310c55;
        flex-direction: column;
        gap: 0;
        padding: 0;
        box-shadow: 0 4px 10px rgba(0,0,0,0.3);
        align-items: stretch;
    }
    
    nav .links.active {
        display: flex;
    }
    
    nav .links a {
        padding: 1rem 2rem;
        width: 100%;
        text-align: center;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    nav .links a:last-child {
        border-bottom: none;
    }
    
    nav .container {
        position: relative;
        padding: 0 1rem;
    }
    
    /* Consistent brand sizing across all mobile */
    nav .nav-brand a {
        font-size: 1.3rem;
    }
    
    nav .nav-logo {
        height: 28px;
    }
    
    /* Content Adjustments */
    .content {
        padding: 1.5rem;
    }
    
    .content h1 {
        font-size: 2rem;
    }
    
    table {
        font-size: 0.9rem;
    }
}

/* Extra Small Devices (≤480px) */
@media (max-width: 480px) {
    nav .container {
        padding: 0 0.75rem;
    }
}
