/**
 * GAMIFICATION REGISTER PAGE - WORLD CLASS DESIGN
 * صفحة إنشاء الحساب - تصميم Gamification رائع
 * 
 * @package FitnessCoachPro
 * @version 3.0 - Championship Gamification Edition
 */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800;900&display=swap');

/* ============================================================================
   CSS VARIABLES - GAMIFICATION COLORS (MATCHING LOGIN PAGE)
   ============================================================================ */
:root {
    /* Primary Gaming Colors */
    --duo-green: #58cc02;
    --duo-green-dark: #46a302;
    --duo-green-light: #7cdb36;
    --duo-green-glow: rgba(88, 204, 2, 0.4);
    
    --duo-blue: #1cb0f6;
    --duo-blue-dark: #1899d6;
    --duo-purple: #a855f7;
    --duo-purple-dark: #9333ea;
    --duo-yellow: #ffc800;
    --duo-orange: #ff9600;
    --duo-red: #ff4b4b;
    
    /* Dark Theme */
    --duo-bg-deep: #0a1014;
    --duo-bg: #0f1a1f;
    --duo-bg-light: #162229;
    --duo-bg-card: #1a2c35;
    --duo-bg-elevated: #213640;
    
    /* Text */
    --duo-text: #ffffff;
    --duo-text-secondary: #b8cdd6;
    --duo-text-muted: #6b8a97;
    
    /* Glass Effect */
    --glass-bg: rgba(26, 44, 53, 0.85);
    --glass-border: rgba(255, 255, 255, 0.1);
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow-green: 0 0 30px var(--duo-green-glow);
    --shadow-glow-gold: 0 0 30px rgba(255, 200, 0, 0.4);
    --shadow-btn: 0 4px 0 rgba(0, 0, 0, 0.25);
    
    /* Border Radius */
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-full: 9999px;
}

/* ============================================================================
   GLOBAL RESET
   ============================================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    overflow-x: hidden;
}

body.fcp-register-page {
    font-family: 'Cairo', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--duo-bg-deep);
    color: var(--duo-text);
    direction: rtl;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* ============================================================================
   ANIMATED BACKGROUND
   ============================================================================ */
.fcp-register-wrapper {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
    overflow-x: hidden;
}

.fcp-register-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.bg-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 20% 0%, rgba(88, 204, 2, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 100%, rgba(28, 176, 246, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(168, 85, 247, 0.08) 0%, transparent 70%),
        linear-gradient(180deg, var(--duo-bg-deep) 0%, var(--duo-bg) 100%);
    animation: gradientShift 8s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.bg-particles {
    position: absolute;
    width: 100%;
    height: 100%;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--duo-green);
    border-radius: 50%;
    opacity: 0.6;
    animation: float 15s infinite ease-in-out;
    box-shadow: 0 0 10px var(--duo-green);
}

.particle:nth-child(1) {
    left: 10%;
    top: 20%;
    animation-delay: 0s;
    animation-duration: 12s;
    background: var(--duo-green);
}

.particle:nth-child(2) {
    left: 30%;
    top: 60%;
    animation-delay: 2s;
    animation-duration: 18s;
    background: var(--duo-blue);
}

.particle:nth-child(3) {
    left: 70%;
    top: 30%;
    animation-delay: 4s;
    animation-duration: 15s;
    background: var(--duo-green);
}

.particle:nth-child(4) {
    left: 50%;
    top: 80%;
    animation-delay: 6s;
    animation-duration: 20s;
    background: var(--duo-yellow);
}

.particle:nth-child(5) {
    left: 90%;
    top: 50%;
    animation-delay: 8s;
    animation-duration: 14s;
    background: var(--duo-green);
}

.particle:nth-child(6) {
    left: 20%;
    top: 70%;
    animation-delay: 10s;
    animation-duration: 16s;
    background: var(--duo-blue);
}

.particle:nth-child(7) {
    left: 60%;
    top: 10%;
    animation-delay: 12s;
    animation-duration: 19s;
    background: var(--duo-green);
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) translateX(0) scale(1);
        opacity: 0.6;
    }
    25% {
        transform: translateY(-30px) translateX(20px) scale(1.2);
        opacity: 0.8;
    }
    50% {
        transform: translateY(-60px) translateX(-15px) scale(0.8);
        opacity: 0.4;
    }
    75% {
        transform: translateY(-30px) translateX(10px) scale(1.1);
        opacity: 0.7;
    }
}

/* ============================================================================
   MAIN CONTAINER
   ============================================================================ */
.fcp-register-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 600px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-xl);
    border: 1px solid var(--glass-border);
    padding: 40px 32px;
    box-shadow: var(--shadow-lg), var(--shadow-glow-green);
    animation: containerSlideIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    margin: 20px 0;
}

@keyframes containerSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ============================================================================
   HEADER & LOGO
   ============================================================================ */
.fcp-register-header {
    text-align: center;
    margin-bottom: 32px;
}

.fcp-logo-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 20px;
}

.fcp-logo-icon {
    font-size: 80px;
    line-height: 1;
    position: relative;
    z-index: 2;
    animation: logoRocket 2s ease-in-out infinite;
    filter: drop-shadow(0 4px 12px rgba(88, 204, 2, 0.4));
}

@keyframes logoRocket {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-10px) rotate(-5deg);
    }
    50% {
        transform: translateY(-15px) rotate(0deg);
    }
    75% {
        transform: translateY(-10px) rotate(5deg);
    }
}

.fcp-logo-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, var(--duo-green-glow) 0%, transparent 70%);
    border-radius: 50%;
    animation: glowPulse 2s ease-in-out infinite;
    z-index: 1;
}

@keyframes glowPulse {
    0%, 100% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.2);
    }
}

.fcp-register-title {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.title-main {
    font-size: 32px;
    font-weight: 900;
    color: var(--duo-text);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    letter-spacing: -0.5px;
}

.title-sub {
    font-size: 16px;
    font-weight: 600;
    color: var(--duo-text-secondary);
}

/* ============================================================================
   WELCOME BADGE
   ============================================================================ */
.fcp-welcome-badge {
    margin-bottom: 24px;
    display: flex;
    justify-content: center;
}

.welcome-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, rgba(255, 200, 0, 0.2), rgba(255, 200, 0, 0.1));
    border: 2px solid rgba(255, 200, 0, 0.3);
    border-radius: var(--radius-full);
    padding: 12px 20px;
    box-shadow: var(--shadow-glow-gold);
    animation: welcomePulse 2s ease-in-out infinite;
}

@keyframes welcomePulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: var(--shadow-glow-gold);
    }
    50% {
        transform: scale(1.05);
        box-shadow: var(--shadow-glow-gold), 0 0 40px rgba(255, 200, 0, 0.3);
    }
}

.badge-icon {
    font-size: 24px;
    filter: drop-shadow(0 2px 4px rgba(255, 200, 0, 0.5));
}

.badge-text {
    font-size: 14px;
    font-weight: 700;
    color: var(--duo-yellow);
    text-shadow: 0 0 10px rgba(255, 200, 0, 0.5);
}

/* ============================================================================
   MESSAGES
   ============================================================================ */
.fcp-message {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    animation: messageSlideIn 0.4s ease;
    border: 2px solid;
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.fcp-message-success {
    background: rgba(88, 204, 2, 0.15);
    border-color: var(--duo-green);
    color: var(--duo-green);
    box-shadow: var(--shadow-glow-green);
}

.fcp-message-error {
    background: rgba(255, 75, 75, 0.15);
    border-color: var(--duo-red);
    color: var(--duo-red);
    box-shadow: 0 0 20px rgba(255, 75, 75, 0.3);
}

.message-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.message-text {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
}

/* ============================================================================
   SECTION TITLE
   ============================================================================ */
.fcp-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--glass-border);
}

.section-icon {
    font-size: 24px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.section-text {
    font-size: 18px;
    font-weight: 800;
    color: var(--duo-text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================================================
   FORM
   ============================================================================ */
.fcp-register-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.fcp-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.fcp-form-group {
    position: relative;
}

.fcp-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 700;
    color: var(--duo-text-secondary);
}

.label-icon {
    font-size: 18px;
}

.fcp-input-wrapper {
    position: relative;
}

.fcp-input {
    width: 100%;
    padding: 16px 20px;
    background: rgba(15, 26, 31, 0.6);
    border: 2px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--duo-text);
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    outline: none;
}

.fcp-input::placeholder {
    color: var(--duo-text-muted);
    font-weight: 500;
}

.fcp-input-wrapper.focused .fcp-input,
.fcp-input:focus {
    border-color: var(--duo-green);
    background: rgba(15, 26, 31, 0.8);
    box-shadow: var(--shadow-glow-green), var(--shadow-md);
    transform: translateY(-2px);
    color: var(--duo-green);
}

/* Password strength indicators */
.fcp-input-wrapper.weak .fcp-input {
    border-color: var(--duo-red);
    box-shadow: 0 0 20px rgba(255, 75, 75, 0.3);
}

.fcp-input-wrapper.medium .fcp-input {
    border-color: var(--duo-yellow);
    box-shadow: 0 0 20px rgba(255, 200, 0, 0.3);
}

.fcp-input-wrapper.strong .fcp-input {
    border-color: var(--duo-green);
    box-shadow: var(--shadow-glow-green);
}

.fcp-input-wrapper.match .fcp-input {
    border-color: var(--duo-green);
    box-shadow: var(--shadow-glow-green);
}

.input-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: var(--radius-md);
    background: var(--duo-green-glow);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: -1;
    filter: blur(10px);
}

.fcp-input-wrapper.focused .input-glow {
    opacity: 0.3;
}

.input-hint {
    font-size: 12px;
    color: var(--duo-text-muted);
    margin-top: 6px;
    font-weight: 500;
}

/* ============================================================================
   REGISTER BUTTON - GAMIFICATION STYLE (GREEN LIKE LOGIN)
   ============================================================================ */
.fcp-btn-register {
    position: relative;
    width: 100%;
    padding: 18px 24px;
    background: linear-gradient(135deg, var(--duo-green), var(--duo-green-dark));
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-size: 18px;
    font-weight: 900;
    font-family: inherit;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: var(--shadow-btn), var(--shadow-glow-green);
    margin-top: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fcp-btn-register::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;
}

.fcp-btn-register:hover::before {
    left: 100%;
}

.fcp-btn-register:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-btn), var(--shadow-glow-green), var(--shadow-lg);
    background: linear-gradient(135deg, var(--duo-green-light), var(--duo-green));
}

.fcp-btn-register:active {
    transform: translateY(-1px);
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.25), var(--shadow-glow-green);
}

.fcp-btn-register.loading {
    pointer-events: none;
    opacity: 0.8;
}

.btn-text {
    position: relative;
    z-index: 2;
}

.btn-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.fcp-btn-register:hover .btn-glow {
    opacity: 1;
}

/* ============================================================================
   LOGIN LINK
   ============================================================================ */
.fcp-login-link {
    text-align: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.link-text {
    font-size: 14px;
    color: var(--duo-text-muted);
    font-weight: 600;
}

.link-action {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 800;
    color: var(--duo-green);
    text-decoration: none;
    transition: all 0.3s ease;
}

.link-action:hover {
    color: var(--duo-green-light);
    gap: 10px;
}

.link-arrow {
    transition: transform 0.3s ease;
}

.link-action:hover .link-arrow {
    transform: translateX(-4px);
}

/* ============================================================================
   GAMIFICATION BENEFITS
   ============================================================================ */
.fcp-gamification-benefits {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--glass-border);
}

.benefit-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
    text-align: center;
}

.benefit-item:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-4px);
    box-shadow: var(--shadow-sm);
    border-color: var(--duo-green);
}

.benefit-icon {
    font-size: 32px;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
    animation: benefitFloat 3s ease-in-out infinite;
}

.benefit-item:nth-child(2) .benefit-icon {
    animation-delay: 0.5s;
}

.benefit-item:nth-child(3) .benefit-icon {
    animation-delay: 1s;
}

.benefit-item:nth-child(4) .benefit-icon {
    animation-delay: 1.5s;
}

@keyframes benefitFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

.benefit-text {
    font-size: 12px;
    font-weight: 600;
    color: var(--duo-text-secondary);
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */
@media (max-width: 768px) {
    .fcp-form-row {
        grid-template-columns: 1fr;
    }
    
    .fcp-gamification-benefits {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .fcp-register-container {
        padding: 32px 24px;
        margin: 16px;
    }
    
    .fcp-logo-icon {
        font-size: 64px;
    }
    
    .title-main {
        font-size: 28px;
    }
    
    .fcp-gamification-benefits {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .benefit-item {
        flex-direction: row;
        justify-content: center;
        text-align: right;
    }
}
