/* ============================================
   AgentHub Tutorials - Professional Design System
   Aesthetic: Editorial Technical / Refined Dark
   ============================================ */

/* CSS Variables - Refined Color Palette */
:root {
    --bg-void: #050507;
    --bg-deep: #0a0a0f;
    --bg-surface: #111118;
    --bg-elevated: #18181f;
    --bg-card: rgba(17, 17, 24, 0.7);
    --text-primary: #f0f0f5;
    --text-secondary: #a0a0b0;
    --text-muted: #606070;
    --text-faint: #404050;
    --accent-primary: #00d4ff;
    --accent-secondary: #7c3aed;
    --accent-tertiary: #10b981;
    --accent-warm: #f59e0b;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-subtle: rgba(255, 255, 255, 0.04);
    --font-display: 'Crimson Pro', Georgia, serif;
    --font-body: 'Source Sans 3', -apple-system, sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;
}

:root[data-theme="light"] {
    --bg-void: #f8fafc;
    --bg-deep: #eef2ff;
    --bg-surface: #ffffff;
    --bg-elevated: #f1f5f9;
    --bg-card: rgba(255, 255, 255, 0.86);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --text-faint: #94a3b8;
    --accent-primary: #2563eb;
    --accent-secondary: #7c3aed;
    --accent-tertiary: #059669;
    --accent-warm: #d97706;
    --border-color: rgba(15, 23, 42, 0.14);
    --border-subtle: rgba(15, 23, 42, 0.08);
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: var(--bg-void);
    color: var(--text-primary);
    line-height: 1.7;
    min-height: 100vh;
    background-image: 
        radial-gradient(ellipse at 20% 0%, rgba(0, 212, 255, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 100%, rgba(124, 58, 237, 0.06) 0%, transparent 50%);
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(5, 5, 7, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
    padding: 0.75rem 0;
}

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

.nav-logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-logo span { color: var(--accent-primary); }

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.nav-links a:hover { color: var(--accent-primary); }

/* Main website-identical top bar */
.site-top-nav {
    padding: 0 !important;
    z-index: 30 !important;
}

.site-top-nav .theme-toggle {
    transition: all 0.3s ease;
}

.site-top-nav .theme-toggle:hover {
    transform: scale(1.1);
}

.site-top-nav .workflow-status-indicator {
    padding: 0.1rem 0.35rem;
    border-radius: 0.25rem;
    font-size: 0.72rem;
}

.site-top-nav .workflow-status-indicator.status-online i {
    color: #34d399 !important;
}

.site-top-nav .workflow-status-indicator.status-offline i {
    color: #f87171 !important;
}

.site-top-nav .workflow-status-indicator.status-warning i {
    color: #fde047 !important;
}

/* Multi-link top bar alignment with main website nav */
.nav-content {
    gap: 1rem;
}

.nav-links {
    flex-wrap: wrap;
    justify-content: center;
    row-gap: 0.45rem;
}

.nav-links a {
    font-size: 0.9rem;
}


/* Language Toggle */
.lang-toggle {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.4rem 0.6rem;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.2s;
}

.lang-toggle:hover {
    border-color: var(--accent-primary);
    background: rgba(0, 212, 255, 0.1);
}

/* Hero Section */
.hero {
    padding: 8rem 2rem 4rem;
    text-align: center;
    background: linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-void) 100%);
}

.hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 600;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Section */
.section {
    margin-bottom: 4rem;
}

.section-title {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
}

/* Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    display: block;
}

.card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 212, 255, 0.15);
}

.card-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.card h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Badges */
.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.badge {
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.badge-primary {
    background: rgba(0, 212, 255, 0.15);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

/* Code Blocks */
pre, code {
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

pre {
    background: var(--bg-deep);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.25rem;
    overflow-x: auto;
    margin: 1.5rem 0;
}

code {
    background: var(--bg-elevated);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

pre code {
    background: transparent;
    padding: 0;
}

/* Tip/Warning Boxes */
.tip, .warning {
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    border-left: 4px solid;
}

.tip {
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--accent-tertiary);
}

.warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: var(--accent-warm);
}

/* Screenshots Grid */
.screenshots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.screenshot-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

.screenshot-item img {
    width: 100%;
    height: auto;
    display: block;
}

.screenshot-item p {
    padding: 1rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
}

/* Page Navigation */
.page-nav {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.page-nav a {
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem 1.5rem;
    text-decoration: none;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.page-nav a:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

/* Footer */
footer {
    text-align: center;
    padding: 3rem 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-content { padding: 0 1rem; }
    .nav-links { gap: 1rem; }
    .nav-content {
        flex-wrap: wrap;
    }
    .nav-links {
        width: 100%;
        order: 3;
        overflow-x: auto;
        white-space: nowrap;
        flex-wrap: nowrap;
        justify-content: flex-start;
        padding-bottom: 0.25rem;
    }
    .nav-links::-webkit-scrollbar {
        height: 4px;
    }
    .nav-links::-webkit-scrollbar-thumb {
        background: var(--border-color);
        border-radius: 999px;
    }

    .hero { padding: 6rem 1rem 3rem; }
    .container { padding: 1rem; }
    .cards-grid { grid-template-columns: 1fr; }
    .screenshots-grid { grid-template-columns: 1fr; }
    .page-nav { flex-direction: column; }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.card { animation: fadeIn 0.5s ease forwards; }
.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.15s; }
.card:nth-child(3) { animation-delay: 0.2s; }
.card:nth-child(4) { animation-delay: 0.25s; }

/* Beginner walkthrough blocks (shared across tutorial pages) */
.beginner-guide {
    background: linear-gradient(145deg, rgba(0, 212, 255, 0.08), rgba(124, 58, 237, 0.08));
    border: 1px solid rgba(0, 212, 255, 0.25);
    border-radius: 14px;
    padding: 1.5rem;
}

.guide-header {
    margin-bottom: 1.25rem;
}

.guide-badge {
    display: inline-block;
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent-primary);
    background: rgba(0, 212, 255, 0.14);
    border: 1px solid rgba(0, 212, 255, 0.25);
    border-radius: 999px;
    padding: 0.25rem 0.7rem;
    margin-bottom: 0.9rem;
}

.beginner-guide .section-title {
    margin-bottom: 0.6rem;
}

.guide-intro {
    color: var(--text-secondary);
    font-size: 1rem;
}

.guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.guide-card {
    background: rgba(17, 17, 24, 0.82);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem;
}

.guide-card h3 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.guide-list {
    margin: 0;
    padding-left: 1.1rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.guide-list li {
    margin-bottom: 0.45rem;
    line-height: 1.5;
}

.guide-list-numbered {
    list-style: none;
    padding-left: 0;
    counter-reset: guide-step;
}

.guide-list-numbered li {
    counter-increment: guide-step;
    position: relative;
    padding-left: 2rem;
    min-height: 1.5rem;
}

.guide-list-numbered li::before {
    content: counter(guide-step);
    position: absolute;
    left: 0;
    top: 0.05rem;
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 50%;
    background: rgba(0, 212, 255, 0.2);
    border: 1px solid rgba(0, 212, 255, 0.4);
    color: var(--accent-primary);
    font-weight: 600;
    font-size: 0.78rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.guide-check-list {
    list-style: none;
    padding-left: 0;
}

.guide-check-list li {
    position: relative;
    padding-left: 2.2rem;
}

.guide-check-list li::before {
    content: "[OK]";
    position: absolute;
    left: 0;
    top: 0.05rem;
    color: var(--accent-tertiary);
    font-size: 0.78rem;
    font-family: var(--font-mono);
}

.guide-next {
    margin-top: 1rem;
    color: var(--accent-primary);
    font-size: 0.92rem;
}
