/* Public Styles - RTL */
.fcf-container {
    direction: rtl;
    text-align: right;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.fcf-title {
    text-align: center;
    margin-bottom: 30px;
    color: #d1ad5d;
    font-size: 28px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(209, 173, 93, 0.2);
}

.fcf-categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.fcf-category-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    position: relative;
    border: 1px solid rgba(0,0,0,0.05);
}

.fcf-category-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

.fcf-category-image {
    width: 100%;
    height: 500px;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.fcf-category-image img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    transition: transform 0.4s ease;
    display: block;
}

.fcf-category-card:hover .fcf-category-image img {
    transform: scale(1.1);
}

.fcf-category-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 20px;
    position: relative;
}

.fcf-category-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255,255,255,0.3);
}

.fcf-category-header h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.fcf-category-body {
    padding: 20px;
    flex-grow: 1;
}

.fcf-category-description {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.6;
}

.fcf-category-stats {
    margin-top: 15px;
}

.fcf-card-count {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    color: #555;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.fcf-card-count svg {
    opacity: 0.7;
}

.fcf-category-footer {
    padding: 20px;
    border-top: 1px solid rgba(0,0,0,0.05);
    background: #fafafa;
}

.fcf-start-btn {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    position: relative;
    overflow: hidden;
}

.fcf-start-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.fcf-start-btn:hover:not(:disabled)::before {
    width: 300px;
    height: 300px;
}

.fcf-start-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.fcf-start-btn:active:not(:disabled) {
    transform: translateY(0);
}

.fcf-start-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

.fcf-start-btn svg {
    transition: transform 0.3s ease;
}

.fcf-start-btn:hover:not(:disabled) svg {
    transform: translateX(-3px);
}

/* Modal Styles */
.fcf-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.9) 0%, rgba(118, 75, 162, 0.9) 100%);
    backdrop-filter: blur(10px);
}

.fcf-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.fcf-modal-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    margin: auto;
    border-radius: 24px;
    width: 90%;
    max-width: 650px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: modalFadeIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255,255,255,0.2);
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.fcf-modal-header {
    padding: 25px 30px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.fcf-modal-header h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.fcf-close-modal {
    color: #fff;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: all 0.3s ease;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
}

.fcf-close-modal:hover {
    transform: rotate(90deg);
    background: rgba(255,255,255,0.2);
}

.fcf-modal-body {
    padding: 40px;
    direction: rtl;
    text-align: right;
}

/* Start Screen */
.fcf-start-screen {
    text-align: center;
    padding: 20px 0;
}

.fcf-start-icon {
    margin: 0 auto 30px;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    animation: pulse 2s infinite;
}

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

.fcf-start-title {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
}

.fcf-start-description {
    font-size: 16px;
    color: #666;
    margin-bottom: 35px;
    line-height: 1.6;
}

.fcf-btn-start {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 16px 40px;
    font-size: 18px;
    font-weight: 700;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
}

.fcf-btn-start:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

.fcf-btn-start svg {
    transition: transform 0.3s ease;
}

.fcf-btn-start:hover svg {
    transform: translateX(3px);
}

/* Game Styles */
.fcf-progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    margin-bottom: 30px;
    overflow: hidden;
}

.fcf-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
    width: 0%;
}

.fcf-card-wrapper {
    position: relative;
    perspective: 1000px;
    height: 300px;
    margin-bottom: 30px;
}

.fcf-card {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    transition: transform 0.6s;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.fcf-card-front {
    transform: rotateY(0deg);
}

.fcf-card-flipped {
    transform: rotateY(180deg);
}

.fcf-card-content {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 12px;
}

.fcf-card-content p {
    font-size: 20px;
    line-height: 1.8;
    color: #333;
    text-align: center;
    margin: 0;
}

.fcf-card-content {
    overflow-y: auto;
}

/* Wrong Answer Message */
.fcf-wrong-answer-message {
    text-align: center;
    margin-bottom: 25px;
    padding: 20px;
    background: linear-gradient(135deg, #fee 0%, #fdd 100%);
    border-radius: 12px;
    border: 2px solid #fcc;
}

.fcf-wrong-icon {
    display: inline-block;
    width: 50px;
    height: 50px;
    background: #dc3545;
    color: #fff;
    border-radius: 50%;
    line-height: 50px;
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 15px;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.fcf-wrong-answer-message p {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #721c24;
}

.fcf-correct-answer-content {
    font-size: 18px;
    line-height: 1.8;
    color: #155724;
    background: #d4edda;
    padding: 20px;
    border-radius: 12px;
    border: 2px solid #c3e6cb;
    text-align: center;
}

.fcf-answer-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 20px;
}

.fcf-btn {
    padding: 14px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.fcf-btn-correct {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

.fcf-btn-correct:hover {
    background: linear-gradient(135deg, #218838 0%, #1aa179 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.fcf-btn-wrong {
    background: linear-gradient(135deg, #dc3545 0%, #e83e8c 100%);
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

.fcf-btn-wrong:hover {
    background: linear-gradient(135deg, #c82333 0%, #d91a72 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
}

.fcf-btn-icon {
    font-size: 20px;
    font-weight: bold;
}

.fcf-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.fcf-btn-primary:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.fcf-feedback {
    text-align: center;
    margin: 20px 0;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fcf-feedback-icon {
    font-size: 48px;
    animation: feedbackPop 0.5s ease;
}

@keyframes feedbackPop {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

.fcf-feedback-correct {
    color: #28a745;
}

.fcf-feedback-wrong {
    color: #dc3545;
}

.fcf-next-button {
    text-align: center;
    margin-top: 20px;
}

/* Results */
.fcf-results {
    text-align: center;
    padding: 20px 0;
}

.fcf-results-icon {
    margin: 0 auto 25px;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.3);
}

.fcf-results-title {
    margin-bottom: 35px;
    color: #333;
    font-size: 26px;
    font-weight: 700;
}

.fcf-results-stats {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 35px;
}

.fcf-stat-item {
    padding: 25px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 20px;
    text-align: right;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.fcf-stat-item:hover {
    transform: translateX(-5px);
}

.fcf-stat-correct {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border: 2px solid #b1dfbb;
}

.fcf-stat-wrong {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border: 2px solid #f1b0b7;
}

.fcf-stat-icon {
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    flex-shrink: 0;
}

.fcf-stat-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.fcf-stat-label {
    font-size: 14px;
    font-weight: 600;
    opacity: 0.8;
}

.fcf-stat-value {
    font-size: 36px;
    font-weight: 700;
}

/* Responsive */
@media (max-width: 768px) {
    .fcf-categories-grid {
        grid-template-columns: 1fr;
    }
    
    .fcf-modal-content {
        width: 95%;
        margin: 10px;
    }
    
    .fcf-card-wrapper {
        height: 250px;
    }
    
    .fcf-card-content p {
        font-size: 16px;
    }
    
    .fcf-answer-buttons {
        flex-direction: column;
    }
    
    .fcf-btn {
        width: 100%;
    }
}

