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

html, body { height: 100%; }

body {
    background: #0a0a0a;
    color: #fff;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 32px 20px 48px;
    background-image: radial-gradient(ellipse 70% 50% at 50% 20%, #141414 0%, #0a0a0a 100%);
}

.hidden { display: none !important; }

.auth-page {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    animation: fadeUp 0.35s ease both;
}

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

/* ── Brand ── */
.auth-brand { text-align: center; }

.brand-wordmark {
    font-size: 36px;
    font-weight: 900;
    letter-spacing: 12px;
    color: #fff;
    line-height: 1;
    text-indent: 12px;
}

/* ── Step indicator ── */
.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.step-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: #222;
    border: 1.5px solid #333;
    transition: background 0.3s, border-color 0.3s, transform 0.3s;
    flex-shrink: 0;
}
.step-dot.active {
    background: #fff;
    border-color: #fff;
    transform: scale(1.2);
}
.step-dot.done {
    background: #444;
    border-color: #555;
}

.step-line {
    width: 48px; height: 1px;
    background: #222;
    transition: background 0.3s;
    flex-shrink: 0;
}
.step-line.done { background: #444; }

/* ── Card ── */
.auth-card {
    background: #111;
    border: 1px solid #1c1c1c;
    border-radius: 20px;
    padding: 26px 22px 22px;
    box-shadow: 0 24px 80px rgba(0,0,0,0.5);
    animation: fadeUp 0.3s ease both;
}

.step-title {
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 4px;
}
.step-sub {
    font-size: 13px;
    color: #444;
    margin-bottom: 22px;
}

/* ── Inputs ── */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 18px;
}

.input-group label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #555;
    display: flex;
    align-items: center;
    gap: 6px;
}

.optional-tag {
    font-size: 10px;
    font-weight: 500;
    text-transform: none;
    color: #333;
    letter-spacing: 0;
}

.input-group input,
.input-group textarea,
.input-group select {
    background: transparent;
    border: none;
    border-bottom: 1px solid #252525;
    padding: 10px 0;
    color: #fff;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
    font-family: inherit;
    width: 100%;
}

.input-group input::placeholder,
.input-group textarea::placeholder { color: #333; }
.input-group input:focus,
.input-group textarea:focus,
.input-group select:focus { border-bottom-color: #555; }

.input-group textarea {
    resize: none;
    line-height: 1.5;
}

.input-group select {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23555' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 2px center;
    padding-right: 20px;
    color: #fff;
}

.input-group select option,
.input-group select optgroup {
    background: #161616;
    color: #fff;
}

/* @username prefix */
.input-prefix-wrap {
    display: flex;
    align-items: center;
    border-bottom: 1px solid #252525;
    transition: border-color 0.2s;
}
.input-prefix-wrap:focus-within { border-bottom-color: #555; }
.input-prefix-wrap .input-prefix {
    color: #555;
    font-size: 15px;
    padding: 10px 0;
    flex-shrink: 0;
    user-select: none;
}
.input-prefix-wrap input {
    border: none !important;
    padding-left: 2px;
}
.input-hint {
    font-size: 11px;
    color: #333;
    margin-top: 2px;
}

/* ── Buttons ── */
.auth-btn {
    width: 100%;
    padding: 13px;
    background: #fff;
    color: #000;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    font-family: inherit;
    margin-top: 4px;
}
.auth-btn:hover  { background: #e8e8e8; }
.auth-btn:active { transform: scale(0.98); }
.auth-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

.auth-btn-ghost {
    background: none;
    border: 1px solid #222;
    border-radius: 12px;
    padding: 11px 18px;
    color: #555;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    font-family: inherit;
}
.auth-btn-ghost:hover { border-color: #333; color: #888; }

.btn-row {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}
.btn-row .auth-btn-ghost { flex-shrink: 0; }
.btn-row .auth-btn { flex: 1; margin-top: 0; }

.skip-btn {
    width: 100%;
    margin-top: 8px;
    text-align: center;
}

/* ── Message ── */
.auth-msg {
    text-align: center;
    font-size: 13px;
    min-height: 18px;
    color: #e05050;
    margin-bottom: 4px;
}
.auth-msg.ok { color: #4ade80; }

/* ── Avatar picker ── */
.avatar-picker {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    cursor: pointer;
}

.avatar-preview {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: #1a1a1a;
    border: 2px solid #252525;
    position: relative;
    overflow: hidden;
    transition: border-color 0.2s;
}
.avatar-picker:hover .avatar-preview { border-color: #444; }

.avatar-preview img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: none;
}
.avatar-preview img.has-image { display: block; }

.avatar-placeholder {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    color: #333;
}
.avatar-placeholder.hidden { display: none; }

.avatar-overlay {
    position: absolute; inset: 0;
    background: rgba(0,0,0,0.45);
    display: flex; align-items: center; justify-content: center;
    color: #fff; opacity: 0;
    transition: opacity 0.2s;
    border-radius: 50%;
}
.avatar-picker:hover .avatar-overlay { opacity: 1; }

.avatar-label { font-size: 12px; color: #444; }

/* ── Banner picker ── */
.banner-picker {
    margin-bottom: 18px;
    cursor: pointer;
}

.banner-preview {
    width: 100%;
    height: 90px;
    border-radius: 12px;
    background: #1a1a1a;
    border: 1px solid #252525;
    position: relative;
    overflow: hidden;
    transition: border-color 0.2s;
}
.banner-picker:hover .banner-preview { border-color: #444; }

.banner-preview img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: none;
}
.banner-preview img.has-image { display: block; }

.banner-placeholder {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    gap: 8px; color: #333; font-size: 13px;
}
.banner-placeholder.hidden { display: none; }

.banner-overlay {
    position: absolute; inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex; align-items: center; justify-content: center;
    color: #fff; opacity: 0;
    transition: opacity 0.2s;
}
.banner-picker:hover .banner-overlay { opacity: 1; }

/* ── Switch ── */
.auth-switch {
    text-align: center;
    font-size: 13px;
    color: #444;
    padding-top: 4px;
}
.auth-switch a { color: #fff; font-weight: 600; text-decoration: none; }
.auth-switch a:hover { text-decoration: underline; }
