/* Register qismi uchun CSS kodlari */

/* styles/main.css */

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

:root {
    --ink: #f2eee6;
    --cream: #111216;
    --gold: #c9a84c;
    --gold-light: #e8c97a;
    --rust: #e17870;
    --muted: #a3a09a;
    --border: rgba(226, 195, 125, 0.24);
    --white: #1b1c20;
}

body {
    min-height: 100vh;
    background: var(--cream);
    color: var(--ink);
    font-family: 'DM Sans', sans-serif;
    display: flex;
    align-items: stretch;
    overflow-x: hidden;
    isolation: isolate;
}

body::before {
    content: '';
    position: fixed;
    inset: -12%;
    z-index: -1;
    pointer-events: none;
    background:
        repeating-linear-gradient(128deg, transparent 0 76px, rgba(255,255,255,0.018) 77px, transparent 78px),
        repeating-linear-gradient(38deg, transparent 0 112px, rgba(201,168,76,0.035) 113px, transparent 114px),
        radial-gradient(ellipse at 18% 18%, rgba(201,168,76,0.12), transparent 34%),
        radial-gradient(ellipse at 83% 76%, rgba(86,111,119,0.1), transparent 36%),
        linear-gradient(135deg, #0a0b0e 0%, #17181c 52%, #0c0d10 100%);
    background-size: 100% 100%, 100% 100%, 140% 140%, 150% 150%, 100% 100%;
    animation: ambientDrift 28s ease-in-out infinite alternate;
}

@keyframes ambientDrift {
    from { background-position: 0 0, 0 0, 0% 0%, 100% 100%, 0 0; }
    to { background-position: 0 0, 0 0, 100% 35%, 20% 0%, 0 0; }
}


/* LEFT PANEL */
.left-panel {
    width: 42%;
    background: var(--ink);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 60px 50px;
    overflow: hidden;
    flex-shrink: 0;

    /* 🔥 QO‘SHILDI */
    background-image: url('https://images.unsplash.com/photo-1522202176988-66273c2fd55f');
    background-size: cover;
    background-position: center;
}

.left-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(13,13,13,0.6); /* qoraroq overlay */
    z-index: 0;
}

.left-panel::after {
    content: '';
    position: absolute;
    bottom: -60px; right: -60px;
    width: 320px; height: 320px;
    border: 1px solid rgba(201,168,76,0.15);
    border-radius: 50%;
    pointer-events: none;
}

.brand {
    position: relative;
    z-index: 1;
    animation: fadeUp 0.8s ease both;
}

.brand-mark {
    width: 48px; height: 48px;
    border: 2px solid var(--gold);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 18px;
    transform: rotate(45deg);
}

.brand-mark span {
    transform: rotate(-45deg);
    color: var(--gold);
    font-family: 'Playfair Display', serif;
    font-size: 22px;
    font-weight: 900;
}

.brand-name {
    font-family: 'Playfair Display', serif;
    color: var(--white);
    font-size: 28px;
    letter-spacing: 0.04em;
}

.brand-tagline {
    color: var(--gold);
    font-size: 12px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-top: 4px;
}

.left-headline {
    position: relative;
    z-index: 1;
    animation: fadeUp 0.9s 0.1s ease both;
}

.left-headline h1 {
    font-family: 'Playfair Display', serif;
    color: var(--white);
    font-size: clamp(40px, 4vw, 62px);
    line-height: 1.08;
    font-weight: 900;
    margin-bottom: 20px;
}

.left-headline h1 em {
    color: var(--gold);
    font-style: italic;
}

.left-headline p {
    color: rgba(255,255,255,0.48);
    font-size: 15px;
    line-height: 1.7;
    max-width: 300px;
}

.features {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 14px;
    animation: fadeUp 1s 0.2s ease both;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 14px;
}

.feature-dot {
    width: 7px; height: 7px;
    background: var(--gold);
    border-radius: 50%;
    flex-shrink: 0;
}

.feature-item span {
    color: rgba(255,255,255,0.6);
    font-size: 14px;
    letter-spacing: 0.02em;
}

/* DECORATIVE NUMBER */
.bg-number {
    position: absolute;
    right: -30px; top: 50%;
    transform: translateY(-50%);
    font-family: 'Playfair Display', serif;
    font-size: 260px;
    color: rgba(255,255,255,0.025);
    line-height: 1;
    pointer-events: none;
    font-weight: 900;
    user-select: none;
}

/* RIGHT PANEL */
.left-panel { display: none; }

.right-panel {
    flex: 1;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    background: transparent;
    position: relative;
}

.right-panel::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(112deg, transparent 42%, rgba(232,201,122,0.045) 49%, transparent 56%),
        repeating-linear-gradient(0deg, transparent 0 63px, rgba(255,255,255,0.018) 64px),
        repeating-linear-gradient(90deg, transparent 0 63px, rgba(255,255,255,0.018) 64px);
    background-size: 220% 100%, 100% 100%, 100% 100%;
    animation: lightSweep 22s ease-in-out infinite;
}

@keyframes lightSweep {
    0%, 100% { background-position: 120% 0, 0 0, 0 0; }
    50% { background-position: -20% 0, 0 0, 0 0; }
}

.form-container {
    width: 100%;
    max-width: 520px;
    padding: 40px;
    background: rgba(26, 24, 22, 0.95);
    border: 1px solid #2e2a26;
    border-radius: 20px;
    box-shadow: 0 0 0 1px rgba(200,151,74,0.05), 0 40px 80px rgba(0,0,0,0.6), 0 0 60px rgba(200,151,74,0.04);
    backdrop-filter: blur(16px);
    position: relative;
    z-index: 1;
    overflow: hidden;
    animation: fadeUp 0.8s 0.15s ease both;
}

.form-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 40px;
    width: 58px;
    height: 3px;
    background: linear-gradient(90deg, var(--gold), var(--gold-light));
    box-shadow: 0 0 18px rgba(232,201,122,0.36);
}

.form-header {
    margin-bottom: 38px;
}

.step-indicator {
    display: none;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.step {
    width: 28px; height: 4px;
    background: var(--border);
    border-radius: 2px;
    transition: background 0.4s, width 0.4s;
    cursor: pointer;
}

.step.active {
    background: var(--gold);
    width: 52px;
}

.step.done {
    background: var(--gold-light);
}

.step-label {
    font-size: 12px;
    color: var(--muted);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-left: 6px;
}

.form-title {
    font-family: 'Playfair Display', serif;
    font-size: 32px;
    color: var(--ink);
    font-weight: 700;
    margin-bottom: 6px;
}

.form-subtitle {
    font-size: 14px;
    color: var(--muted);
}

/* FORM STEPS */
.form-step { display: none; }
.form-step.active { display: block; animation: stepIn 0.45s ease both; }

@keyframes stepIn {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

/* FIELD GROUP */
.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.field {
    margin-bottom: 20px;
    position: relative;
}

.field label {
    display: block;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 8px;
    transition: color 0.3s;
}

.field:focus-within label { color: var(--gold-light); }

.input-wrap {
    position: relative;
}

.input-wrap .icon {
    position: absolute;
    left: 14px; top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: 16px;
    pointer-events: none;
    transition: color 0.3s;
}

.input-wrap:focus-within .icon { color: var(--gold); }

.field input,
.field select,
.field textarea {
    width: 100%;
    background: #101114;
    border: 1px solid rgba(255,255,255,0.11);
    border-radius: 6px;
    padding: 14px 44px 14px 42px;
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    color: var(--ink);
    outline: none;
    transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
    appearance: none;
    box-sizing: border-box;
}

/* Ko'z tugmasi faqat parol maydonlarida; boshqa inputlarda o'ng padding kerak emas */
.field input:not([type="password"]) { padding-right: 14px; }
.field input[type="password"]::-ms-reveal { display: none; }

.field input::placeholder,
.field textarea::placeholder { color: #77777b; }

.field input.no-icon,
.field select.no-icon {
    padding-left: 14px;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: rgba(232,201,122,0.72);
    background: #141519;
    box-shadow: 0 0 0 3px rgba(201,168,76,0.1), 0 8px 24px rgba(0,0,0,0.16);
}

.field input.error,
.field select.error {
    border-color: var(--rust);
}

.field-error {
    display: none;
    font-size: 11px;
    color: var(--rust);
    margin-top: 5px;
    letter-spacing: 0.03em;
}

.field-error.visible { display: block; animation: shake 0.3s ease; }

@keyframes shake {
    0%,100%{transform:translateX(0)}
    25%{transform:translateX(-4px)}
    75%{transform:translateX(4px)}
}

/* PASSWORD STRENGTH */
.strength-bar {
    display: flex;
    gap: 4px;
    margin-top: 8px;
}

.strength-segment {
    height: 3px;
    flex: 1;
    background: var(--border);
    border-radius: 2px;
    transition: background 0.4s;
}

.strength-text {
    font-size: 11px;
    margin-top: 5px;
    color: var(--muted);
    transition: color 0.3s;
}

/* TOGGLE PASSWORD */
.toggle-pass {
    position: absolute;
    right: 14px; top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--muted);
    font-size: 16px;
    user-select: none;
    transition: color 0.2s;
}

.toggle-pass:hover { color: var(--gold-light); }

/* GENDER RADIO */
.radio-group {
    display: flex;
    gap: 10px;
}

.radio-card {
    flex: 1;
    position: relative;
}

.radio-card input {
    position: absolute; opacity: 0; width: 0; height: 0;
}

.radio-card label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 6px;
    background: #101114;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: var(--muted);
    letter-spacing: 0.05em;
    text-transform: none;
    transition: all 0.25s;
}

.radio-card input:checked + label {
    border-color: var(--gold);
    color: var(--gold-light);
    background: rgba(201,168,76,0.09);
    box-shadow: inset 0 0 0 1px rgba(201,168,76,0.14);
}

/* INTERESTS */
.interests-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.interest-chip {
    padding: 7px 14px;
    border: 1px solid rgba(255,255,255,0.12);
    background: #17181c;
    font-size: 12px;
    color: var(--muted);
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    transition: all 0.2s;
    border-radius: 100px;
    letter-spacing: 0.02em;
}

.interest-chip.selected {
    border-color: var(--gold);
    background: var(--ink);
    color: var(--gold);
}

/* AGREEMENT */
.check-field {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
    cursor: pointer;
}

.check-field input { display: none; }

.check-box {
    width: 18px; height: 18px;
    border: 1.5px solid var(--border);
    background: var(--white);
    flex-shrink: 0;
    margin-top: 2px;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
    font-size: 11px;
    color: transparent;
}

.check-field input:checked ~ .check-box {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--gold);
}

.check-field span {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.5;
}

.check-field a {
    color: var(--ink);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* BUTTONS */
.btn-row {
    display: flex;
    gap: 12px;
    margin-top: 28px;
}

.btn-back {
    width: 50px;
    border: 1.5px solid var(--border);
    background: transparent;
    color: var(--muted);
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

.btn-back:hover {
    border-color: var(--ink);
    color: var(--ink);
}

.btn-next {
    flex: 1;
    background: linear-gradient(110deg, var(--gold), var(--gold-light));
    color: #15130e;
    border: none;
    padding: 16px 28px;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform 0.15s;
}

.btn-next::before {
    content: '';
    position: absolute;
    inset: 0;
    background: #f0d894;
    transform: translateX(-101%);
    transition: transform 0.35s cubic-bezier(0.77,0,0.18,1);
}

.btn-next:hover::before { transform: translateX(0); }

.btn-next span { position: relative; z-index: 1; }

.btn-next:hover span { color: #15130e; }

.btn-next:active { transform: scale(0.98); }

/* SIGN IN LINK */
.signin-link {
    text-align: center;
    margin-top: 24px;
    font-size: 13px;
    color: var(--muted);
}

.signin-link a {
    color: var(--gold-light);
    font-weight: 500;
    text-decoration: none;
    border-bottom: 1px solid rgba(232,201,122,0.5);
    padding-bottom: 1px;
    transition: color 0.2s, border-color 0.2s;
}

.signin-link a:hover {
    color: #f2d995;
    border-color: var(--gold);
}

/* SUCCESS */
.success-screen {
    display: none;
    text-align: center;
    padding: 20px 0;
    animation: fadeUp 0.6s ease both;
}

.success-screen.active { display: block; }

.success-icon {
    width: 80px; height: 80px;
    border: 2px solid var(--gold);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 24px;
    font-size: 34px;
    color: var(--gold);
    animation: popIn 0.5s 0.2s cubic-bezier(0.34,1.56,0.64,1) both;
}

@keyframes popIn {
    from { opacity: 0; transform: scale(0.5); }
    to { opacity: 1; transform: scale(1); }
}

.success-screen h2 {
    font-family: 'Playfair Display', serif;
    font-size: 32px;
    color: var(--ink);
    margin-bottom: 12px;
}

.success-screen p {
    font-size: 15px;
    color: var(--muted);
    margin-bottom: 32px;
    line-height: 1.6;
}

/* DIVIDER */
.divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 24px 0;
}

.divider::before, .divider::after {
    content: ''; flex: 1;
    height: 1px;
    background: rgba(255,255,255,0.12);
}

.divider span {
    font-size: 11px;
    color: var(--muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* SOCIAL */
.social-row {
    display: flex; gap: 12px;
}

.social-btn {
    flex: 1;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    padding: 12px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 6px;
    background: #17181c;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: var(--ink);
    transition: all 0.2s;
}

.social-btn:hover {
    border-color: var(--gold);
    background: rgba(201,168,76,0.1);
    color: var(--gold-light);
}

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

/* RESPONSIVE */
@media (max-width: 768px) {
    body { flex-direction: column; }
    .right-panel { padding: 24px 16px; }
    .form-container { padding: 34px 22px 28px; }
    .form-container::before { left: 22px; }
    .field-row { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

/* =========================================
   QO'SHIMCHA: form elementlari
========================================= */
.btn-row { margin-top: 26px; }

/* Strength bar (register.html) */
.strength-bar {
    display: flex;
    gap: 6px;
    margin-top: 10px;
}
.strength-segment {
    flex: 1;
    height: 4px;
    border-radius: 3px;
    background: var(--border);
    transition: background .25s;
}
.strength-text {
    margin-top: 6px;
    font-size: 12px;
    color: var(--muted);
}

/* Field error yozuvlari */
.field-error {
    display: none;
    margin-top: 6px;
    font-size: 12px;
    color: var(--rust, #c0392b);
}
.field-error.visible { display: block; }

/* main.css bilan konfliktni yumshatish: register sahifasida
   `.container` va `.card` klasslari ishlatilmaydi, lekin global
   `.card` uslubi bo'lsa ham buzilmasligi uchun. */
.right-panel .form-container { position: relative; z-index: 2; }
