/* Coding Challenges Page Specific Styles */
.challenge-hero {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: white;
    padding: 8rem 2rem;
    text-align: center;
    position: relative;
}

.challenge-hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.challenge-hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.challenge-hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
}

/* Layout */
.challenge-container {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
    margin: 2rem auto;
    max-width: 1200px;
    padding: 0 1rem;
}

/* Sidebar Styles */
.challenge-sidebar {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    height: fit-content;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.filter-group {
    margin-bottom: 1rem;
}

.filter-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.filter-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background-color: white;
}

/* Main Content */
.challenge-main {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.challenge-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.challenge-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
}

.challenge-meta {
    display: flex;
    gap: 1rem;
}

.difficulty,
.category {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}

.difficulty[data-level="beginner"] { background: #dcfce7; color: #16a34a; }
.difficulty[data-level="medium"] { background: #fef9c3; color: #ca8a04; }
.difficulty[data-level="advanced"] { background: #fee2e2; color: #dc2626; }
.category { background: #e0e7ff; color: #4f46e5; }

.challenge-task {
    font-size: 1.125rem;
    line-height: 1.6;
    color: #374151;
    margin-bottom: 2rem;
}

.challenge-navigation {
    display: flex;
    justify-content: space-between;
    margin: 2rem 0;
    padding: 2rem 0;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: #4f46e5;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-primary:hover {
    background: #4338ca;
}

/* Article Section Styles */
.challenge-article {
    margin-top: 3rem;
    padding: 2rem;
    background: #f8fafc;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.challenge-article h2 {
    font-size: 2rem;
    color: #1f2937;
    margin-bottom: 2rem;
    text-align: center;
    position: relative;
    padding-bottom: 1rem;
}

.challenge-article h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: #4f46e5;
    border-radius: 2px;
}

.challenge-article section {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
}

.challenge-article h3 {
    font-size: 1.25rem;
    color: #1f2937;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.challenge-article h3::before {
    content: '';
    display: block;
    width: 4px;
    height: 24px;
    background: #4f46e5;
    border-radius: 2px;
}

.challenge-article p {
    color: #4b5563;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.challenge-article ul {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.challenge-article li {
    color: #4b5563;
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
    position: relative;
    display: flex;
    align-items: center;
}

.challenge-article li::before {
    content: '→';
    color: #4f46e5;
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* Advertisement Spaces */
.ad-space {
    margin: 2rem 0;
    padding: 2rem;
    background: #f8fafc;
    border-radius: 8px;
    text-align: center;
    border: 2px dashed #e5e7eb;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .challenge-container {
        grid-template-columns: 1fr;
    }

    .challenge-sidebar {
        position: static;
        margin-bottom: 2rem;
    }

    .challenge-article section {
        padding: 1.25rem;
    }
}

@media (max-width: 640px) {
    .challenge-hero {
        padding: 3rem 1rem;
    }

    .challenge-hero h1 {
        font-size: 2rem;
    }

    .challenge-main {
        padding: 1.5rem;
    }

    .challenge-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .challenge-navigation {
        flex-direction: column;
        gap: 1rem;
    }

    .btn-primary {
        width: 100%;
        justify-content: center;
    }

    .challenge-article {
        padding: 1.5rem;
    }

    .challenge-article h2 {
        font-size: 1.5rem;
    }

    .challenge-article section {
        padding: 1rem;
    }
}