/* ============================================================================
   ROLE SELECTOR PAGE - GAMIFICATION CSS
   صفحة اختيار الدور - تصميم Gamification
   @package FitnessCoachPro
   @version 3.0
   ============================================================================ */

/* ============================================================================
   CSS VARIABLES - GAMIFICATION COLORS
   ============================================================================ */
: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-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 {
    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-role-wrapper {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow: hidden;
}

.fcp-role-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(168, 85, 247, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(28, 176, 246, 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;
}

.particle:nth-child(2) {
    left: 30%;
    top: 60%;
    animation-delay: 2s;
    animation-duration: 18s;
}

.particle:nth-child(3) {
    left: 70%;
    top: 30%;
    animation-delay: 4s;
    animation-duration: 15s;
}

.particle:nth-child(4) {
    left: 50%;
    top: 80%;
    animation-delay: 6s;
    animation-duration: 20s;
}

.particle:nth-child(5) {
    left: 90%;
    top: 50%;
    animation-delay: 8s;
    animation-duration: 14s;
}

@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-role-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 920px;
    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: 50px 40px;
    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 & LOGO
   ============================================================================ */
.fcp-role-header {
    text-align: center;
    margin-bottom: 50px;
}

.fcp-logo-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 24px;
}

.fcp-logo-icon {
    font-size: 90px;
    line-height: 1;
    position: relative;
    z-index: 2;
    animation: logoBounce 2s ease-in-out infinite;
    filter: drop-shadow(0 4px 12px rgba(88, 204, 2, 0.4));
}

@keyframes logoBounce {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-10px) scale(1.05);
    }
}

.fcp-logo-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 140px;
    height: 140px;
    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-role-title {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.title-main {
    font-size: 38px;
    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: 18px;
    font-weight: 600;
    color: var(--duo-text-secondary);
}

/* ============================================================================
   XP PREVIEW BADGE
   ============================================================================ */
.fcp-xp-preview {
    margin-bottom: 40px;
    display: flex;
    justify-content: center;
}

.xp-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 24px;
    box-shadow: var(--shadow-glow-gold);
    animation: xpPulse 2s ease-in-out infinite;
}

@keyframes xpPulse {
    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);
    }
}

.xp-icon {
    font-size: 24px;
    filter: drop-shadow(0 2px 4px rgba(255, 200, 0, 0.5));
}

.xp-text {
    font-size: 15px;
    font-weight: 700;
    color: var(--duo-yellow);
    text-shadow: 0 0 10px rgba(255, 200, 0, 0.5);
}

/* ============================================================================
   ROLE BUTTONS - GAMIFICATION STYLE
   ============================================================================ */
.fcp-role-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.fcp-role-btn {
    position: relative;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 40px 24px;
    text-decoration: none;
    color: var(--duo-text);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
    overflow: hidden;
    animation: fadeInUp 0.6s ease-out;
}

.fcp-role-btn:nth-child(2) {
    animation-delay: 0.15s;
}

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

/* Trainer Button - Red Theme */
.fcp-role-btn.trainer {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.05) 100%);
    border-color: rgba(239, 68, 68, 0.2);
}

.fcp-role-btn.trainer:hover {
    border-color: rgba(239, 68, 68, 0.6);
    box-shadow: 0 8px 32px rgba(239, 68, 68, 0.4), var(--shadow-md);
    transform: translateY(-8px) scale(1.02);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(220, 38, 38, 0.08) 100%);
}

.fcp-role-btn.trainer .fcp-role-icon {
    filter: drop-shadow(0 4px 12px rgba(239, 68, 68, 0.5));
}

/* Client Button - Green Theme */
.fcp-role-btn.client {
    background: linear-gradient(135deg, rgba(88, 204, 2, 0.1) 0%, rgba(70, 163, 2, 0.05) 100%);
    border-color: rgba(88, 204, 2, 0.2);
}

.fcp-role-btn.client:hover {
    border-color: rgba(88, 204, 2, 0.6);
    box-shadow: 0 8px 32px var(--duo-green-glow), var(--shadow-md);
    transform: translateY(-8px) scale(1.02);
    background: linear-gradient(135deg, rgba(88, 204, 2, 0.15) 0%, rgba(70, 163, 2, 0.08) 100%);
}

.fcp-role-btn.client .fcp-role-icon {
    filter: drop-shadow(0 4px 12px var(--duo-green-glow));
}

.fcp-role-icon {
    font-size: 80px;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.fcp-role-btn:hover .fcp-role-icon {
    transform: scale(1.15) rotate(5deg);
}

.fcp-role-btn h2 {
    font-size: 28px;
    font-weight: 900;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.fcp-role-btn p {
    font-size: 16px;
    font-weight: 600;
    color: var(--duo-text-secondary);
    margin-bottom: 0;
    position: relative;
    z-index: 1;
    line-height: 1.5;
}

/* Glow effect on hover */
.fcp-role-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
    z-index: 0;
}

.fcp-role-btn:hover::before {
    width: 300px;
    height: 300px;
}

/* ============================================================================
   FEATURES SECTION
   ============================================================================ */
.fcp-features-section {
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid var(--glass-border);
}

.fcp-features-title {
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--duo-text-muted);
    margin-bottom: 24px;
    letter-spacing: 0.5px;
}

.fcp-features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.fcp-feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    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;
}

.fcp-feature-item:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-4px);
    box-shadow: var(--shadow-sm);
}

.feature-icon {
    font-size: 32px;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
    animation: featureFloat 3s ease-in-out infinite;
}

.fcp-feature-item:nth-child(2) .feature-icon {
    animation-delay: 0.5s;
}

.fcp-feature-item:nth-child(3) .feature-icon {
    animation-delay: 1s;
}

.fcp-feature-item:nth-child(4) .feature-icon {
    animation-delay: 1.5s;
}

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

.feature-text {
    font-size: 13px;
    font-weight: 600;
    color: var(--duo-text-secondary);
    text-align: center;
    line-height: 1.4;
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */
@media (max-width: 992px) {
    .fcp-role-buttons {
        max-width: 700px;
        gap: 24px;
    }

    .fcp-role-btn {
        padding: 36px 20px;
    }
}

@media (max-width: 768px) {
    .fcp-role-container {
        padding: 40px 28px;
        margin: 16px;
    }

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

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

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

    .fcp-role-buttons {
        grid-template-columns: 1fr;
        gap: 20px;
        max-width: 100%;
    }

    .fcp-role-btn {
        padding: 36px 24px;
    }

    .fcp-role-icon {
        font-size: 70px;
    }

    .fcp-role-btn h2 {
        font-size: 26px;
    }

    .fcp-role-btn p {
        font-size: 15px;
    }

    .fcp-features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .fcp-role-wrapper {
        padding: 16px;
    }

    .fcp-role-container {
        padding: 32px 20px;
        margin: 12px;
    }

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

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

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

    .xp-badge {
        padding: 10px 18px;
    }

    .xp-icon {
        font-size: 20px;
    }

    .xp-text {
        font-size: 13px;
    }

    .fcp-role-btn {
        padding: 32px 20px;
    }

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

    .fcp-role-btn h2 {
        font-size: 24px;
    }

    .fcp-role-btn p {
        font-size: 14px;
    }

    .fcp-features-grid {
        grid-template-columns: 1fr;
    }

    .feature-icon {
        font-size: 28px;
    }

    .feature-text {
        font-size: 12px;
    }
}

/* ============================================================================
   BROWSER COMPATIBILITY
   ============================================================================ */
/* Safari */
@supports (-webkit-appearance: none) {
    .fcp-role-container,
    .fcp-role-btn {
        -webkit-backdrop-filter: blur(20px);
    }
}

/* Firefox */
@-moz-document url-prefix() {
    .fcp-role-container {
        background: rgba(26, 44, 53, 0.95);
    }
}

/* IE11 Fallback */
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
    .fcp-role-container {
        background: rgba(26, 44, 53, 0.95);
    }
}
