/* =============================================
   register.css — Dark theme registration form
   Consistent with landing1.html aesthetic
   ============================================= */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #0a1628;
    color: #e2e8f0;
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: #46D6FF;
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: #2ECC71;
}

/* === Nav === */
.reg-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    background: rgba(10, 22, 40, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.reg-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    color: #e2e8f0;
    text-decoration: none;
}

.reg-brand-badge {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #46D6FF, #2ECC71);
    position: relative;
}

.reg-pulse-ring {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid rgba(46, 204, 113, 0.4);
    animation: regPulse 2.8s ease-out infinite;
}

@keyframes regPulse {
    0%   { opacity: .8; transform: scale(1); }
    60%  { opacity: 0;  transform: scale(1.5); }
    100% { opacity: 0;  transform: scale(1.5); }
}

.reg-brand-text {
    font-weight: 300;
    color: rgba(255, 255, 255, 0.6);
}

.reg-brand-text strong {
    font-weight: 800;
    background: linear-gradient(135deg, #46D6FF, #2ECC71);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.reg-nav-back {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s;
}

.reg-nav-back:hover {
    color: #46D6FF;
}

/* === Main Layout === */
.reg-main {
    padding: 80px 20px 40px;
    display: flex;
    justify-content: center;
    min-height: 100vh;
}

.reg-container {
    max-width: 520px;
    width: 100%;
}

/* === Header === */
.reg-header {
    text-align: center;
    margin-bottom: 32px;
}

.reg-header h1 {
    font-size: clamp(24px, 5vw, 32px);
    font-weight: 800;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #ffffff 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.reg-header p {
    color: #94a3b8;
    font-size: 15px;
}

/* === Stepper === */
.reg-stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 36px;
}

.reg-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    opacity: 0.4;
    transition: opacity 0.4s, transform 0.3s;
}

.reg-step.active {
    opacity: 1;
}

.reg-step.completed .reg-step-number {
    background: #2ECC71;
}

.reg-step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.15);
    transition: all 0.4s;
}

.reg-step.active .reg-step-number {
    background: linear-gradient(135deg, #46D6FF, #2ECC71);
    color: #0a1628;
    border-color: transparent;
}

.reg-step span {
    font-size: 12px;
    font-weight: 600;
    color: #94a3b8;
}

.reg-step-line {
    width: 60px;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 12px;
    margin-bottom: 22px;
    transition: background 0.4s;
}

.reg-step-line.active {
    background: linear-gradient(90deg, #46D6FF, #2ECC71);
}

/* === Panels === */
.reg-panel {
    display: none;
    animation: fadeUp 0.4s ease;
}

.reg-panel.active {
    display: block;
}

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

/* === Fields === */
.reg-field {
    margin-bottom: 20px;
}

.reg-field label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #cbd5e1;
    margin-bottom: 8px;
}

.reg-field label i {
    color: #46D6FF;
    font-size: 13px;
}

.reg-token-wrap {
    position: relative;
}

.reg-token-wrap textarea,
.reg-field input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #e2e8f0;
    font-size: 14px;
    font-family: 'SFMono-Regular', Consolas, monospace;
    resize: none;
    transition: border-color 0.3s, box-shadow 0.3s;
    outline: none;
}

.reg-field input {
    font-family: inherit;
}

.reg-token-wrap textarea:focus,
.reg-field input:focus {
    border-color: #46D6FF;
    box-shadow: 0 0 0 3px rgba(70, 214, 255, 0.1);
}

.reg-paste-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(70, 214, 255, 0.15);
    border: none;
    color: #46D6FF;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    display: grid;
    place-items: center;
    transition: background 0.2s;
}

.reg-paste-btn:hover {
    background: rgba(70, 214, 255, 0.25);
}

/* === Token status === */
.reg-token-status {
    margin-top: 8px;
    min-height: 20px;
    font-size: 13px;
}

.status-ok {
    color: #2ECC71;
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-error {
    color: #ef4444;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.status-error a {
    color: #46D6FF;
}

.status-loading {
    color: #46D6FF;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* === Hint === */
.reg-hint {
    margin-top: 12px;
    font-size: 13px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* === Buttons === */
.reg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
    margin-top: 8px;
}

.reg-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.reg-btn-primary {
    background: linear-gradient(135deg, #46D6FF, #2ECC71);
    color: #0a1628;
    box-shadow: 0 4px 20px rgba(46, 204, 113, 0.3);
}

.reg-btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 28px rgba(46, 204, 113, 0.45);
}

.reg-btn-ghost {
    background: rgba(255, 255, 255, 0.06);
    color: #94a3b8;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.reg-btn-ghost:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
}

.reg-buttons {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}

.reg-buttons .reg-btn {
    flex: 1;
}

/* === Password === */
.reg-pass-wrap {
    position: relative;
}

.reg-pass-wrap input {
    width: 100%;
    padding-right: 48px;
}

.reg-eye-btn {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
}

.reg-pass-strength,
.reg-match-status {
    margin-top: 6px;
    font-size: 13px;
    min-height: 18px;
}

/* === MP Info Card === */
.reg-mp-info {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: rgba(46, 204, 113, 0.08);
    border: 1px solid rgba(46, 204, 113, 0.2);
    border-radius: 12px;
    margin-bottom: 24px;
}

.reg-mp-check {
    font-size: 28px;
    color: #2ECC71;
    flex-shrink: 0;
}

.reg-mp-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.reg-mp-details strong {
    font-size: 15px;
    color: #e2e8f0;
}

.reg-mp-details span {
    font-size: 13px;
    color: #94a3b8;
}

.reg-mp-details code {
    font-size: 12px;
    color: #64748b;
    font-family: 'SFMono-Regular', Consolas, monospace;
}

/* === Success Panel === */
.reg-success {
    text-align: center;
    padding: 20px 0;
}

.reg-success-icon {
    position: relative;
    display: inline-block;
    margin-bottom: 20px;
}

.reg-success-pulse {
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 2px solid rgba(46, 204, 113, 0.4);
    animation: regPulse 2s ease-out infinite;
}

.reg-success h2 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #46D6FF, #2ECC71);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.reg-success p {
    color: #94a3b8;
    margin-bottom: 8px;
}

.reg-credentials-box {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.reg-credential {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.reg-credential-label {
    font-size: 13px;
    color: #64748b;
    font-weight: 600;
}

.reg-credential code {
    font-size: 14px;
    color: #46D6FF;
    background: rgba(70, 214, 255, 0.1);
    padding: 4px 10px;
    border-radius: 6px;
    font-family: 'SFMono-Regular', Consolas, monospace;
}

.reg-success-note {
    font-size: 13px;
    color: #64748b;
    margin: 16px 0;
}

.reg-success .reg-btn {
    max-width: 280px;
    margin: 0 auto;
    text-decoration: none;
}

/* === Security Note === */
.reg-security {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    margin-top: 32px;
    font-size: 12px;
    color: #64748b;
    line-height: 1.5;
}

.reg-security i {
    color: #2ECC71;
    font-size: 14px;
    margin-top: 1px;
    flex-shrink: 0;
}

/* === Responsive === */
@media (max-width: 640px) {
    .reg-main {
        padding: 70px 16px 32px;
    }

    .reg-container {
        max-width: 100%;
    }

    .reg-header h1 {
        font-size: 24px;
    }

    .reg-step-line {
        width: 40px;
        margin: 0 8px;
    }

    .reg-step span {
        font-size: 11px;
    }

    .reg-btn {
        padding: 12px 20px;
        font-size: 14px;
    }

    .reg-buttons {
        flex-direction: column-reverse;
    }

    .reg-nav {
        padding: 10px 16px;
    }

    .reg-brand-text {
        font-size: 14px;
    }

    .reg-mp-info {
        flex-direction: column;
        text-align: center;
    }

    .reg-credential {
        flex-direction: column;
        gap: 4px;
        text-align: center;
    }
}

/* Smartwatch-friendly: very small screens */
@media (max-width: 320px) {
    .reg-header h1 {
        font-size: 20px;
    }

    .reg-stepper {
        transform: scale(0.85);
    }

    .reg-token-wrap textarea {
        font-size: 12px;
        padding: 10px 12px;
    }

    .reg-btn {
        padding: 10px 16px;
        font-size: 13px;
    }
}

/* Tablet landscape */
@media (min-width: 768px) {
    .reg-main {
        padding-top: 100px;
        align-items: flex-start;
    }

    .reg-container {
        background: rgba(255, 255, 255, 0.02);
        border: 1px solid rgba(255, 255, 255, 0.06);
        border-radius: 20px;
        padding: 40px;
    }
}
