/* ============================================================
   Metatron Agent — Onboarding Wizard
   Design: matches mojslavko.online (dark glass morphism)
   ============================================================ */

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

:root {
    --bg: #0a1628;
    --surface: rgba(255, 255, 255, 0.04);
    --glass: rgba(255, 255, 255, 0.06);
    --border: rgba(255, 255, 255, 0.08);
    --teal: #0AC8B9;
    --teal-dim: rgba(10, 200, 185, 0.15);
    --gold: #d4a853;
    --text: #e2e8f0;
    --muted: #8899a6;
    --error: #e74c3c;
    --success: #2ecc71;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Animated background gradient — same as landing */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(10, 200, 185, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(212, 168, 83, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(10, 200, 185, 0.04) 0%, transparent 50%);
    animation: drift 20s ease-in-out infinite alternate;
    z-index: 0;
    pointer-events: none;
}

@keyframes drift {
    0%   { transform: scale(1) translate(0, 0); }
    50%  { transform: scale(1.05) translate(-2%, 1%); }
    100% { transform: scale(1) translate(1%, -1%); }
}

.container {
    max-width: 640px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

/* ---- NAV ---- */
nav {
    padding: 24px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--teal);
}

.logo span {
    color: var(--gold);
}

nav a {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
}

nav a:hover {
    color: var(--text);
}

/* ---- STEP INDICATOR ---- */
.steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 40px 0 32px;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0.35;
    transition: opacity 0.4s ease;
}

.step.active {
    opacity: 1;
}

.step-num {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
    border: 2px solid var(--border);
    color: var(--muted);
    background: var(--surface);
    transition: all 0.4s ease;
}

.step.active .step-num {
    border-color: var(--teal);
    color: var(--bg);
    background: var(--teal);
    box-shadow: 0 0 20px rgba(10, 200, 185, 0.3);
}

.step-label {
    font-size: 0.75rem;
    color: var(--muted);
    letter-spacing: 0.5px;
    transition: color 0.4s ease;
}

.step.active .step-label {
    color: var(--text);
}

.step-line {
    width: 60px;
    height: 2px;
    background: var(--border);
    margin: 0 12px;
    margin-bottom: 24px;
    transition: background 0.4s ease;
}

.step-line.active {
    background: var(--teal);
}

/* ---- PANELS (glass cards) ---- */
.panel {
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 40px 36px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    animation: fadeIn 0.4s ease;
}

.panel.hidden {
    display: none;
}

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

.panel h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--text) 0%, var(--teal) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.panel-desc {
    font-size: 0.9rem;
    color: var(--muted);
    margin-bottom: 28px;
    line-height: 1.5;
}

/* ---- FORM ---- */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 8px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(10, 200, 185, 0.12);
}

.form-group input::placeholder {
    color: rgba(136, 153, 166, 0.5);
}

.form-group select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%238899a6' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
    cursor: pointer;
}

.form-group select option {
    background: #0e1d33;
    color: var(--text);
}

.token-input {
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
    font-size: 0.88rem !important;
    letter-spacing: 0.3px;
}

/* ---- BUTTONS ---- */
.btn-primary {
    display: inline-block;
    padding: 14px 32px;
    background: linear-gradient(135deg, var(--teal), #08a89b);
    color: var(--bg);
    font-size: 0.95rem;
    font-weight: 700;
    font-family: inherit;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 24px rgba(10, 200, 185, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(10, 200, 185, 0.35);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    display: inline-block;
    padding: 14px 24px;
    background: var(--surface);
    color: var(--muted);
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.btn-secondary:hover {
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.06);
}

.btn-row {
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-top: 8px;
}

/* ---- STATUS MESSAGES ---- */
.status {
    min-height: 20px;
    margin: 12px 0;
    font-size: 0.85rem;
    line-height: 1.5;
    transition: opacity 0.3s;
}

.status:empty {
    display: none;
}

.status.error {
    color: var(--error);
}

.status.success {
    color: var(--success);
}

.status.loading {
    color: var(--gold);
}

/* ---- GUIDE STEPS (step 2) ---- */
.guide {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 28px;
}

.guide-step {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.guide-step .num {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--gold);
    border: 1.5px solid rgba(212, 168, 83, 0.3);
    background: rgba(212, 168, 83, 0.08);
}

.guide-step p {
    font-size: 0.9rem;
    color: var(--muted);
    line-height: 1.5;
    padding-top: 3px;
}

.guide-step strong {
    color: var(--teal);
}

.guide-step code {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(10, 200, 185, 0.1);
    border: 1px solid rgba(10, 200, 185, 0.2);
    border-radius: 6px;
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 0.85rem;
    color: var(--teal);
}

/* ---- SUCCESS CARD (step 3) ---- */
.success-card {
    background: rgba(10, 200, 185, 0.06);
    border: 1px solid rgba(10, 200, 185, 0.15);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 28px;
}

.bot-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.bot-avatar {
    flex-shrink: 0;
}

.bot-info strong {
    display: block;
    font-size: 1.05rem;
    color: var(--teal);
    margin-bottom: 4px;
}

.bot-status {
    font-size: 0.85rem;
    color: var(--muted);
}

/* ---- TEST AREA (step 3) ---- */
.test-area {
    margin-bottom: 28px;
}

.test-area > p {
    font-size: 0.9rem;
    color: var(--muted);
    margin-bottom: 12px;
}

.example-msg {
    background: rgba(212, 168, 83, 0.06);
    border: 1px solid rgba(212, 168, 83, 0.15);
    border-left: 3px solid var(--gold);
    border-radius: 0 12px 12px 0;
    padding: 16px 20px;
    font-size: 0.95rem;
    color: var(--text);
    font-style: italic;
    margin-bottom: 12px;
    line-height: 1.5;
}

.example-msg span {
    color: var(--gold);
    font-weight: 600;
}

.hint {
    font-size: 0.8rem;
    color: var(--muted);
    opacity: 0.7;
}

/* ---- FOOTER ---- */
footer {
    text-align: center;
    padding: 40px 0;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.8rem;
    margin-top: 48px;
}

footer span {
    color: var(--gold);
}

/* ---- SPINNER ---- */
@keyframes spin {
    to { transform: rotate(360deg); }
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(10, 200, 185, 0.2);
    border-top-color: var(--teal);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 600px) {
    .container {
        padding: 0 16px;
    }

    .steps {
        padding: 28px 0 24px;
    }

    .step-line {
        width: 32px;
        margin: 0 6px;
        margin-bottom: 24px;
    }

    .step-label {
        font-size: 0.65rem;
    }

    .panel {
        padding: 28px 20px;
        border-radius: 16px;
    }

    .panel h2 {
        font-size: 1.25rem;
    }

    .btn-row {
        flex-direction: column;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        text-align: center;
    }

    .guide-step {
        gap: 10px;
    }
}

@media (max-width: 360px) {
    .step-label {
        display: none;
    }

    .step-line {
        width: 24px;
    }
}
