/* Problem List Specific Styles */

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-link {
    color: #333;
    text-decoration: none;
    font-size: 14px;
    padding: 5px 10px;
    border: 1px solid #ccc;
    background: white;
    border-radius: 3px;
}

.header-link:hover {
    background: #f0f0f0;
}

.problems-container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

/* Filters */
.filters {
    background: #f9f9f9;
    border: 1px solid #ccc;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 0;
}

.filter-group label {
    font-weight: bold;
}

.filter-btn {
    padding: 6px 12px;
    font-size: 13px;
    border: 1px solid #999;
    background: white;
    cursor: pointer;
    border-radius: 3px;
    /* For apple devices, we need to make the color not blue */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: white;
    color: #333;
}

.filter-btn:hover {
    background: #f0f0f0;
}

.filter-btn.active {
    background: #333;
    color: white;
    border-color: #333;
}

#category-filter {
    padding: 6px 12px;
    font-size: 13px;
    border: 1px solid #999;
    background: white;
    border-radius: 3px;
}

/* Stats Bar */
.stats-bar {
    display: flex;
    gap: 30px;
    padding: 15px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 20px;
}

.stat {
    display: flex;
    gap: 8px;
    align-items: center;
}

.stat-label {
    color: #666;
    font-size: 14px;
}

.stat-value {
    font-weight: bold;
    font-size: 16px;
    color: #333;
}

/* Problems List */
.problems-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
}

.problem-card {
    border: 1px solid #ccc;
    background: white;
    border-radius: 4px;
    padding: 15px 20px;
    padding-left: 24px; /* account for the border */
    display: flex;
    align-items: center;
    gap: 20px;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.problem-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-color: #999;
}

.problem-card.completed {
    background: #f8f9fa;
    border-left: 4px solid #28a745;
    padding-left: 20px; /* account for the border */
}

/* Problem ID */
.problem-id {
    font-family: monospace;
    font-size: 14px;
    color: #666;
    width: 50px;
    flex-shrink: 0;
}

/* Problem Title */
.problem-title {
    width: 170px;
    flex-shrink: 0;
}

.problem-title h3 {
    margin: 0 0 5px 0;
    font-size: 1.1em;
    font-weight: bold;
}

.problem-title .concepts {
    font-size: 12px;
    color: #666;
}

.concept-tag {
    display: inline-block;
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 3px;
    margin-right: 5px;
}

/* Problem Meta */
.problem-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.problem-difficulty {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 0.85em;
    font-weight: bold;
    text-transform: capitalize;
    width: 70px;
    text-align: center;
    flex-shrink: 0;
}

.problem-difficulty.easy {
    background: #d4edda;
    color: #155724;
}

.problem-difficulty.medium {
    background: #fff3cd;
    color: #856404;
}

.problem-difficulty.hard {
    background: #f8d7da;
    color: #721c24;
}

.problem-category {
    font-size: 13px;
    color: #555;
    padding: 4px 10px;
    background: #f0f0f0;
    border-radius: 3px;
    text-transform: capitalize;
    width: 90px;
    text-align: center;
    flex-shrink: 0;
}

.problem-time {
    font-size: 13px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 5px;
    width: 100px;
    flex-shrink: 0;
}

/* Completion Status */
.problem-status {
    width: 100px;
    flex-shrink: 0;
    text-align: center;
}

.status-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
}

.status-badge.completed {
    background: #d4edda;
    color: #155724;
}

.status-badge.incomplete {
    background: #f8f9fa;
    color: #6c757d;
    border: 1px solid #ddd;
}

/* Actions */
.problem-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    width: 230px;
    flex-shrink: 0;
}

.action-btn {
    padding: 6px 12px;
    font-size: 13px;
    border: 1px solid #999;
    background: white;
    cursor: pointer;
    border-radius: 3px;
    text-decoration: none;
    color: #333;
}

.action-btn:hover {
    background: #f0f0f0;
}

.action-btn.primary {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.action-btn.primary:hover {
    background: #0056b3;
    border-color: #0056b3;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.empty-state h3 {
    margin-bottom: 10px;
    color: #333;
}

/* Responsive */
@media (max-width: 990px) {
    .problem-card {
        flex-wrap: wrap;
    }
    
    .problem-title {
        flex-basis: 100%;
    }
    
    .stats-bar {
        flex-direction: column;
        gap: 10px;
    }

    .filters {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .filter-group {
        width: 100%;
    }

    .problem-actions {
        justify-content: flex-start;
    }

    .status-badge {
        display: none;
    }
}