:root {
    --primary: #3b82f6;
    --secondary: #8b5cf6;
    --dark: #1e293b;
    --light: #f8fafc;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    --accent: #06b6d4;
}

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

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #e2e8f0;
    line-height: 1.6;
    min-height: 100vh;
}

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

/* Header */
header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    padding: 3rem 2rem;
    border-radius: 20px;
    margin-bottom: 2rem;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23ffffff' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E");
    opacity: 0.1;
}

.header-content {
    position: relative;
    z-index: 1;
}

h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #fff, #c7d2fe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.subtitle {
    font-size: 1.3rem;
    opacity: 0.9;
    max-width: 800px;
    margin: 0 auto 2rem;
}

.tech-stack {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.tech-badge {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 8px 20px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Layout */
.content-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.sidebar {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    height: fit-content;
    position: sticky;
    top: 20px;
}

.sidebar h3 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-list {
    list-style: none;
}

.nav-list li {
    margin-bottom: 12px;
}

.nav-list a {
    color: #cbd5e1;
    text-decoration: none;
    padding: 10px 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.nav-list a:hover {
    background: rgba(59, 130, 246, 0.2);
    color: white;
    transform: translateX(5px);
}

.nav-list a.active {
    background: var(--primary);
    color: white;
    font-weight: 500;
}

.main-content {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 2.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Sections */
.section {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 2rem;
}

.section-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(to right, #fff, #93c5fd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Cards */
.card {
    background: rgba(15, 23, 42, 0.6);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--primary);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 10px;
}

.card-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #fff;
    font-family: 'Courier New', monospace;
}

.access-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
}

.public { background: var(--success); }
.private { background: var(--danger); }
.protected { background: var(--warning); }

.card-content {
    color: #cbd5e1;
}

.summary {
    background: rgba(16, 185, 129, 0.1);
    border-left: 3px solid var(--success);
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 0 8px 8px 0;
}

/* Grid layouts */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.feature {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 8px;
    border-left: 3px solid var(--accent);
}

.feature h4 {
    color: #60a5fa;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Method lists */
.method-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 1rem;
}

.method-tag, .property-tag {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-family: 'Courier New', monospace;
}

.property-tag {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

/* Workflow */
.workflow {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin: 2rem 0;
}

.workflow-step {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border-left: 4px solid var(--primary);
}

.step-number {
    background: var(--primary);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

.step-content h4 {
    color: #60a5fa;
    margin-bottom: 0.5rem;
}

/* Code blocks */
.code-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.code-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.code-section h4 {
    color: #60a5fa;
    margin-bottom: 10px;
    padding-left: 10px;
    border-left: 3px solid #60a5fa;
    display: flex;
    align-items: center;
    gap: 10px;
}

.code-description {
    color: #94a3b8;
    margin-bottom: 15px;
    font-style: italic;
    padding-left: 10px;
}

.code-block {
    margin-top: 1rem;
}

.code-block pre {
    font-family: 'Courier New', Consolas, monospace;
    font-size: 0.95rem;
    line-height: 1.5;
    overflow-x: auto;
    padding: 1.5rem;
    background: #0f172a;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
}

/* Syntax highlighting */
.keyword { color: #f472b6; font-weight: bold; }
.class { color: #60a5fa; font-weight: bold; }
.method { color: #34d399; font-weight: bold; }
.string { color: #fbbf24; }
.comment { color: #94a3b8; font-style: italic; }
.number { color: #a78bfa; }

/* Architecture diagram */
.arch-layer {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 10px;
    border-top: 4px solid var(--accent);
}

.arch-layer h4 {
    color: #60a5fa;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.arch-layer ul {
    list-style: none;
    padding-left: 0;
}

.arch-layer li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.arch-layer li:last-child {
    border-bottom: none;
}

/* Buttons */
.copy-button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 2rem;
    transition: background 0.3s ease, transform 0.2s ease;
    font-size: 1rem;
}

.copy-button:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
}

.copy-button:active {
    transform: translateY(0);
}

/* Error messages */
.error-message {
    background: rgba(239, 68, 68, 0.1);
    border-left: 3px solid var(--danger);
    padding: 15px;
    margin: 10px 0;
    color: var(--danger);
    border-radius: 5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Footer */
footer {
    margin-top: 3rem;
    text-align: center;
    padding: 2rem;
    color: #94a3b8;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive */
@media (max-width: 1024px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }
    
    header {
        padding: 2rem 1rem;
    }
    
    .main-content {
        padding: 1.5rem;
    }
    
    .grid-2 {
        grid-template-columns: 1fr;
    }
    
    .workflow-step {
        flex-direction: column;
        gap: 1rem;
    }
}
