/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'JetBrains Mono', monospace;
    background: #0a0a0a;
    color: #ffffff;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

/* Particle canvas background */
#particleCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: radial-gradient(ellipse at center, #1a0d2e 0%, #0a0a0a 100%);
}

/* Main container */
.container {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Main header */
.main-header {
    text-align: center;
    margin-bottom: 4rem;
    margin-top: 2rem;
}

.neon-title {
    font-size: clamp(1.8rem, 4vw, 3.5rem);
    font-weight: 700;
    color: #e94dc7;
    text-shadow: 
        0 0 3px #e94dc7,
        0 0 6px #e94dc7,
        0 0 10px #c44bd4;
    animation: neonFlicker 3s infinite alternate;
    letter-spacing: 0.1em;
    line-height: 1.2;
}

@keyframes neonFlicker {
    0%, 100% {
        text-shadow: 
            0 0 3px #e94dc7,
            0 0 6px #e94dc7,
            0 0 10px #c44bd4;
    }
    50% {
        text-shadow: 
            0 0 2px #e94dc7,
            0 0 4px #e94dc7,
            0 0 7px #c44bd4;
    }
}

/* Challenges section */
.challenges-section {
    flex-grow: 1;
    width: 100%;
    max-width: 800px;
}

.challenges-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.challenge-item {
    background: rgba(30, 15, 50, 0.3);
    border: 1px solid rgba(169, 85, 247, 0.3);
    border-radius: 10px;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(10px);
    box-shadow: 
        0 4px 15px rgba(169, 85, 247, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.challenge-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(169, 85, 247, 0.1), transparent);
    transition: left 0.5s;
}

.challenge-item:hover::before {
    left: 100%;
}

.challenge-item:hover {
    border-color: rgba(233, 77, 199, 0.6);
    box-shadow: 
        0 4px 15px rgba(169, 85, 247, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 0 15px rgba(233, 77, 199, 0.2);
    transform: translateY(-2px);
}

.challenge-name {
    font-size: 1rem;
    font-weight: 400;
    color: #c3b5e8;
    flex-grow: 1;
    margin-right: 1rem;
}

.challenge-link {
    color: #e94dc7;
    text-decoration: none;
    font-weight: 500;
    position: relative;
    padding: 0.5rem 1rem;
    border: 1px solid rgba(233, 77, 199, 0.5);
    border-radius: 5px;
    transition: all 0.3s ease;
    background: rgba(233, 77, 199, 0.1);
    white-space: nowrap;
}

.challenge-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #e94dc7, #a855f7, #c44bd4);
    transition: width 0.3s ease;
}

.challenge-link:hover {
    color: #ffffff;
    text-shadow: 0 0 5px #e94dc7;
    border-color: #e94dc7;
    box-shadow: 
        0 0 10px rgba(233, 77, 199, 0.3),
        inset 0 0 10px rgba(233, 77, 199, 0.1);
    background: rgba(233, 77, 199, 0.2);
    animation: glitch 0.3s ease-in-out;
}

.challenge-link:hover::after {
    width: 100%;
}

@keyframes glitch {
    0% { transform: translate(0); }
    20% { transform: translate(-1px, 1px); }
    40% { transform: translate(-1px, -1px); }
    60% { transform: translate(1px, 1px); }
    80% { transform: translate(1px, -1px); }
    100% { transform: translate(0); }
}

/* Footer */
.main-footer {
    margin-top: 4rem;
    text-align: center;
    border-top: 1px solid rgba(169, 85, 247, 0.3);
    padding-top: 2rem;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-credits, .footer-author {
    font-size: 0.9rem;
    color: #8b7aa8;
}

.footer-link {
    color: #c44bd4;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.footer-link:hover {
    color: #e94dc7;
    text-shadow: 0 0 4px #e94dc7;
}

.footer-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: #e94dc7;
    transition: width 0.3s ease;
}

.footer-link:hover::after {
    width: 100%;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .main-header {
        margin-bottom: 3rem;
        margin-top: 1rem;
    }
    
    .challenge-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 1rem;
    }
    
    .challenge-name {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }
    
    .challenge-link {
        align-self: stretch;
        text-align: center;
    }
    
    .footer-content {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .challenges-list {
        gap: 1rem;
    }
    
    .challenge-item {
        padding: 0.8rem;
    }
    
    .challenge-name {
        font-size: 0.9rem;
        line-height: 1.4;
    }
    
    .challenge-link {
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    .neon-title {
        animation: none;
    }
    
    .challenge-item::before {
        display: none;
    }
    
    .challenge-link:hover {
        animation: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .challenge-item {
        border-color: #ffffff;
        background: rgba(0, 0, 0, 0.8);
    }
    
    .challenge-name {
        color: #ffffff;
    }
    
    .challenge-link {
        border-color: #ffffff;
        color: #ffffff;
    }
}
