/* ============================================================================
   CLIENT LOGIN PAGE - GAMIFICATION CSS
   صفحة تسجيل دخول المتدرب - تصميم Gamification
   @package FitnessCoachPro
   @version 2.3.0
   ============================================================================ */

/* ============================================================================
   CSS VARIABLES - GREEN THEME FOR CLIENT
   ============================================================================ */
:root {
    /* Green Color Palette */
    --client-primary: #10b981;
    --client-dark: #059669;
    --client-light: #34d399;
    --client-glow: rgba(16, 185, 129, 0.4);

    /* Background Colors */
    --duo-bg-deep: #0a0f14;
    --duo-bg: #0f1419;
    --duo-bg-card: #1a1f2e;

    /* Text Colors */
    --duo-text-primary: #ffffff;
    --duo-text-secondary: rgba(255, 255, 255, 0.8);
    --duo-text-muted: rgba(255, 255, 255, 0.6);
    --duo-text-subtle: rgba(255, 255, 255, 0.4);

    /* Glass Effect */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-hover: rgba(255, 255, 255, 0.06);

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.25);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.35);
    --shadow-glow-green: 0 0 30px var(--client-glow);
    --shadow-btn: 0 8px 24px rgba(16, 185, 129, 0.25);

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ============================================================================
   RESET & BASE STYLES
   ============================================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Cairo', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--duo-bg-deep);
    color: var(--duo-text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    direction: rtl;
}

/* ============================================================================
   LAYOUT WRAPPER
   ============================================================================ */
.fcp-login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* ============================================================================
   ANIMATED BACKGROUND
   ============================================================================ */
.fcp-login-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.bg-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 20% 0%, rgba(16, 185, 129, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 100%, rgba(5, 150, 105, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(52, 211, 153, 0.08) 0%, transparent 70%),
        linear-gradient(180deg, var(--duo-bg-deep) 0%, var(--duo-bg) 100%);
    animation: gradientShift 20s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* Animated Particles */
.bg-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.particle {
    position: absolute;
    border-radius: 50%;
    background: var(--client-primary);
    box-shadow: 0 0 10px var(--client-primary);
    animation: float 20s infinite ease-in-out;
    opacity: 0.1;
}

.particle:nth-child(1) {
    width: 4px;
    height: 4px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
    animation-duration: 18s;
}

.particle:nth-child(2) {
    width: 6px;
    height: 6px;
    top: 60%;
    left: 80%;
    animation-delay: 2s;
    animation-duration: 22s;
}

.particle:nth-child(3) {
    width: 3px;
    height: 3px;
    top: 40%;
    left: 30%;
    animation-delay: 4s;
    animation-duration: 20s;
}

.particle:nth-child(4) {
    width: 5px;
    height: 5px;
    top: 80%;
    left: 60%;
    animation-delay: 6s;
    animation-duration: 24s;
}

.particle:nth-child(5) {
    width: 4px;
    height: 4px;
    top: 10%;
    left: 90%;
    animation-delay: 8s;
    animation-duration: 19s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.05;
    }
    25% {
        transform: translate(30px, -30px) scale(1.2);
        opacity: 0.15;
    }
    50% {
        transform: translate(-20px, 40px) scale(0.8);
        opacity: 0.1;
    }
    75% {
        transform: translate(40px, 20px) scale(1.1);
        opacity: 0.12;
    }
}

/* ============================================================================
   MAIN CONTAINER
   ============================================================================ */
.fcp-login-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 480px;
    padding: 50px 40px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg), var(--shadow-glow-green);
    animation: containerSlideIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

/* ============================================================================
   HEADER SECTION
   ============================================================================ */
.fcp-login-header {
    text-align: center;
    margin-bottom: 40px;
}

/* Logo */
.fcp-logo-wrapper {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 24px;
}

.fcp-logo-icon {
    position: relative;
    z-index: 2;
    font-size: 80px;
    animation: logoBounce 2s ease-in-out infinite;
    filter: drop-shadow(0 4px 12px var(--client-glow));
    display: block;
    line-height: 1;
}

.fcp-logo-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, var(--client-glow) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 1;
    animation: glowPulse 2s ease-in-out infinite;
}

@keyframes logoBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes glowPulse {
    0%, 100% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.9;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

/* Title */
.fcp-login-title {
    margin-bottom: 8px;
}

.title-main {
    display: block;
    font-size: 32px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--client-light) 0%, var(--client-primary) 50%, var(--client-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    line-height: 1.2;
}

.title-sub {
    display: block;
    font-size: 16px;
    color: var(--duo-text-muted);
    font-weight: 500;
    line-height: 1.4;
}

/* ============================================================================
   ERROR MESSAGE
   ============================================================================ */
.fcp-error-message {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(220, 38, 38, 0.1) 100%);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    margin-bottom: 24px;
    color: #fca5a5;
    font-weight: 600;
    font-size: 14px;
    text-align: center;
    animation: shake 0.4s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

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

/* ============================================================================
   PENDING ACTIVATION ALERT (Info Style)
   ============================================================================ */
.fcp-alert-pending {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid #f59e0b;
    border-right: 4px solid #f59e0b;
    border-radius: var(--radius-md);
    padding: 18px 20px;
    margin-bottom: 24px;
    color: #92400e;
    font-size: 14px;
    text-align: right;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.15);
    animation: fadeInUp 0.4s ease-out;
}

.fcp-alert-pending .alert-icon {
    font-size: 24px;
    line-height: 1;
    flex-shrink: 0;
    animation: pulse 2s ease-in-out infinite;
}

.fcp-alert-pending .alert-content {
    flex: 1;
}

.fcp-alert-pending .alert-title {
    display: block;
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 6px;
    color: #78350f;
}

.fcp-alert-pending .alert-message {
    margin: 0;
    line-height: 1.6;
    color: #92400e;
    font-size: 14px;
}

/* ============================================================================
   INFO ALERT (Blue Info Style for Pending Activation)
   ============================================================================ */
.fcp-alert-info {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 1px solid #f59e0b;
    border-right: 4px solid #f59e0b;
    border-radius: var(--radius-md);
    padding: 18px 20px;
    margin-bottom: 24px;
    color: #92400e;
    font-size: 14px;
    text-align: right;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.15);
    animation: fadeInUp 0.4s ease-out;
}

.fcp-alert-info .alert-icon {
    font-size: 24px;
    line-height: 1;
    flex-shrink: 0;
    animation: pulse 2s ease-in-out infinite;
}

.fcp-alert-info .alert-content {
    flex: 1;
}

.fcp-alert-info .alert-title {
    display: block;
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 6px;
    color: #78350f;
}

.fcp-alert-info .alert-message {
    margin: 0;
    line-height: 1.6;
    color: #92400e;
    font-size: 14px;
}

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

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* ============================================================================
   FORM STYLES
   ============================================================================ */
.fcp-login-form {
    margin-bottom: 24px;
}

.fcp-form-group {
    margin-bottom: 24px;
}

.fcp-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 15px;
    color: var(--duo-text-secondary);
}

.label-icon {
    font-size: 20px;
    line-height: 1;
}

/* Input Wrapper */
.fcp-input-wrapper {
    position: relative;
}

.fcp-input {
    width: 100%;
    padding: 16px 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--duo-text-primary);
    font-size: 16px;
    font-family: 'Cairo', sans-serif;
    font-weight: 500;
    transition: all var(--transition-base);
    outline: none;
}

.fcp-input::placeholder {
    color: var(--duo-text-subtle);
}

.fcp-input:focus {
    border-color: var(--client-primary);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: var(--shadow-glow-green), var(--shadow-md);
    transform: translateY(-2px);
}

.fcp-input:hover:not(:focus) {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
}

/* Remember Me Checkbox */
.fcp-remember {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
    padding: 12px 0;
}

.fcp-checkbox {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkbox-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.checkbox-custom {
    width: 22px;
    height: 22px;
    background: rgba(255, 255, 255, 0.04);
    border: 2px solid var(--glass-border);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
    flex-shrink: 0;
}

.fcp-checkbox:checked + .checkbox-custom {
    background: var(--client-primary);
    border-color: var(--client-primary);
    box-shadow: var(--shadow-glow-green);
}

.checkbox-custom::after {
    content: '✓';
    color: white;
    font-size: 14px;
    font-weight: bold;
    opacity: 0;
    transform: scale(0);
    transition: all var(--transition-bounce);
}

.fcp-checkbox:checked + .checkbox-custom::after {
    opacity: 1;
    transform: scale(1);
}

.checkbox-label {
    font-size: 14px;
    color: var(--duo-text-muted);
    font-weight: 500;
    cursor: pointer;
}

/* ============================================================================
   SUBMIT BUTTON
   ============================================================================ */
.fcp-btn-login {
    width: 100%;
    padding: 18px 24px;
    background: linear-gradient(135deg, var(--client-primary), var(--client-dark));
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-size: 18px;
    font-weight: 800;
    font-family: 'Cairo', sans-serif;
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-btn), var(--shadow-glow-green);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.fcp-btn-login::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;
}

.fcp-btn-login:hover {
    background: linear-gradient(135deg, var(--client-light), var(--client-primary));
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(16, 185, 129, 0.35), var(--shadow-glow-green);
}

.fcp-btn-login:hover::before {
    left: 100%;
}

.fcp-btn-login:active {
    transform: translateY(0);
}

.fcp-btn-login.loading {
    pointer-events: none;
    opacity: 0.7;
}

.fcp-btn-login.loading .btn-text::after {
    content: '...';
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* ============================================================================
   FOOTER LINKS
   ============================================================================ */
.fcp-footer-links {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid var(--glass-border);
}

.fcp-footer-links p {
    font-size: 14px;
    color: var(--duo-text-muted);
    margin-bottom: 12px;
    line-height: 1.6;
}

.fcp-footer-links a {
    color: var(--client-primary);
    text-decoration: none;
    font-weight: 600;
    transition: all var(--transition-fast);
    position: relative;
}

.fcp-footer-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--client-primary);
    transition: width var(--transition-base);
}

.fcp-footer-links a:hover {
    color: var(--client-light);
}

.fcp-footer-links a:hover::after {
    width: 100%;
}

.fcp-link-divider {
    margin: 0 10px;
    color: var(--duo-text-subtle);
}

/* ============================================================================
   RESPONSIVE DESIGN
   ============================================================================ */
@media (max-width: 480px) {
    .fcp-login-container {
        padding: 40px 24px;
    }

    .title-main {
        font-size: 26px;
    }

    .title-sub {
        font-size: 14px;
    }

    .fcp-logo-icon {
        font-size: 60px;
    }

    .fcp-logo-wrapper {
        width: 80px;
        height: 80px;
    }

    .fcp-btn-login {
        font-size: 16px;
        padding: 16px 20px;
    }

    .fcp-input {
        padding: 14px 16px;
        font-size: 15px;
    }
}

/* ============================================================================
   BROWSER COMPATIBILITY
   ============================================================================ */

/* Safari Fallback */
@supports not (backdrop-filter: blur(20px)) {
    .fcp-login-container {
        background: rgba(26, 31, 46, 0.95);
    }
}

/* Firefox Adjustments */
@-moz-document url-prefix() {
    .fcp-input {
        padding: 15px 18px;
    }
}

/* IE11 Fallback */
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
    .fcp-login-container {
        background: #1a1f2e;
    }
    .title-main {
        color: var(--client-primary);
    }
}
