/* ============================================
   PREMIUM DESIGN SYSTEM — Microservice Patterns
   ============================================ */

/* --- Base & Typography --- */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #0a0a0f;
    color: #e0e0e0;
    min-height: 100vh;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(168, 85, 247, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(16, 185, 129, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* --- Hero Section --- */
.hero-section {
    position: relative;
    padding: 30px 0 0;
    background: linear-gradient(180deg, rgba(59,130,246,0.08) 0%, transparent 100%);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.back-link {
    display: inline-block;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.back-link:hover {
    color: #e2e8f0;
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.1);
}

.pattern-icon-large {
    font-size: 4rem;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 30px rgba(59,130,246,0.3));
    animation: floatIcon 3s ease-in-out infinite;
}

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

.gradient-text {
    background: linear-gradient(135deg, #60a5fa, #a78bfa, #34d399);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -1px;
}

.fw-800 { font-weight: 800; }

.lead-custom {
    font-size: 1.2rem;
    color: #94a3b8;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

/* --- Glass Card --- */
.glass-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 32px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* --- Info Cards --- */
.info-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 28px;
    height: 100%;
    transition: all 0.3s ease;
}

.info-card:hover {
    transform: translateY(-4px);
    border-color: rgba(96, 165, 250, 0.3);
    box-shadow: 0 12px 40px rgba(59, 130, 246, 0.1);
}

.info-card-icon {
    font-size: 2rem;
    margin-bottom: 16px;
    display: block;
}

.text-light-muted { color: #94a3b8 !important; }

/* --- Section Badges --- */
.section-badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.25);
}

.badge-green {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border-color: rgba(16, 185, 129, 0.25);
}

.badge-orange {
    background: rgba(251, 146, 60, 0.15);
    color: #fb923c;
    border-color: rgba(251, 146, 60, 0.25);
}

/* --- Step Header --- */
.step-header {
    padding: 20px 24px;
    background: rgba(255,255,255,0.02);
    border-radius: 12px;
    border-left: 3px solid #60a5fa;
}

.text-accent { color: #60a5fa !important; }
.text-success-custom { color: #34d399 !important; }
.text-danger-custom { color: #f87171 !important; }

/* --- Visualization Area --- */
.viz-area {
    padding: 40px 20px;
    background: rgba(0,0,0,0.2);
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.05);
    margin-bottom: 24px;
    min-height: 200px;
}

.viz-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.viz-node-active { transform: scale(1.1); }

.viz-node-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    transition: all 0.4s ease;
}

.viz-node-active .viz-node-icon {
    box-shadow: 0 0 30px rgba(96, 165, 250, 0.4);
    transform: scale(1.05);
}

.viz-node-sm .viz-node-icon {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
    border-radius: 16px;
}

.viz-node-label {
    margin-top: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #cbd5e1;
}

.client-gradient { background: linear-gradient(135deg, #1e3a5f, #2563eb); }
.gateway-gradient { background: linear-gradient(135deg, #1e3a5f, #0891b2); }
.service-gradient-1 { background: linear-gradient(135deg, #064e3b, #059669); }
.service-gradient-2 { background: linear-gradient(135deg, #78350f, #d97706); }

/* --- Flow Messages --- */
.flow-msg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}

.flow-right { animation: flowRight 2s ease-in-out infinite; }
.flow-left { animation: flowLeft 2s ease-in-out infinite; }
.flow-right-up { top: 30%; animation: flowRight 2s ease-in-out infinite; }
.flow-left-down { top: 70%; animation: flowLeft 2s ease-in-out infinite; }

@keyframes flowRight {
    0%, 100% { transform: translate(-55%, -50%); }
    50% { transform: translate(-45%, -50%); }
}

@keyframes flowLeft {
    0%, 100% { transform: translate(-45%, -50%); }
    50% { transform: translate(-55%, -50%); }
}

.flow-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #60a5fa;
    box-shadow: 0 0 10px #60a5fa;
}

.flow-dot.success {
    background: #34d399;
    box-shadow: 0 0 10px #34d399;
}

/* --- Step Navigation --- */
.step-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0 0;
}

.btn-step {
    padding: 10px 24px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.05);
    color: #cbd5e1;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
}

.btn-step:hover:not(:disabled) {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.2);
    color: white;
}

.btn-step:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.btn-step-primary {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    border-color: transparent;
    color: white;
}

.btn-step-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
}

.step-dots {
    display: flex;
    gap: 8px;
}

.step-dot-new {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    cursor: pointer;
    transition: all 0.3s ease;
}

.step-dot-new.active {
    background: #60a5fa;
    box-shadow: 0 0 12px rgba(96, 165, 250, 0.5);
    transform: scale(1.3);
}

.step-dot-new.completed {
    background: #34d399;
}

/* --- Concept Items --- */
.concept-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 16px;
    border-radius: 12px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.05);
    transition: all 0.3s ease;
}

.concept-item:hover {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.1);
}

.concept-num {
    font-size: 1.5rem;
    font-weight: 800;
    color: rgba(96, 165, 250, 0.3);
    min-width: 40px;
    font-family: 'JetBrains Mono', monospace;
}

/* --- Code Block --- */
.code-block {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.08);
    background: #0d1117;
}

.code-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(255,255,255,0.05);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.code-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.code-dot.red { background: #ff5f57; }
.code-dot.yellow { background: #febc2e; }
.code-dot.green { background: #28c840; }

.code-filename {
    margin-left: 10px;
    font-size: 0.8rem;
    color: #8b949e;
    font-family: 'JetBrains Mono', monospace;
}

.code-content {
    padding: 20px;
    margin: 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.82rem;
    line-height: 1.7;
    color: #c9d1d9;
    overflow-x: auto;
    background: transparent;
    border: none;
}

.code-keyword { color: #ff7b72; }
.code-class { color: #ffa657; }
.code-method { color: #d2a8ff; }
.code-string { color: #a5d6ff; }
.code-number { color: #79c0ff; }
.code-comment { color: #8b949e; font-style: italic; }

code { background: rgba(110,118,129,0.15); padding: 2px 6px; border-radius: 4px; font-size: 0.8rem; color: #c9d1d9; }

/* --- Pros & Cons --- */
.pros-cons-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pros-cons-list li {
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    font-size: 0.9rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
}

.pros-cons-list li::before {
    content: '✓';
    color: #34d399;
    font-weight: 700;
    margin-right: 12px;
    font-size: 0.85rem;
}

.pros-cons-list.danger li::before {
    content: '✗';
    color: #f87171;
}

.pros-cons-list li:last-child { border-bottom: none; }

/* --- Transitions --- */
.slide-fade-enter-active { transition: all 0.4s ease; }
.slide-fade-leave-active { transition: all 0.3s ease; }
.slide-fade-enter-from { opacity: 0; transform: translate(-50%, -50%) translateX(-20px); }
.slide-fade-leave-to { opacity: 0; transform: translate(-50%, -50%) translateX(20px); }

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }
