/* ============================================
   CHALLENGES PAGE STYLES
   Multi-Color Theme - Interactive Challenges
   ============================================ */

.challenges-page {
    background: #0a0a0a;
    color: #fff;
}

/* Intro Overlay */
.challenges-intro {
    background: #050505;
}

.challenges-grid {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 40px 40px;
}

.challenges-text {
    font-size: clamp(3rem, 12vw, 10rem);
    font-weight: 900;
    background: linear-gradient(135deg, #ff4444, #4488ff, #44ff88, #ffcc44);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 2;
}

.challenges-subtext {
    font-size: 1.2rem;
    opacity: 0.7;
    margin-top: 1rem;
    letter-spacing: 0.3rem;
    text-transform: uppercase;
    position: relative;
    z-index: 2;
}

/* Progress Bar */
.challenges-progress {
    background: linear-gradient(90deg, #ff4444, #4488ff, #44ff88, #ffcc44);
    background-size: 200% 100%;
    animation: progressRainbow 3s linear infinite;
}

@keyframes progressRainbow {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

/* Navigation */
.challenges-nav .nav-links a.active {
    background: linear-gradient(135deg, #ff4444, #4488ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Background */
.challenges-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

#challengesCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Hero Section */
.challenges-hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 2rem;
    background: radial-gradient(ellipse at center, rgba(100, 100, 100, 0.2) 0%, transparent 70%);
}

.challenges-icon {
    font-size: 5rem;
    background: linear-gradient(135deg, #ff4444, #4488ff, #44ff88);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 2rem;
    animation: trophyShine 3s ease infinite;
}

@keyframes trophyShine {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.3); }
}

.challenges-hero .hero-title {
    font-size: clamp(3rem, 10vw, 8rem);
    font-weight: 900;
    letter-spacing: 0.5rem;
    background: linear-gradient(135deg, #ff4444, #4488ff, #44ff88, #ffcc44);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
}

.challenges-hero .hero-subtitle {
    font-size: 1.3rem;
    opacity: 0.8;
    max-width: 600px;
    text-align: center;
    margin-bottom: 3rem;
}

.hero-stats {
    display: flex;
    gap: 4rem;
    justify-content: center;
}

.hero-stat {
    text-align: center;
}

.hero-stat .stat-value {
    display: block;
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, #ff4444, #4488ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-stat .stat-label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.7;
}

.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    opacity: 0.6;
    animation: fadeInUp 1s ease 1s both;
}

.scroll-indicator i {
    animation: bounce 1.5s ease infinite;
}

/* Featured Challenge */
.featured-challenge {
    padding: 8rem 2rem;
}

.featured-tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #ff4444, #ff8844);
    color: #fff;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-radius: 0.25rem;
    margin-bottom: 1rem;
}

.stroop-test {
    max-width: 600px;
    margin: 4rem auto 0;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 1.5rem;
    padding: 3rem;
    text-align: center;
}

.stroop-display {
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
}

.stroop-word {
    font-size: 5rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.5rem;
    transition: all 0.3s ease;
}

.stroop-controls {
    margin-bottom: 2rem;
}

.stroop-instruction {
    font-size: 1.1rem;
    opacity: 0.8;
    margin-bottom: 1.5rem;
}

.color-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.color-btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 0.5rem;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.color-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.stroop-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
}

.stroop-stat {
    text-align: center;
}

.stroop-stat .label {
    display: block;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.6;
    margin-bottom: 0.5rem;
}

.stroop-stat .value {
    font-size: 2rem;
    font-weight: 700;
    color: #44ff88;
}

/* Challenges Grid Section */
.challenges-grid-section {
    padding: 8rem 2rem;
}

.challenge-categories {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 3rem 0;
    flex-wrap: wrap;
}

.category-btn {
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    color: #fff;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-btn:hover, .category-btn.active {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.challenges-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.challenge-card {
    padding: 2rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    cursor: pointer;
}

.challenge-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

.challenge-card.hidden {
    display: none;
}

.challenge-icon {
    width: 60px;
    height: 60px;
    border-radius: 1rem;
    background: linear-gradient(135deg, rgba(255, 68, 68, 0.2), rgba(68, 136, 255, 0.2));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.challenge-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.challenge-card p {
    font-size: 0.95rem;
    opacity: 0.7;
    margin-bottom: 1rem;
}

.challenge-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.7;
}

/* Reaction Test Section */
.reaction-section {
    padding: 8rem 2rem;
}

.reaction-test {
    max-width: 600px;
    margin: 4rem auto 0;
}

.reaction-area {
    height: 300px;
    background: rgba(255, 68, 68, 0.2);
    border: 3px solid rgba(255, 68, 68, 0.5);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.1s ease;
    margin-bottom: 2rem;
}

.reaction-area.waiting {
    background: rgba(255, 204, 68, 0.2);
    border-color: rgba(255, 204, 68, 0.5);
}

.reaction-area.ready {
    background: rgba(68, 255, 136, 0.3);
    border-color: #44ff88;
}

.reaction-area.too-soon {
    background: rgba(255, 68, 68, 0.3);
    border-color: #ff4444;
}

.reaction-text {
    font-size: 2rem;
    font-weight: 700;
}

.reaction-results {
    display: flex;
    justify-content: center;
    gap: 3rem;
}

.result-item {
    text-align: center;
}

.result-item .label {
    display: block;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.6;
    margin-bottom: 0.5rem;
}

.result-item .value {
    font-size: 2rem;
    font-weight: 700;
    color: #44ff88;
}

/* Memory Section */
.memory-section {
    padding: 8rem 2rem;
}

.memory-test {
    max-width: 500px;
    margin: 4rem auto 0;
    text-align: center;
}

.memory-display {
    height: 150px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(68, 136, 255, 0.3);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
}

.memory-number {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: 0.5rem;
    color: #4488ff;
}

.memory-input {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.memory-input input {
    flex: 1;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    color: #fff;
    font-size: 1.5rem;
    text-align: center;
    letter-spacing: 0.3rem;
}

.memory-input input:focus {
    outline: none;
    border-color: #4488ff;
}

.memory-input button {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #4488ff, #004488);
    border: none;
    border-radius: 0.5rem;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.memory-input button:hover {
    transform: scale(1.05);
}

.memory-btn {
    padding: 1rem 3rem;
    background: linear-gradient(135deg, #4488ff, #004488);
    border: none;
    border-radius: 50px;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.memory-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(68, 136, 255, 0.3);
}

.memory-level {
    margin-top: 1.5rem;
    font-size: 1.1rem;
    color: #4488ff;
}

/* Stats Section */
.stats-section {
    padding: 6rem 2rem;
}

.challenges-page .stat-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.challenges-page .stat-number {
    background: linear-gradient(135deg, #ff4444, #4488ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* CTA Section */
.challenges-cta-section {
    background: linear-gradient(180deg, #0a0a0a 0%, #000000 100%);
}

.challenges-cta-section .cta-title {
    background: linear-gradient(135deg, #ff4444, #4488ff, #44ff88);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-secondary {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.cta-secondary::before {
    background: rgba(255, 255, 255, 0.1);
}

.cta-secondary:hover {
    color: #fff;
}

/* Footer */
.challenges-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-stats {
        gap: 2rem;
    }
    
    .hero-stat .stat-value {
        font-size: 2rem;
    }
    
    .stroop-word {
        font-size: 3rem;
    }
    
    .color-buttons {
        gap: 0.5rem;
    }
    
    .color-btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .reaction-area {
        height: 200px;
    }
    
    .reaction-text {
        font-size: 1.5rem;
    }
    
    .memory-number {
        font-size: 2rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
}
