/* ============================================================
   57Challenges.css — الأنماط الخاصة بصفحة 57Challenges.html
   يُحمَّل بعد الملفات المشتركة، فأي قاعدة هنا تتجاوزها.
   ============================================================ */

/* ============================================================
   57Challenges.css — الأنماط الخاصة بصفحة 57Challenges.html
   يُحمَّل بعد الملفات المشتركة، فأي قاعدة هنا تتجاوزها.
   ============================================================ */

:root {
    --status-completed: #4ade80;
    --status-pending: #f87171;
    --star-gold: #FFD700;
    --star-empty: #3a3a3a;
}

[data-theme="light"] {
    --glow-cyan-intense: 0 4px 30px rgba(0, 168, 204, 0.3);
    --star-empty: #d0d0d0;
}

/* Page Header */

.page-header {
    padding: 140px 20px 60px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.page-title {
    font-family: var(--font-body);
    font-size: clamp(2.5rem, 6vw, 4rem);
    text-align: center;
    margin-bottom: 30px;
    color: #00D4FF;
    text-shadow: 0 0 30px rgba(0, 212, 255, 0.5), 0 0 60px rgba(0, 212, 255, 0.3);
    letter-spacing: normal;
    animation: titleGlow 3s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    from { text-shadow: 0 0 20px rgba(0, 212, 255, 0.4), 0 0 40px rgba(0, 212, 255, 0.2); }
    to { text-shadow: 0 0 40px rgba(0, 212, 255, 0.8), 0 0 80px rgba(0, 212, 255, 0.4); }
}

.page-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 720px;
    margin: 0 auto;
}

/* Challenges Section */

.challenges-section {
    padding: 60px 20px 60px;
    position: relative;
    z-index: 1;
}

.challenges-section:last-of-type {
    padding-bottom: 100px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    font-weight: 700;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: var(--gradient-neon);
    border-radius: 2px;
}

.section-title .accent {
    color: var(--neon-cyan);
    text-shadow: var(--glow-text);
}

/* Challenges Grid */

.challenges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

/* Challenge Card */

.challenge-card {
    display: block;
    text-decoration: none;
    color: inherit;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    overflow: hidden;
    transition: all var(--transition-normal);
    position: relative;
}

.challenge-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-neon);
    transform: scaleX(0);
    transition: transform var(--transition-normal);
    z-index: 2;
}

.challenge-card:hover {
    border-color: var(--border-glow);
    transform: translateY(-8px);
    box-shadow: var(--glow-cyan);
}

.challenge-card:hover::before {
    transform: scaleX(1);
}

/* Status Badge */

.challenge-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 50px;
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 700;
    backdrop-filter: blur(10px);
}

.challenge-badge .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.challenge-badge.active {
    background: rgba(74, 222, 128, 0.15);
    border: 1px solid rgba(74, 222, 128, 0.5);
    color: #4ade80;
}

.challenge-badge.active .dot {
    background: #4ade80;
    box-shadow: 0 0 8px rgba(74, 222, 128, 0.8);
    animation: pulseDot 1.5s ease-in-out infinite;
}

.challenge-badge.ended {
    background: rgba(248, 113, 113, 0.15);
    border: 1px solid rgba(248, 113, 113, 0.5);
    color: #f87171;
}

.challenge-badge.ended .dot {
    background: #f87171;
}

@keyframes pulseDot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* Challenge Image */

.challenge-image {
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, var(--bg-tertiary), var(--bg-secondary));
}

.challenge-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

.challenge-card:hover .challenge-image img {
    transform: scale(1.08);
}

.challenge-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-tertiary), var(--bg-secondary));
}

.challenge-image-placeholder svg {
    width: 60px;
    height: 60px;
    color: var(--text-muted);
    opacity: 0.5;
}

/* Challenge Content */

.challenge-content {
    padding: 25px;
}

.challenge-name {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 14px;
    line-height: 1.4;
    text-align: center;
}

.challenge-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 20px;
    text-align: center;
}

.challenge-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding-top: 18px;
    border-top: 1px solid var(--border-subtle);
    color: var(--neon-cyan);
    font-weight: 700;
    font-size: 0.95rem;
    transition: gap var(--transition-fast);
}

.challenge-card:hover .challenge-cta {
    gap: 14px;
}

.challenge-cta svg {
    width: 18px;
    height: 18px;
}

/* Empty State */

.empty-state {
    text-align: center;
    padding: 70px 20px;
    color: var(--text-muted);
    background: var(--bg-card);
    border: 1px dashed var(--border-accent);
    border-radius: var(--radius-lg);
}

.empty-state svg {
    width: 70px;
    height: 70px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 1.05rem;
}

@media (max-width: 768px) {
    .page-header {
        padding: 120px 20px 50px;
    }

    .challenges-grid {
        grid-template-columns: 1fr;
    }

    .challenges-section {
        padding: 50px 15px 50px;
    }

    .challenges-section:last-of-type {
        padding-bottom: 80px;
    }
}

@media (max-width: 480px) {
    .page-title {
        letter-spacing: normal;
    }
}
