﻿/* ============================================
   E-MAZADE MODERN REGISTRATION PAGE
   ============================================ */

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --primary-subtle: #eff6ff;
    --surface: #ffffff;
    --background: #f8fafc;
    --text: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --border-focus: #2563eb;
    --error: #dc2626;
    --error-bg: #fef2f2;
    --success: #16a34a;
    --warning: #f59e0b;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-focus: 0 0 0 3px rgba(37, 99, 235, 0.15);
    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text);
    line-height: 1.5;
    background: var(--background);
}

/* ============================================
   LAYOUT: SPLIT PANEL
   ============================================ */

.register-page {
    display: grid;
    grid-template-columns: 1fr;
    min-height: 100vh;
}

/* ============================================
   LEFT PANEL: VISUAL
   ============================================ */

.register-visual {
    display: none;
    position: relative;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    overflow: hidden;
    padding: 3rem;
    max-width:auto;
}

.visual-content {
    position: relative;
    z-index: 2;
    max-width:auto;
    margin: auto;
    color: white;
}

.brand-badge {
    width: 140px;
    height: 140px;
    margin: 0 auto 2.5rem;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

    .brand-badge img {
        width: 100%;
        height: auto;
    }

.visual-title {
    font-size: 2.75rem;
    font-weight: 700;
    line-height: 1.2;
    text-align:left;
    margin-bottom: 0.8rem;
    letter-spacing: -0.02em;
}

    .visual-title .accent {
        background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

.visual-subtitle {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.65);
    text-align: center;
    margin-bottom: 3rem;
    line-height: 1.7;
    text-align: left;
}

/* Trust Indicators */
.trust-indicators {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 3rem;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    padding: 0.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all var(--transition);
}

    .trust-item:hover {
        background: rgba(255, 255, 255, 0.08);
        transform: translateX(4px);
    }

.trust-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    flex-shrink: 0;
}

.trust-info {
    display: flex;
    flex-direction: column;
}

    .trust-info strong {
        font-size: 1.125rem;
        font-weight: 600;
        color: white;
    }

    .trust-info span {
        font-size: 0.875rem;
        color: rgba(255, 255, 255, 0.6);
    }

/* Testimonial */
.testimonial {
    text-align: center;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.stars {
    color: #fbbf24;
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
    letter-spacing: 2px;
}

.quote {
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
    line-height: 1.6;
}

/* Decorative Shapes */
.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.35;
    animation: float 20s infinite ease-in-out;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: var(--primary);
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.shape-2 {
    width: 300px;
    height: 300px;
    background: #8b5cf6;
    bottom: 10%;
    left: -100px;
    animation-delay: -7s;
}

.shape-3 {
    width: 250px;
    height: 250px;
    background: #06b6d4;
    top: 50%;
    right: 20%;
    animation-delay: -14s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -30px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

/* ============================================
   RIGHT PANEL: FORM
   ============================================ */

.register-panel {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 2rem 1.5rem;
    background: var(--background);
    overflow-y: auto;
}

.register-container {
    width: 100%;
    max-width:750px;
    padding: 2rem 0;
}

.form-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

    .form-header h2 {
        font-size: 1.5rem;
        font-weight: 700;
        color: var(--text);
        margin-bottom: 0.5rem;
        line-height: 1.3;
    }

    .form-header p {
        color: var(--text-secondary);
        font-size: 0.9375rem;
    }

/* ============================================
   FORM SECTIONS
   ============================================ */

.form-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.section-number {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8125rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* ============================================
   FORM ELEMENTS
   ============================================ */

.form-group {
    margin-bottom: 1.25rem;
}

    .form-group:last-child {
        margin-bottom: 0;
    }

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

.input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 1rem;
    color: var(--text-muted);
    font-size: 0.875rem;
    pointer-events: none;
    transition: color var(--transition);
    z-index: 1;
}

.form-input {
    width: 100%;
    height: 48px;
    padding: 0 1rem 0 2.75rem;
    font-family: inherit;
    font-size: 0.9375rem;
    color: var(--text);
    background: var(--background);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    outline: none;
    transition: all var(--transition);
}

    .form-input::placeholder {
        color: var(--text-muted);
    }

    .form-input:hover {
        border-color: #cbd5e1;
    }

    .form-input:focus {
        border-color: var(--border-focus);
        box-shadow: var(--shadow-focus);
        background: var(--surface);
    }

        .form-input:focus + .input-icon,
        .input-wrap:focus-within .input-icon {
            color: var(--primary);
        }

.form-textarea {
    height: auto;
    min-height: 80px;
    padding-top: 0.75rem;
    resize: vertical;
}

/* Password Toggle */
.toggle-password {
    position: absolute;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    font-size: 0.875rem;
    transition: color var(--transition);
}

    .toggle-password:hover {
        color: var(--text-secondary);
    }

/* Password Strength */
.password-strength {
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.8125rem;
    font-weight: 500;
}

    .password-strength .strength-bar {
        flex: 1;
        height: 4px;
        background: var(--border);
        border-radius: 2px;
        overflow: hidden;
    }

        .password-strength .strength-bar::after {
            content: '';
            display: block;
            height: 100%;
            border-radius: 2px;
            transition: all var(--transition);
            width: 0%;
        }

    .password-strength.weak {
        color: var(--error);
    }

        .password-strength.weak .strength-bar::after {
            width: 20%;
            background: var(--error);
        }

    .password-strength.fair {
        color: var(--warning);
    }

        .password-strength.fair .strength-bar::after {
            width: 40%;
            background: var(--warning);
        }

    .password-strength.good {
        color: #3b82f6;
    }

        .password-strength.good .strength-bar::after {
            width: 60%;
            background: #3b82f6;
        }

    .password-strength.strong {
        color: var(--success);
    }

        .password-strength.strong .strength-bar::after {
            width: 80%;
            background: var(--success);
        }

    .password-strength.excellent {
        color: #059669;
    }

        .password-strength.excellent .strength-bar::after {
            width: 100%;
            background: #059669;
        }

/* Validation */
.validation-msg {
    display: block;
    font-size: 0.8125rem;
    color: var(--error);
    margin-top: 0.375rem;
    min-height: 1.25rem;
}

.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.alert-error {
    background: var(--error-bg);
    color: var(--error);
    border: 1px solid #fecaca;
}

/* ============================================
   GENDER SELECTION
   ============================================ */

.gender-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.gender-card {
    cursor: pointer;
    position: relative;
}

.gender-input {
    position: absolute;
    opacity: 0;
}

.gender-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 0.3rem 0.1rem;
    background: var(--background);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    transition: all var(--transition);
}

.gender-icon {
    width: 36px;
    height: 36px;
    opacity: 0.7;
    transition: all var(--transition);
}

    .gender-icon img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

.gender-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color var(--transition);
}

.gender-input:checked + .gender-content {
    border-color: var(--primary);
    background: var(--primary-subtle);
    box-shadow: var(--shadow-focus);
}

    .gender-input:checked + .gender-content .gender-icon {
        opacity: 1;
        transform: scale(1.1);
    }

    .gender-input:checked + .gender-content .gender-label {
        color: var(--primary);
        font-weight: 600;
    }

.gender-card:hover .gender-content {
    border-color: #cbd5e1;
}

/* ============================================
   CAPTCHA
   ============================================ */

.captcha-box {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.captcha-display {
    display: flex;
    align-items: center;
    gap: 1rem;
}

    .captcha-display img {
        height: 60px;
        border-radius: var(--radius-sm);
        border: 1px solid var(--border);
        background: white;
        flex: 1;
        object-fit: contain;
    }

.captcha-refresh {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--background);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition);
    flex-shrink: 0;
}

    .captcha-refresh:hover {
        border-color: var(--primary);
        color: var(--primary);
        background: var(--primary-subtle);
    }

    .captcha-refresh:active {
        transform: rotate(180deg);
    }

/* ============================================
   TERMS & CHECKBOX
   ============================================ */

.terms-box {
    margin: 1.5rem 0;
}

.checkbox-custom {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

    .checkbox-custom input {
        position: absolute;
        opacity: 0;
        cursor: pointer;
        height: 0;
        width: 0;
    }

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
    transition: all var(--transition);
}

    .checkmark::after {
        content: '\f00c';
        font-family: 'Font Awesome 6 Free';
        font-weight: 900;
        font-size: 0.625rem;
        color: white;
        opacity: 0;
        transform: scale(0);
        transition: all var(--transition);
    }

.checkbox-custom input:checked ~ .checkmark {
    background: var(--primary);
    border-color: var(--primary);
}

    .checkbox-custom input:checked ~ .checkmark::after {
        opacity: 1;
        transform: scale(1);
    }

.checkbox-custom:hover .checkmark {
    border-color: var(--primary-light);
}

.checkbox-text a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

    .checkbox-text a:hover {
        text-decoration: underline;
    }

/* ============================================
   SUBMIT BUTTON
   ============================================ */

.btn-submit {
    width: 100%;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
    position: relative;
    overflow: hidden;
}

    .btn-submit::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
        transition: left 0.5s ease;
    }

    .btn-submit:hover::before {
        left: 100%;
    }

    .btn-submit:hover:not(:disabled) {
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(37, 99, 235, 0.35);
    }

    .btn-submit:active:not(:disabled) {
        transform: translateY(0);
    }

    .btn-submit:disabled {
        opacity: 0.5;
        cursor: not-allowed;
        filter: grayscale(0.5);
    }

.btn-arrow {
    transition: transform var(--transition);
}

.btn-submit:hover:not(:disabled) .btn-arrow {
    transform: translateX(4px);
}

/* Form Footer */
.form-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

    .form-footer a {
        color: var(--primary);
        font-weight: 600;
        text-decoration: none;
    }

        .form-footer a:hover {
            text-decoration: underline;
        }

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (min-width: 768px) {
    .register-page {
        grid-template-columns: 1fr 1fr;
    }

    .register-visual {
        display: flex;
        align-items: center;
        justify-content: center;
        position: sticky;
        top: 0;
        height: 100vh;
    }

    .register-panel {
        padding: 3rem;
        align-items: center;
        min-height: 100vh;
    }

    .register-container {
        padding: 0;
    }

    .form-row {
        grid-template-columns: 1fr 1fr;
    }

    .visual-title {
        font-size: 3rem;
    }
}

@media (min-width: 1200px) {
    .register-page {
        grid-template-columns: 5fr 4fr;
    }

    .register-panel {
        padding: 4rem;
    }

    .form-header h2 {
        font-size: 1.75rem;
    }
}

@media (max-width: 767px) {
    .register-panel {
        padding: 1.5rem 1rem;
    }

    .register-container {
        padding: 1rem 0;
    }

    .form-section {
        padding: 1.25rem;
    }

    .gender-options {
        gap: 0.75rem;
    }

    .gender-content {
        padding: 1.25rem 0.75rem;
    }

    .gender-icon {
        width: 44px;
        height: 44px;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* RTL Support */
[dir="rtl"] .input-icon {
    left: auto;
    right: 1rem;
}

[dir="rtl"] .form-input {
    padding: 0 2.75rem 0 1rem;
}

[dir="rtl"] .toggle-password {
    right: auto;
    left: 1rem;
}

[dir="rtl"] .section-title {
    flex-direction: row-reverse;
}

[dir="rtl"] .trust-item:hover {
    transform: translateX(-4px);
}

[dir="rtl"] .btn-submit:hover:not(:disabled) .btn-arrow {
    transform: translateX(-4px);
}
/* ============================================
   SMALL SCREEN OPTIMIZATION
   Keep original design — improve spacing/layout only
   ============================================ */

@media (max-width: 767px) {

    html {
        font-size: 15px;
    }

    body {
        overflow-x: hidden;
    }

    .register-page {
        min-height: auto;
    }

    .register-panel {
        padding: 0.75rem;
        align-items: stretch;
        min-height: 100vh;
    }

    .register-container {
        max-width: 100%;
        padding: 0;
    }

    .form-header {
        margin-bottom: 1.5rem;
    }

        .form-header h2 {
            font-size: 1.35rem;
            line-height: 1.25;
        }

        .form-header p {
            font-size: 0.875rem;
        }

    .form-section {
        padding: 1rem;
        margin-bottom: 1rem;
        border-radius: 14px;
    }

    .section-title {
        margin-bottom: 1rem;
        padding-bottom: 0.75rem;
        font-size: 0.9rem;
        gap: 0.6rem;
    }

    .section-number {
        width: 24px;
        height: 24px;
        font-size: 0.75rem;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0.9rem;
    }

    .form-group {
        margin-bottom: 1rem;
    }

    .form-label {
        font-size: 0.84rem;
        margin-bottom: 0.45rem;
    }

    .form-input {
        height: 46px;
        font-size: 0.92rem;
        border-radius: 10px;
        padding-left: 2.6rem;
    }

    .input-icon {
        left: 0.9rem;
        font-size: 0.82rem;
    }

    .toggle-password {
        right: 0.85rem;
    }

    .form-textarea {
        min-height: 72px;
    }

    /* Gender cards */

    .gender-options {
        gap: 0.6rem;
    }

    .gender-content {
        padding: 0.9rem 0.5rem;
        gap: 0.55rem;
        min-height: 100px;
    }

    .gender-icon {
        width: 38px;
        height: 38px;
    }

    .gender-label {
        font-size: 0.78rem;
        text-align: center;
    }

    /* Captcha */

    .captcha-display {
        gap: 0.75rem;
    }

        .captcha-display img {
            height: 54px;
        }

    .captcha-refresh {
        width: 42px;
        height: 42px;
    }

    /* Checkbox */

    .checkbox-custom {
        gap: 0.65rem;
        font-size: 0.82rem;
    }

    .checkmark {
        width: 18px;
        height: 18px;
    }

    /* Button */

    .btn-submit {
        height: 50px;
        font-size: 0.95rem;
        border-radius: 12px;
    }

    /* Footer */

    .form-footer {
        margin-top: 1.25rem;
        font-size: 0.88rem;
    }

    /* Validation */

    .validation-msg {
        font-size: 0.78rem;
        min-height: 1rem;
    }

    /* Better touch spacing */

    button,
    input,
    textarea,
    select {
        touch-action: manipulation;
    }
}


/* ============================================
   EXTRA SMALL DEVICES
   ============================================ */

@media (max-width: 480px) {

    .register-panel {
        padding: 0.5rem;
    }

    .form-section {
        padding: 0.9rem;
    }

    .form-header {
        margin-bottom: 1.25rem;
    }

        .form-header h2 {
            font-size: 1.2rem;
        }

    .form-input {
        height: 44px;
        font-size: 0.88rem;
    }

    .btn-submit {
        height: 48px;
        font-size: 0.92rem;
    }

    .gender-content {
        min-height: 92px;
        padding: 0.75rem 0.4rem;
    }

    .gender-icon {
        width: 34px;
        height: 34px;
    }

    .gender-label {
        font-size: 0.74rem;
    }

    .captcha-display {
        flex-direction: column;
        align-items: stretch;
    }

    .captcha-refresh {
        width: 100%;
        height: 42px;
    }
}


/* ============================================
   FIX OVERFLOW ISSUES
   ============================================ */

.form-input,
.gender-content,
.form-section,
.captcha-display img,
.btn-submit {
    max-width: 100%;
}

img {
    max-width: 100%;
    height: auto;
}


/* ============================================
   GOOGLE SIGN-IN BUTTON STYLING
   ============================================ */

/* Container wrapper for the Google button */
.g_id_signin {
    margin: 0.5rem 0 1.5rem 0;
    display: flex;
    justify-content: center;
    width: 100%;
}

    /* Google button iframe container styling */
    .g_id_signin > div {
        width: 100% !important;
        max-width: 100% !important;
    }

/* Divider between Google button and form */
.google-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    color: var(--text-muted);
    font-size: 0.8125rem;
    font-weight: 500;
}

    .google-divider::before,
    .google-divider::after {
        content: '';
        flex: 1;
        height: 1px;
        background: var(--border);
    }

/* RTL Support */
[dir="rtl"] .g_id_signin {
    direction: ltr; /* Google button is always LTR */
}

/* Mobile optimization */
@media (max-width: 767px) {
    .g_id_signin {
        margin: 0.25rem 0 1.25rem 0;
    }

    .google-divider {
        margin: 1.25rem 0;
        font-size: 0.78rem;
    }
}

@media (max-width: 480px) {
    .g_id_signin > div {
        min-width: unset !important;
    }
}