/* =======================================================================
   Premium Register Styles - Experience Platform
   نظام تصميم احترافي متكامل لصفحة التسجيل الجديد
   ======================================================================= */

/* ===========================
   1. RESET & GLOBAL STYLES
   =========================== */
   * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ===========================
   2. CSS VARIABLES (DESIGN TOKENS)
   =========================== */
:root {
    /* Register Specific Colors - ألوان خاصة بالتسجيل */
    --register-gradient-start: #00D2FF;
    --register-gradient-end: #3A7BD5;
    --register-accent: #00F260;
    --register-secondary: #0575E6;
    
    /* Brand Colors */
    --brand-cyan: #00D2FF;
    --brand-blue: #3A7BD5;
    --brand-blue-dark: #2563EB;
    --brand-green: #00F260;
    
    /* Accent Colors */
    --accent-success: #10B981;
    --accent-warning: #F59E0B;
    --accent-error: #EF4444;
    
    /* Background Gradients */
    --bg-register: linear-gradient(135deg, #00D2FF 0%, #3A7BD5 100%);
    --bg-page: linear-gradient(135deg, #0F2027 0%, #203A43 50%, #2C5364 100%);
    --bg-page-alt: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    --bg-card: rgba(255, 255, 255, 0.98);
    --bg-input: rgba(255, 255, 255, 0.95);
    --bg-footer: #F9FAFB;
    
    /* Text Colors */
    --text-primary: #1F2937;
    --text-secondary: #6B7280;
    --text-light: #F3F4F6;
    --text-white: #FFFFFF;
    
    /* Border Colors */
    --border-light: #E5E7EB;
    --border-focus: #00D2FF;
    --border-error: #EF4444;
    --border-success: #10B981;
    
    /* Shadow Styles */
    --shadow-premium: 0 25px 60px rgba(0, 210, 255, 0.25);
    --shadow-hover: 0 30px 80px rgba(0, 210, 255, 0.4);
    --shadow-inner: inset 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow-button: 0 10px 30px rgba(0, 210, 255, 0.3);
    --shadow-button-hover: 0 15px 40px rgba(0, 210, 255, 0.5);
    
    /* Spacing */
    --spacing-xs: 8px;
    --spacing-sm: 12px;
    --spacing-md: 20px;
    --spacing-lg: 30px;
    --spacing-xl: 40px;
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-xxl: 30px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.4s ease;
    --transition-bounce: 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ===========================
   3. BODY & PAGE LAYOUT
   =========================== */
body {
    font-family: 'IBM Plex Sans Arabic', 'Tajawal', sans-serif;
    background: var(--bg-page-alt);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-md);
    position: relative;
    overflow-x: hidden;
    color: var(--text-primary);
}

/* خلفية متحركة متميزة */
body::before,
body::after {
    content: '';
    position: fixed;
    width: 700px;
    height: 700px;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.25;
    animation: floatRegister 25s infinite ease-in-out;
    z-index: 0;
}

body::before {
    background: radial-gradient(circle, var(--register-gradient-start), var(--register-accent));
    top: -250px;
    left: -250px;
    animation-delay: -8s;
}

body::after {
    background: radial-gradient(circle, var(--register-gradient-end), var(--brand-cyan));
    bottom: -250px;
    right: -250px;
    animation-delay: -15s;
}

@keyframes floatRegister {
    0%, 100% { 
        transform: translate(0, 0) scale(1) rotate(0deg); 
    }
    25% { 
        transform: translate(-40px, 60px) scale(1.15) rotate(5deg); 
    }
    50% { 
        transform: translate(60px, -40px) scale(0.95) rotate(-5deg); 
    }
    75% { 
        transform: translate(-60px, 40px) scale(1.08) rotate(3deg); 
    }
}

/* ===========================
   4. MAIN CONTAINER
   =========================== */
.register-container {
    position: relative;
    z-index: 1;
    max-width: 520px;
    width: 100%;
}

/* زر العودة */
.back-to-home {
    position: fixed;
    top: 30px;
    right: 30px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 12px 20px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    transition: all var(--transition-normal);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    z-index: 999;
}

.back-to-home:hover {
    background: var(--text-white);
    transform: translateX(5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    color: var(--brand-cyan);
}

.back-to-home i {
    font-size: 1.1rem;
    transition: transform var(--transition-normal);
}

.back-to-home:hover i {
    transform: translateX(5px);
}

/* ===========================
   5. PREMIUM CARD
   =========================== */
.premium-card {
    background: var(--bg-card);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-radius: var(--radius-xxl);
    box-shadow: var(--shadow-premium);
    overflow: hidden;
    transform: translateY(0);
    transition: all var(--transition-bounce);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.premium-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

/* ===========================
   6. CARD HEADER
   =========================== */
.card-header-premium {
    background: var(--bg-register);
    padding: var(--spacing-xl) var(--spacing-xl) var(--spacing-lg);
    position: relative;
    overflow: hidden;
}

/* شكل هندسي متحرك */
.card-header-premium::before {
    content: '';
    position: absolute;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15), transparent);
    border-radius: 50%;
    top: -180px;
    left: -120px;
    animation: pulseRegister 4s infinite ease-in-out;
}

@keyframes pulseRegister {
    0%, 100% { 
        transform: scale(1) rotate(0deg); 
        opacity: 0.15; 
    }
    50% { 
        transform: scale(1.3) rotate(180deg); 
        opacity: 0.25; 
    }
}

/* الأيقونة الرئيسية */
.header-icon {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, var(--register-accent), var(--brand-cyan));
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--spacing-md);
    box-shadow: 0 15px 35px rgba(0, 242, 96, 0.4);
    position: relative;
    z-index: 2;
    animation: iconBounceRegister 2.5s infinite ease-in-out;
}

@keyframes iconBounceRegister {
    0%, 100% { 
        transform: translateY(0) rotate(0deg) scale(1); 
    }
    30% { 
        transform: translateY(-12px) rotate(-8deg) scale(1.05); 
    }
    60% { 
        transform: translateY(-6px) rotate(8deg) scale(0.95); 
    }
}

.header-icon i {
    font-size: 45px;
    color: var(--text-white);
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.25));
}

.header-title {
    font-family: 'Tajawal', sans-serif;
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--text-white);
    text-align: center;
    margin-bottom: 10px;
    position: relative;
    z-index: 2;
    text-shadow: 0 3px 12px rgba(0, 0, 0, 0.25);
    letter-spacing: 1.5px;
}

.header-subtitle {
    color: rgba(255, 255, 255, 0.95);
    text-align: center;
    font-size: 1.05rem;
    position: relative;
    z-index: 2;
    font-weight: 500;
}

/* ===========================
   7. CARD BODY
   =========================== */
.card-body-premium {
    padding: var(--spacing-xl);
}

/* ===========================
   8. FORM INPUT GROUPS
   =========================== */
.input-group {
    position: relative;
    margin-bottom: var(--spacing-lg);
}

/* Floating Label */
.floating-label {
    position: absolute;
    top: 50%;
    right: var(--spacing-md);
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
    transition: all var(--transition-bounce);
    pointer-events: none;
    background: var(--bg-input);
    padding: 0 var(--spacing-xs);
}

/* Premium Input Field */
.premium-input {
    width: 100%;
    padding: 18px var(--spacing-md);
    padding-right: 50px;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-family: inherit;
    background: var(--bg-input);
    transition: all var(--transition-normal);
    color: var(--text-primary);
}

.premium-input:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 4px rgba(0, 210, 255, 0.1), var(--shadow-inner);
    background: var(--text-white);
}

/* Floating Label Animation */
.premium-input:focus + .floating-label,
.premium-input:not(:placeholder-shown) + .floating-label {
    top: -12px;
    font-size: 0.85rem;
    color: var(--border-focus);
    font-weight: 600;
}

/* Input Icon */
.input-icon {
    position: absolute;
    left: var(--spacing-md);
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 1.2rem;
    transition: all var(--transition-normal);
    pointer-events: none;
}

.premium-input:focus ~ .input-icon {
    color: var(--border-focus);
    transform: translateY(-50%) scale(1.15);
}

/* ===========================
   9. PASSWORD STRENGTH METER
   =========================== */
.password-strength {
    margin-top: var(--spacing-xs);
    display: none;
}

.password-strength.active {
    display: block;
}

.strength-bar {
    height: 4px;
    background: var(--border-light);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: var(--spacing-xs);
}

.strength-fill {
    height: 100%;
    width: 0;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.strength-fill.weak {
    width: 33%;
    background: var(--accent-error);
}

.strength-fill.medium {
    width: 66%;
    background: var(--accent-warning);
}

.strength-fill.strong {
    width: 100%;
    background: var(--accent-success);
}

.strength-text {
    font-size: 0.85rem;
    font-weight: 600;
}

.strength-text.weak {
    color: var(--accent-error);
}

.strength-text.medium {
    color: var(--accent-warning);
}

.strength-text.strong {
    color: var(--accent-success);
}

/* ===========================
   10. PASSWORD TOGGLE
   =========================== */
.password-toggle {
    position: absolute;
    left: 50px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.1rem;
    transition: all var(--transition-normal);
    z-index: 2;
    padding: var(--spacing-xs);
}

.password-toggle:hover {
    color: var(--border-focus);
    transform: translateY(-50%) scale(1.2);
}

/* ===========================
   11. PREMIUM BUTTON
   =========================== */
.premium-button {
    width: 100%;
    padding: 18px;
    border: none;
    border-radius: var(--radius-lg);
    background: var(--bg-register);
    color: var(--text-white);
    font-size: 1.2rem;
    font-weight: 700;
    font-family: 'Tajawal', sans-serif;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-slow);
    box-shadow: var(--shadow-button);
    margin-top: var(--spacing-md);
}

.premium-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.premium-button:hover::before {
    left: 100%;
}

.premium-button:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: var(--shadow-button-hover);
}

.premium-button:active {
    transform: translateY(-1px) scale(0.98);
}

/* Loading State */
.premium-button.loading {
    pointer-events: none;
    opacity: 0.8;
}

.premium-button.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-top: -10px;
    margin-left: -10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--text-white);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===========================
   12. DIVIDER
   =========================== */
.divider {
    display: flex;
    align-items: center;
    margin: var(--spacing-lg) 0;
    color: var(--text-secondary);
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-light), transparent);
}

.divider span {
    padding: 0 var(--spacing-sm);
    font-weight: 600;
}

/* ===========================
   13. SOCIAL BUTTONS
   =========================== */
.social-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-sm);
}

.social-btn {
    padding: var(--spacing-sm);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    background: var(--text-white);
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 600;
    color: var(--text-primary);
}

.social-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.social-btn.google:hover {
    border-color: #EA4335;
    color: #EA4335;
}

.social-btn.apple:hover {
    border-color: #000;
    color: #000;
}

/* ===========================
   14. CARD FOOTER
   =========================== */
.card-footer-premium {
    background: var(--bg-footer);
    padding: 25px var(--spacing-xl);
    text-align: center;
    border-top: 1px solid var(--border-light);
}

.login-link {
    color: var(--text-secondary);
}

.login-link a {
    color: var(--brand-cyan);
    font-weight: 700;
    text-decoration: none;
    transition: all var(--transition-normal);
}

.login-link a:hover {
    color: var(--brand-blue-dark);
    text-decoration: underline;
}

/* ===========================
   15. ERROR STATES
   =========================== */
.premium-input.error {
    border-color: var(--border-error);
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.error-message {
    color: var(--border-error);
    font-size: 0.85rem;
    margin-top: var(--spacing-xs);
    display: none;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.premium-input.error ~ .error-message {
    display: block;
}

/* ===========================
   16. RESPONSIVE DESIGN
   =========================== */
@media (max-width: 768px) {
    .register-container {
        max-width: 100%;
    }
    
    .card-header-premium {
        padding: var(--spacing-lg);
    }
    
    .card-body-premium {
        padding: var(--spacing-lg);
    }
    
    .header-icon {
        width: 70px;
        height: 70px;
    }
    
    .header-icon i {
        font-size: 35px;
    }
    
    .header-title {
        font-size: 1.8rem;
    }
}

@media (max-width: 576px) {
    body {
        padding: var(--spacing-sm);
    }
    
    .back-to-home {
        top: 15px;
        right: 15px;
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    .header-title {
        font-size: 1.6rem;
    }
    
    .social-buttons {
        grid-template-columns: 1fr;
    }
}

/* ===========================
   17. ACCESSIBILITY
   =========================== */
*:focus-visible {
    outline: 2px solid var(--brand-cyan);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}