/* ============================================================
   FluxOption — Signup Page Styles
   signup.css | Version 2.0
   Design System: Gold & Glass / Dark Mode
   ============================================================ */

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

:root {
    --primary:       #0010F7;
    --primary-light: #3347FF;
    --primary-dim:   rgba(0, 16, 247, 0.12);
    --primary-border:rgba(0, 16, 247, 0.28);
    --secondary:     #1F1F1F;
    
    --gold:          var(--primary);
    --gold-light:    var(--primary-light);
    --gold-dim:      var(--primary-dim);
    --gold-border:   var(--primary-border);
    
    --bg:            #09090D;
    --surface:       #121217;
    --surface-2:     var(--secondary);
    --border:        rgba(255, 255, 255, 0.05);
    --border-hover:  rgba(255, 255, 255, 0.1);
    --text:          #f5f5f7;
    --muted:         #8F929E;
    --muted-2:       #5B5F6E;
    --input-bg:      rgba(255, 255, 255, 0.02);
    --input-border:  rgba(255, 255, 255, 0.08);
    --radius-sm:     8px;
    --radius:        12px;
    --radius-lg:     20px;
    --shadow-glow:   0 0 40px rgba(0, 16, 247, 0.12);
    --transition:    0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

html, body {
    height: 100%;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ── Page Layout ── */
.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 24px 60px;
    position: relative;
    overflow: hidden;
}

/* ── Animated Background Orbs ── */
.orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    animation: orbFadeIn 1.2s ease forwards;
}

.orb-1 {
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(12, 52, 240, 0.18) 0%, transparent 70%);
    top: -200px;
    left: -200px;
    animation-delay: 0s;
    animation: orbFadeIn 1.2s ease forwards, orbDrift1 18s ease-in-out infinite alternate 1.2s;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(17, 74, 67, 0.25) 0%, transparent 70%);
    bottom: -150px;
    right: -100px;
    animation: orbFadeIn 1.2s ease 0.3s forwards, orbDrift2 22s ease-in-out infinite alternate 1.5s;
}

.orb-3 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(12, 52, 240, 0.08) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: orbFadeIn 1.2s ease 0.6s forwards, orbPulse 8s ease-in-out infinite 1.8s;
}

@keyframes orbFadeIn {
    to { opacity: 1; }
}

@keyframes orbDrift1 {
    from { transform: translate(0, 0) scale(1); }
    to   { transform: translate(60px, 40px) scale(1.1); }
}

@keyframes orbDrift2 {
    from { transform: translate(0, 0) scale(1); }
    to   { transform: translate(-40px, -30px) scale(1.08); }
}

@keyframes orbPulse {
    0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
    50%       { opacity: 1;   transform: translate(-50%, -50%) scale(1.15); }
}

/* ── Logo ── */
.logo-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    position: relative;
    z-index: 1;
    margin-bottom: 56px;
    opacity: 0;
    animation: fadeSlideDown 0.7s ease 0.2s forwards;
}

.logo-mark {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: #0b0b0f;
    font-size: 15px;
    letter-spacing: -0.02em;
    flex-shrink: 0;
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-img {
    height: 45px;
    width: auto;
    display: block;
}

.modal-logo-img {
    height: 38px;
    width: auto;
    display: block;
}

/* ── Page Header ── */
.page-header {
    text-align: center;
    position: relative;
    z-index: 1;
    margin-bottom: 48px;
    opacity: 0;
    animation: fadeSlideDown 0.7s ease 0.4s forwards;
}

.page-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 16px;
    border: 1px solid var(--gold-border);
    border-radius: 100px;
    font-size: 11px;
    font-weight: 600;
    color: var(--gold);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: rgba(12, 52, 240, 0.06);
    margin-bottom: 24px;
}

.page-badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--gold);
    flex-shrink: 0;
    animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.5; transform: scale(0.8); }
}

.page-title {
    font-size: clamp(28px, 4.5vw, 52px);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--text);
    margin-bottom: 14px;
}

.page-title em {
    font-style: normal;
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-subtitle {
    font-size: 16px;
    color: var(--muted);
    line-height: 1.6;
    max-width: 420px;
    margin: 0 auto;
}

/* ── Account Type Cards ── */
.account-type-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    width: 100%;
    max-width: 600px;
    position: relative;
    z-index: 1;
    opacity: 0;
    animation: fadeSlideUp 0.7s ease 0.6s forwards;
}

.account-card {
    background: rgba(19, 19, 26, 0.8);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    cursor: pointer;
    transition: border-color var(--transition), transform var(--transition),
                box-shadow var(--transition), background var(--transition);
    text-align: center;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: relative;
    overflow: hidden;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.account-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(12, 52, 240, 0.06) 0%, transparent 60%);
    opacity: 0;
    transition: opacity var(--transition);
}

.account-card:hover {
    border-color: var(--gold-border);
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), var(--shadow-glow);
}

.account-card:hover::before {
    opacity: 1;
}

.account-card:active {
    transform: translateY(-2px) scale(0.98);
}

.card-icon-wrap {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: rgba(12, 52, 240, 0.1);
    border: 1px solid rgba(12, 52, 240, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    transition: background var(--transition), border-color var(--transition);
    position: relative;
    z-index: 1;
}

.account-card:hover .card-icon-wrap {
    background: rgba(12, 52, 240, 0.18);
    border-color: rgba(12, 52, 240, 0.4);
}

.card-icon-wrap svg {
    width: 28px;
    height: 28px;
    color: var(--gold);
}

.card-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
    letter-spacing: -0.01em;
}

.card-desc {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.5;
    position: relative;
    z-index: 1;
}

.card-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--gold);
    position: relative;
    z-index: 1;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity var(--transition), transform var(--transition);
}

.card-arrow svg {
    width: 14px;
    height: 14px;
    transition: transform var(--transition);
}

.account-card:hover .card-arrow {
    opacity: 1;
    transform: translateY(0);
}

.account-card:hover .card-arrow svg {
    transform: translateX(3px);
}

/* ── Sign-in Link ── */
.signin-link {
    text-align: center;
    margin-top: 32px;
    font-size: 14px;
    color: var(--muted);
    position: relative;
    z-index: 1;
    opacity: 0;
    animation: fadeIn 0.7s ease 0.9s forwards;
}

.signin-link a {
    color: var(--gold);
    text-decoration: none;
    font-weight: 500;
    transition: opacity var(--transition);
}

.signin-link a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* ── Modal Overlay ── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: all;
}

/* ── Modal Card ── */
.modal-card {
    width: 100%;
    max-width: 440px;
    background: rgba(16, 16, 22, 0.97);
    border: 1px solid rgba(12, 52, 240, 0.18);
    border-radius: var(--radius-lg);
    padding: 44px 40px;
    position: relative;
    transform: scale(0.88) translateY(24px);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
                opacity 0.35s ease;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.7),
                0 0 0 1px rgba(255, 255, 255, 0.04),
                inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.modal-overlay.open .modal-card {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* ── Modal Header ── */
.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 28px;
}

.modal-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-logo-mark {
    width: 34px;
    height: 34px;
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: #0b0b0f;
    font-size: 13px;
    flex-shrink: 0;
}

.modal-logo-text {
    font-size: 15px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.01em;
}

.modal-close {
    width: 34px;
    height: 34px;
    border: none;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    transition: background var(--transition), color var(--transition);
    flex-shrink: 0;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--text);
}

.modal-close svg {
    width: 16px;
    height: 16px;
}

/* ── Account Type Badge (inside modal) ── */
.account-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 12px;
    background: rgba(12, 52, 240, 0.08);
    border: 1px solid rgba(12, 52, 240, 0.25);
    border-radius: 100px;
    font-size: 11px;
    font-weight: 600;
    color: var(--gold);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.account-type-badge svg {
    width: 12px;
    height: 12px;
}

/* ── Modal Titles ── */
.modal-title {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--text);
    margin-bottom: 6px;
    line-height: 1.2;
}

.modal-subtitle {
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 32px;
    line-height: 1.5;
}

/* ── Referral Notice ── */
.referral-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: rgba(12, 52, 240, 0.06);
    border: 1px solid rgba(12, 52, 240, 0.2);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--gold);
    margin-bottom: 24px;
}

.referral-notice svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

/* ── Form Fields ── */
.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 9px;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted-2);
    display: flex;
    align-items: center;
    pointer-events: none;
    transition: color var(--transition);
}

.input-icon svg {
    width: 16px;
    height: 16px;
}

.form-input {
    width: 100%;
    padding: 13px 44px 13px 42px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: border-color var(--transition), background var(--transition),
                box-shadow var(--transition);
    -webkit-appearance: none;
}

.form-input::placeholder {
    color: var(--muted-2);
}

.form-input:focus {
    border-color: rgba(12, 52, 240, 0.5);
    background: rgba(12, 52, 240, 0.04);
    box-shadow: 0 0 0 3px rgba(12, 52, 240, 0.08);
}

.form-input:focus + .input-icon,
.input-wrapper:focus-within .input-icon {
    color: var(--gold);
}

.form-input.no-icon {
    padding-left: 16px;
}

/* Password toggle */
.password-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--muted-2);
    display: flex;
    align-items: center;
    padding: 2px;
    transition: color var(--transition);
}

.password-toggle:hover {
    color: var(--muted);
}

.password-toggle svg {
    width: 16px;
    height: 16px;
}

/* ── Password Strength ── */
.strength-track {
    height: 3px;
    background: rgba(255, 255, 255, 0.07);
    border-radius: 10px;
    margin-top: 9px;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    border-radius: 10px;
    width: 0;
    transition: width 0.4s ease, background 0.4s ease;
}

.strength-label {
    font-size: 11px;
    color: var(--muted-2);
    margin-top: 5px;
    min-height: 14px;
    transition: color var(--transition);
}

/* ── hCaptcha ── */
.captcha-wrap {
    margin-bottom: 20px;
    transform-origin: left center;
}

/* ── Terms ── */
.terms-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 24px;
    font-size: 13px;
    color: var(--muted);
    line-height: 1.5;
    cursor: pointer;
}

.terms-row input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--gold);
    flex-shrink: 0;
    margin-top: 1px;
    cursor: pointer;
}

.terms-row a {
    color: var(--gold);
    text-decoration: none;
}

.terms-row a:hover {
    text-decoration: underline;
}

/* ── Submit Button ── */
.btn-submit {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
    color: #fcfcfc;
    font-weight: 700;
    font-size: 15px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.01em;
    transition: opacity var(--transition), transform var(--transition),
                box-shadow var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.btn-submit::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 60%);
    opacity: 0;
    transition: opacity var(--transition);
}

.btn-submit:hover:not(:disabled)::after {
    opacity: 1;
}

.btn-submit:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 12px 40px rgba(12, 52, 240, 0.35);
}

.btn-submit:active:not(:disabled) {
    transform: translateY(0);
}

.btn-submit:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

.btn-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ── Modal Footer ── */
.modal-footer-text {
    text-align: center;
    font-size: 13px;
    color: var(--muted);
    margin-top: 20px;
}

.modal-footer-text a {
    color: var(--gold);
    text-decoration: none;
    font-weight: 500;
}

.modal-footer-text a:hover {
    text-decoration: underline;
}

/* ── Field Error ── */
.field-error {
    font-size: 11px;
    color: #ff5555;
    margin-top: 6px;
    display: none;
    animation: fadeIn 0.2s ease;
}

/* ── Shared Animations ── */
@keyframes fadeSlideDown {
    from { opacity: 0; transform: translateY(-16px); }
    to   { opacity: 1; transform: translateY(0); }
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ── Responsive ── */
@media (max-width: 540px) {
    .page-wrapper {
        padding: 32px 16px 48px;
    }

    .logo-link {
        margin-bottom: 40px;
    }

    .account-type-grid {
        grid-template-columns: 1fr;
        gap: 14px;
        max-width: 340px;
    }

    .account-card {
        padding: 24px 20px;
        display: flex;
        align-items: center;
        text-align: left;
        gap: 16px;
    }

    .card-icon-wrap {
        margin: 0;
        flex-shrink: 0;
        width: 52px;
        height: 52px;
    }

    .card-arrow {
        display: none;
    }

    .modal-card {
        padding: 32px 24px;
        border-radius: var(--radius);
    }

    .modal-title {
        font-size: 22px;
    }
}

@media (max-width: 380px) {
    .page-title {
        font-size: 26px;
    }

    .modal-card {
        padding: 28px 18px;
    }
}
