/* Coding Page Specific Styles */

.page-header {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    color: white;
    padding: 3rem 0;
    text-align: center;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

/* Filter Section */
.filter-section {
    background-color: white;
    padding: 1.5rem 0;
    border-bottom: 2px solid var(--border-color);
    position: sticky;
    top: 60px;
    z-index: 100;
}

.filter-controls {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-btn {
    padding: 0.6rem 1.2rem;
    background-color: white;
    border: 2px solid var(--border-color);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.filter-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.filter-btn.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Problem Card */
.problem-card {
    background: white;
    border-radius: 10px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.problem-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.problem-card.completed {
    border-left: 5px solid var(--success-color);
}

.problem-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1.5rem;
    background-color: var(--light-color);
    border-bottom: 1px solid var(--border-color);
}

.problem-title {
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.problem-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tag {
    padding: 0.3rem 0.8rem;
    background-color: var(--secondary-color);
    color: white;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
}

.tag:nth-child(2) {
    background-color: var(--success-color);
}

.problem-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    width: 40px;
    height: 40px;
    border: 2px solid var(--border-color);
    background-color: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    font-size: 1.2rem;
}

.btn-icon:hover {
    border-color: var(--primary-color);
    background-color: var(--primary-color);
    color: white;
}

.btn-icon span {
    display: block;
}

/* Problem Description */
.problem-description {
    padding: 1.5rem;
}

.problem-description h4 {
    color: var(--secondary-color);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.problem-description h4:first-child {
    margin-top: 0;
}

.problem-description pre {
    background-color: var(--light-color);
    padding: 1rem;
    border-radius: 5px;
    overflow-x: auto;
    border-left: 4px solid var(--primary-color);
    font-size: 0.9rem;
}

.problem-description ul {
    margin-left: 1.5rem;
}

.problem-description ul li {
    margin-bottom: 0.5rem;
}

/* Solution Section */
.solution {
    padding: 1.5rem;
    background-color: #f0f8ff;
    border-top: 3px solid var(--primary-color);
}

.solution.hidden {
    display: none;
}

.solution h4 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.solution h5 {
    color: var(--dark-color);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.approach {
    margin-bottom: 2rem;
}

.approach pre {
    background-color: #2d2d2d;
    color: #f8f8f2;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    position: relative;
    font-size: 0.9rem;
    line-height: 1.5;
}

.approach code {
    font-family: 'Courier New', Courier, monospace;
}

/* Syntax highlighting colors */
.language-cpp .keyword,
.language-java .keyword,
.language-python .keyword {
    color: #66d9ef;
}

.language-cpp .string,
.language-java .string,
.language-python .string {
    color: #e6db74;
}

.language-cpp .comment,
.language-java .comment,
.language-python .comment {
    color: #75715e;
    font-style: italic;
}

.complexity {
    background-color: #fff3cd;
    padding: 1rem;
    border-radius: 5px;
    border-left: 4px solid var(--warning-color);
    margin: 1.5rem 0;
}

.complexity h5 {
    margin-top: 0;
    color: #856404;
}

.complexity ul {
    margin-left: 1.5rem;
    margin-bottom: 0;
}

.key-points {
    background-color: #d1ecf1;
    padding: 1rem;
    border-radius: 5px;
    border-left: 4px solid #17a2b8;
    margin: 1.5rem 0;
}

.key-points h5 {
    margin-top: 0;
    color: #0c5460;
}

.key-points ul {
    margin-left: 1.5rem;
    margin-bottom: 0;
}

/* More Problems Notice */
.more-problems-notice {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem;
    border-radius: 15px;
    text-align: center;
    margin-top: 2rem;
}

.more-problems-notice h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .page-header h1 {
        font-size: 1.8rem;
    }

    .filter-controls {
        gap: 0.5rem;
    }

    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .problem-header {
        flex-direction: column;
        gap: 1rem;
    }

    .problem-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .approach pre {
        font-size: 0.8rem;
        padding: 1rem;
    }
}

/* Code Copy Button */
.code-container {
    position: relative;
}

.copy-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 0.5rem 1rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.85rem;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.copy-btn:hover {
    opacity: 1;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 2rem;
    color: var(--muted-foreground);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--muted-foreground);
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}