/* ============ RESET & VARS ============ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

:root {
    --bg: #070a14;
    --card-bg: rgba(18, 24, 43, 0.72);
    --card-border: rgba(99, 179, 237, 0.18);
    --text: #e6edf7;
    --text-dim: #8ea3bf;
    --accent-1: #22d3ee;
    --accent-2: #8b5cf6;
    --accent-3: #ec4899;
    --input-bg: rgba(10, 15, 28, 0.6);
    --input-border: rgba(99, 179, 237, 0.15);
    --error: #f87171;
}

html, body {
    min-height: 100%;
}

body {
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    position: relative;
    overflow-x: hidden;
}

/* ============ ANIMATED BACKGROUND ============ */
body::before {
    content: '';
    position: fixed;
    inset: -20%;
    background:
        radial-gradient(circle at 25% 30%, rgba(34, 211, 238, 0.12), transparent 45%),
        radial-gradient(circle at 75% 70%, rgba(139, 92, 246, 0.14), transparent 45%),
        radial-gradient(circle at 50% 50%, rgba(236, 72, 153, 0.08), transparent 50%);
    animation: bgShift 20s ease-in-out infinite;
    z-index: 0;
    pointer-events: none;
}

@keyframes bgShift {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50%      { transform: scale(1.12) rotate(8deg); }
}

/* ============ FLOATING ORBS ============ */
.orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(85px);
    opacity: 0.45;
    pointer-events: none;
    z-index: 1;
}
.orb-1 {
    width: 380px; height: 380px;
    background: #22d3ee;
    top: -100px; left: -100px;
    animation: float1 18s ease-in-out infinite;
}
.orb-2 {
    width: 340px; height: 340px;
    background: #8b5cf6;
    bottom: -120px; right: -80px;
    animation: float2 22s ease-in-out infinite;
}
.orb-3 {
    width: 260px; height: 260px;
    background: #ec4899;
    top: 40%; right: 30%;
    animation: float3 26s ease-in-out infinite;
}

@keyframes float1 {
    0%, 100% { transform: translate(0, 0); }
    50%      { transform: translate(60px, 40px); }
}
@keyframes float2 {
    0%, 100% { transform: translate(0, 0); }
    50%      { transform: translate(-50px, -40px); }
}
@keyframes float3 {
    0%, 100% { transform: translate(0, 0); }
    50%      { transform: translate(-40px, 50px); }
}

/* ============ LAYOUT ============ */
.main-row {
    display: flex;
    width: 100%;
    min-height: 100vh;
    position: relative;
    z-index: 2;
}

.image-side {
    flex: 1 1 auto;
    display: flex;
    align-items: stretch;   /* Height ko poora fill karega */
    justify-content: stretch; /* Width ko poora fill karega */
    padding: 0;             /* Padding hata di gayi hai */
    overflow: hidden;       /* Extra part ko chhupayega */
}

.illustration {
    width: 100%;
    height: 100%;
    display: flex;
}

.illustration img {
    width: 100%;
    height: 100%;
    object-fit: cover;      /* Image stretch nahi hogi, balki cover karegi */
    object-position: center; /* Image center mein rahegi */
    border-radius: 0;       /* Rounded corners hata diye */
    box-shadow: none;       /* Shadow hata di gayi */
    display: block;
}

.form-side {
    flex: 0 0 auto;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 2rem clamp(1.5rem, 6vw, 5rem) 2rem 1rem;
}

/* ============ FORM CARD ============ */
.form-card {
    width: 100%;
    max-width: 480px;
    background: var(--card-bg);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    border-radius: 2rem;
    border: 1px solid var(--card-border);
    padding: 2.5rem 2rem;
    position: relative;
    box-shadow:
        0 30px 60px -25px rgba(0, 0, 0, 0.7),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    animation: cardIn 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes cardIn {
    from { opacity: 0; transform: translateY(30px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* glowing top accent line */
.form-card::before {
    content: '';
    position: absolute;
    top: 0; left: 15%; right: 15%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-1), var(--accent-2), transparent);
    opacity: 0.75;
}

/* ============ TABS ============ */
.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    background: rgba(10, 15, 28, 0.5);
    padding: 0.4rem;
    border-radius: 60px;
    border: 1px solid rgba(99, 179, 237, 0.1);
    position: relative;
}

.tab {
    flex: 1;
    text-align: center;
    padding: 0.85rem 0.5rem;
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-dim);
    border-radius: 40px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    background: transparent;
    letter-spacing: 0.5px;
}

.tab:hover {
    color: var(--text);
}

.tab.active {
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    color: #fff;
    font-weight: 700;
    box-shadow:
        0 8px 20px -6px rgba(34, 211, 238, 0.5),
        0 4px 12px -4px rgba(139, 92, 246, 0.4);
}

/* ============ FORM FADE ============ */
.form {
    display: none;
    animation: fade 0.35s ease;
}

.form.active {
    display: block;
}

@keyframes fade {
    0%   { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* ============ HEADING ============ */
h2 {
    font-size: 1.9rem;
    font-weight: 700;
    margin-bottom: 1.8rem;
    letter-spacing: -0.02em;
    text-transform: capitalize;
    background: linear-gradient(135deg, #ffffff, #a5b4fc);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ============ INPUTS ============ */
.input-field {
    margin-bottom: 1.4rem;
}

.input-field label {
    display: block;
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-bottom: 0.5rem;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper input,
.input-field > input {
    width: 100%;
    padding: 1rem 1.2rem;
    font-size: 1rem;
    border: 1.5px solid var(--input-border);
    border-radius: 16px;
    outline: none;
    transition: border 0.25s, box-shadow 0.25s, background 0.25s;
    background: var(--input-bg);
    color: var(--text);
}

.input-wrapper input::placeholder,
.input-field > input::placeholder {
    color: #4a5a75;
}

.input-wrapper input:focus,
.input-field > input:focus {
    border-color: var(--accent-1);
    background: rgba(10, 15, 28, 0.85);
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.14);
}

/* ============ PASSWORD TOGGLE ============ */
.toggle-pw {
    position: absolute;
    right: 16px;
    background: transparent;
    border: none;
    font-size: 1.1rem;
    color: #7f9eb5;
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    transition: color 0.2s, transform 0.2s;
}

.toggle-pw:hover {
    color: var(--accent-1);
    transform: scale(1.15);
}

/* ============ ERROR MESSAGES ============ */
.error-msg {
    font-size: 0.82rem;
    color: var(--error);
    font-weight: 500;
    margin-top: 0.45rem;
    display: none;
    align-items: center;
    gap: 4px;
}

.error-msg.show {
    display: flex;
    animation: shakeMsg 0.4s ease;
}

@keyframes shakeMsg {
    0%, 100% { transform: translateX(0); }
    25%      { transform: translateX(-5px); }
    50%      { transform: translateX(5px); }
    75%      { transform: translateX(-3px); }
}

.input-field.invalid input {
    border-color: var(--error);
    background-color: rgba(248, 113, 113, 0.06);
    box-shadow: 0 0 0 4px rgba(248, 113, 113, 0.1);
}

/* ============ MAIN BUTTON ============ */
.btn {
    position: relative;
    overflow: hidden;
    width: 100%;
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2) 60%, var(--accent-3));
    background-size: 200% 200%;
    color: #fff;
    border: none;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 40px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.3s, background-position 0.6s;
    box-shadow:
        0 15px 30px -12px rgba(34, 211, 238, 0.6),
        0 8px 20px -10px rgba(139, 92, 246, 0.6);
    margin: 1rem 0 1.2rem;
    letter-spacing: 0.5px;
}

.btn::after {
    content: '';
    position: absolute;
    top: 0; left: -120%;
    width: 60%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transform: skewX(-20deg);
    animation: shine 3.5s infinite;
}

@keyframes shine {
    0%      { left: -120%; }
    60%, 100% { left: 160%; }
}

.btn:hover {
    transform: translateY(-2px);
    background-position: 100% 50%;
    box-shadow:
        0 20px 40px -12px rgba(34, 211, 238, 0.7),
        0 12px 25px -10px rgba(236, 72, 153, 0.6);
}

.btn:active {
    transform: translateY(0) scale(0.99);
}

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

/* ============ FORGOT LINK ============ */
.forgot-link {
    text-align: right;
    margin: 0.2rem 0 0.6rem;
}

.forgot-link span.clickable {
    color: var(--accent-1);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    border-bottom: 1px dashed rgba(34, 211, 238, 0.4);
    transition: color 0.2s, border-color 0.2s;
}

.forgot-link span.clickable:hover {
    color: #67e8f9;
    border-color: #67e8f9;
}

/* ============ EXTRA MESSAGES ============ */
.extra-message {
    text-align: center;
    font-size: 0.92rem;
    color: var(--text-dim);
    margin-top: 1.2rem;
}

.extra-message span.tab-switch {
    color: var(--accent-1);
    font-weight: 700;
    cursor: pointer;
    border-bottom: 1px dashed rgba(34, 211, 238, 0.4);
    padding-bottom: 1px;
    transition: color 0.2s;
}

.extra-message span.tab-switch:hover {
    color: #67e8f9;
}

/* ============ DIVIDER & HINTS ============ */
hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(99, 179, 237, 0.3), transparent);
    margin: 1.6rem 0 1rem;
}

.hint-note {
    font-size: 0.8rem;
    color: #5a7089;
    text-align: center;
    line-height: 1.5;
}

/* ============ DISABLED SIGNUP NOTICE ============ */
.disabled-message {
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.3);
    border-radius: 16px;
    padding: 0.9rem;
    margin-bottom: 1rem;
    text-align: center;
    color: #fca5a5;
    font-weight: 500;
    font-size: 0.9rem;
    display: none;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
    .image-side {
        display: none;
    }
    .form-side {
        flex: 1;
        justify-content: center;
        padding: 2rem 1rem;
    }
    .form-card {
        max-width: 440px;
        padding: 2rem 1.6rem;
    }
}

@media (max-width: 480px) {
    h2 { font-size: 1.6rem; }
    .tab { font-size: 0.9rem; padding: 0.75rem 0.4rem; }
    .form-card { padding: 1.8rem 1.3rem; border-radius: 1.5rem; }
}

/* ============ REDUCED MOTION ============ */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}