/* Learning Topics - Improved Display System with Better Contrast */

/* Topic Navigation */
.topic-navigation {
    padding: 4rem 0 2rem;
    background: linear-gradient(135deg, #1a1d23 0%, #2d3748 100%);
    border-bottom: 1px solid #4a5568;
}

.topic-nav-header {
    text-align: center;
    margin-bottom: 3rem;
}

.topic-nav-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1rem;
}

.topic-nav-header p {
    color: #e9ecef;
    font-size: 1.1rem;
}

.topic-controls {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Search Container */
.search-container {
    position: relative;
    max-width: 500px;
    margin: 0 auto 2rem;
}

.search-container input {
    width: 100%;
    padding: 12px 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-container input:focus {
    outline: none;
    border-color: #4dabf7;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 3px rgba(77, 171, 247, 0.1);
}

.search-container input::placeholder {
    color: #adb5bd;
}

/* Filter Buttons */
.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin: 20px 0;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.filter-btn.active {
    background: #4dabf7;
    border-color: #4dabf7;
    color: #ffffff;
}

/* Stats */
.stats-container {
    text-align: center;
    margin: 20px 0;
    color: #e9ecef;
    font-size: 1rem;
}

/* Topics Grid */
.topics-section {
    padding: 3rem 0;
    background: #f8f9fa;
}

.topics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.topic-card {
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 16px;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.topic-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    border-color: #4dabf7;
}

.topic-card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #2c3e50;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.topic-card-header .topic-icon {
    font-size: 3.5rem;
    margin: 0;
}

.topic-card-header .topic-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    margin: 0;
    padding: 0;
    border: none;
}

.topic-card-content {
    padding: 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.topic-card h3 {
    color: #2c3e50;
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 6px 0;
    line-height: 1.3;
}

.topic-card p {
    color: #495057 !important;
    line-height: 1.4;
    margin: 0 0 12px 0;
    font-size: 0.9rem;
}

.topic-subtopics {
    margin: 12px 0;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #4dabf7;
}

.topic-subtopics h4 {
    color: #2c3e50;
    font-size: 0.85rem;
    font-weight: 600;
    margin: 0 0 6px 0;
}

.topic-subtopics ul {
    margin: 0;
    padding-left: 14px;
    list-style: none;
}

.topic-subtopics li {
    color: #495057;
    font-size: 0.8rem;
    line-height: 1.3;
    margin-bottom: 3px;
    position: relative;
}

.topic-subtopics li:before {
    content: "•";
    color: #4dabf7;
    font-weight: bold;
    position: absolute;
    left: -15px;
}

.topic-card .topic-meta {
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid #e9ecef;
}

.topic-category {
    background: #e3f2fd;
    color: #1976d2;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.topic-difficulty {
    color: #6c757d;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 12px;
    background: rgba(108, 117, 125, 0.1);
}

.difficulty-beginner {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.difficulty-intermediate {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
}

.difficulty-advanced {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.topic-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 15px 0;
}

.topic-tag {
    background: #f8f9fa;
    color: #495057;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid #e9ecef;
}

/* Dark theme overrides */
.dark-theme .topics-section {
    background: #1a1d23;
}

.dark-theme .topic-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.dark-theme .topic-card h3 {
    color: #ffffff;
}

.dark-theme .topic-card p {
    color: #e9ecef !important;
}

.dark-theme .topic-card .topic-meta {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.dark-theme .topic-category {
    background: rgba(77, 171, 247, 0.2);
    color: #4dabf7;
}

.dark-theme .topic-difficulty {
    color: #adb5bd;
}

.dark-theme .topic-tag {
    background: rgba(255, 255, 255, 0.1);
    color: #e9ecef;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dark-theme .topic-card-header {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.05) 100%);
    color: #ffffff;
}

.dark-theme .topic-subtopics {
    background: rgba(255, 255, 255, 0.05);
    border-left-color: #4dabf7;
}

.dark-theme .topic-subtopics h4 {
    color: #ffffff;
}

.dark-theme .topic-subtopics li {
    color: #e9ecef;
}

.dark-theme .topic-subtopics li:before {
    color: #4dabf7;
}

/* Responsive Design */
@media (max-width: 768px) {
    .topics-grid {
        grid-template-columns: 1fr;
        padding: 0 1rem;
    }
    
    .filter-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .filter-btn {
        width: 200px;
        text-align: center;
    }
    
    .topic-nav-header h2 {
        font-size: 2rem;
    }
}
