:root {
    --primary: #00D4FF;
    --primary-rgb: 0, 212, 255;
    --accent: #7C3AED;
    --success: #00F5A0;
    --warning: #FCD34D;

    --bg-primary: #0A0A0F;
    --bg-secondary: #111118;
    --bg-tertiary: #1A1A24;
    --bg-card: #151520;

    --text-primary: #FFFFFF;
    --text-secondary: #B4B4B8;
    --text-muted: #6B6B7D;

    --border: #2A2A35;
    --border-light: #353545;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 40px rgba(var(--primary-rgb), 0.3);

    --gradient-primary: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    --gradient-card: linear-gradient(145deg, var(--bg-card) 0%, #1C1C28 100%);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Background Pattern */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(
            circle at 20% 80%,
            rgba(124, 58, 237, 0.1) 0%,
            transparent 50%
        ),
        radial-gradient(
            circle at 80% 20%,
            rgba(0, 212, 255, 0.1) 0%,
            transparent 50%
        );
    z-index: -1;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 10, 15, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-primary);
}

.logo-img {
    height: 50px;
    border-radius: 14px;
    box-shadow: var(--shadow);
    filter: brightness(1.2);
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: var(--primary);
    background: rgba(var(--primary-rgb), 0.1);
}

.btn-header {
    background: var(--gradient-primary);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.btn-header:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.container {
    max-width: 1000px;
    margin: 120px auto 60px auto;
    background: var(--gradient-card);
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    padding: 48px 40px;
    border: 1px solid var(--border);
    position: relative;
    backdrop-filter: blur(20px);
}

/* Glow effect */
.container::before {
    content: "";
    position: absolute;
    inset: -1px;
    background: var(--gradient-primary);
    border-radius: 24px;
    opacity: 0.1;
    z-index: -1;
}

/* Header section */
.container > p:first-of-type {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.container > p:nth-of-type(2) {
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
}

.container > p:nth-of-type(3) {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.container > p:nth-of-type(4) {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
    padding: 16px;
    background: rgba(0, 212, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(0, 212, 255, 0.1);
    margin-bottom: 32px;
}

h1 {
    color: var(--primary);
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin: 0 0 24px 0;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h2 {
    color: var(--primary);
    font-size: 1.4rem;
    font-weight: 600;
    margin: 48px 0 24px 0;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

h2::before {
    content: "";
    width: 4px;
    height: 24px;
    background: var(--gradient-primary);
    border-radius: 2px;
    flex-shrink: 0;
}

h2::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, var(--border-light), transparent);
    margin-left: 12px;
}

h3 {
    color: var(--warning);
    font-size: 1.1rem;
    font-weight: 500;
    margin: 32px 0 16px 0;
}

p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 20px;
}

pre {
    background: rgba(0, 212, 255, 0.03);
    border: 1px solid rgba(0, 212, 255, 0.1);
    border-radius: 16px;
    padding: 24px;
    font-family: "JetBrains Mono", "Fira Code", monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-primary);
    overflow-x: auto;
    white-space: pre-line;
    margin-bottom: 24px;
    position: relative;
}

pre::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gradient-primary);
    opacity: 0.3;
}

/* Scrollbar styling for pre elements */
pre::-webkit-scrollbar {
    height: 6px;
}

pre::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 3px;
}

pre::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 3px;
}

pre::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

a {
    color: var(--warning);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 48px;
    padding: 12px 24px;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 12px;
    color: var(--primary);
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.back-link:hover {
    background: rgba(0, 212, 255, 0.15);
    border-color: rgba(0, 212, 255, 0.4);
    transform: translateX(-4px);
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.2);
}

.back-link::before {
    content: "←";
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.back-link:hover::before {
    transform: translateX(-2px);
}

/* Footer */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 60px 0 30px;
    margin-top: 60px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 40px;
}

.footer-brand h3 {
    font-size: 24px;
    margin-bottom: 12px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-brand p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.footer-section h4 {
    font-size: 18px;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.footer-section a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: 8px;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .header-content {
        padding: 0 20px;
    }
    
    .header-nav {
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .container {
        margin: 100px 16px 40px 16px;
        padding: 32px 24px;
        border-radius: 20px;
    }

    .header-nav {
        display: none;
    }

    .header-content {
        padding: 0 16px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
        padding: 0 16px;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.2rem;
        margin: 40px 0 20px 0;
    }

    pre {
        padding: 20px;
        font-size: 0.85rem;
    }

    .back-link {
        margin-top: 40px;
    }
}

@media (max-width: 480px) {
    .container {
        margin: 100px 12px 20px 12px;
        padding: 24px 16px;
    }

    .header-content {
        padding: 0 12px;
    }


    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.1rem;
    }

    pre {
        padding: 16px;
        font-size: 0.8rem;
    }
}

/* Custom selection */
::selection {
    background: rgba(0, 212, 255, 0.2);
    color: var(--text-primary);
}

::-moz-selection {
    background: rgba(0, 212, 255, 0.2);
    color: var(--text-primary);
}

/* Focus styles for accessibility */
*:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Smooth animations for reduced motion users */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Additional improvements */
.container {
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Smooth scroll behavior for anchor links */
html {
    scroll-padding-top: 100px;
}

/* Improved focus states for accessibility */
.nav-link:focus,
.btn-header:focus,
.back-link:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Better hover effects for interactive elements */
.feature-card:hover,
.back-link:hover {
    transform: translateY(-2px);
    transition: transform 0.3s ease;
}
