/* Topics Page Specific Styles */

.topics-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin: 2rem 0;
    padding: 2rem;
    background: white;
    border: 3px solid #667eea;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: #5568d3;
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    color: #5568d3;
    text-shadow: none;
}

.stat-label {
    font-size: 1.1rem;
    opacity: 1;
    font-weight: 600;
    color: #667eea;
}

/* Topics Grid - 5 columns layout */
.topics-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    margin: 2rem 0;
}

.topic-card {
    background: white;
    border: 2px solid #667eea;
    border-radius: 12px;
    padding: 1.5rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
    position: relative;
    overflow: hidden;
}

.topic-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.topic-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
    border-color: #764ba2;
}

.topic-card:hover::before {
    opacity: 1;
}

.topic-card:hover .topic-name {
    color: white;
}

.topic-card:active {
    transform: translateY(-2px);
}

.topic-name {
    color: #5568d3;
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: capitalize;
    word-wrap: break-word;
    line-height: 1.4;
    position: relative;
    z-index: 1;
    transition: color 0.3s ease;
}

/* Loading Indicator */
.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 3rem;
    color: #667eea;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0;
    padding: 1rem;
}

.page-btn {
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 40px;
}

.page-btn:hover:not(:disabled) {
    background: #764ba2;
    transform: scale(1.1);
}

.page-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.5;
}

.page-info {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    padding: 0 1rem;
}

/* Actions Section */
.actions-section {
    text-align: center;
    margin: 2rem 0;
}

.btn-back {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: #6c757d;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-back:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

/* Search Section */
.search-section {
    margin: 1.5rem 0;
}

.search-section input {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    display: block;
    padding: 12px 20px;
    font-size: 16px;
    border: 3px solid #667eea;
    border-radius: 15px;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 1400px) {
    .topics-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1024px) {
    .topics-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .topics-stats {
        gap: 2rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    /* Hide desktop auth buttons */
    .header-right {
        display: none !important;
    }
    
    /* Show mobile menu */
    .mobile-menu {
        display: block;
        position: fixed;
        top: 20px;
        right: 20px;
        z-index: 9999;
    }
    
    .header-content {
        flex-direction: column;
        gap: 10px;
    }
    
    .header-left {
        text-align: center;
    }
    
    header h1 {
        font-size: 1.8em;
    }
    
    .subtitle {
        font-size: 0.95em;
    }
    
    .topics-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .topic-card {
        padding: 1rem 0.75rem;
    }
    
    .topic-name {
        font-size: 0.85rem;
    }
    
    .topics-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .stat-item {
        flex-direction: row;
        gap: 0.75rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .topics-grid {
        grid-template-columns: 1fr;
    }
    
    .pagination {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .page-btn {
        padding: 0.4rem 0.8rem;
        font-size: 1rem;
    }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: #666;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #333;
}

.empty-state p {
    font-size: 1rem;
    color: #666;
}

/* Quiz Link Section */
.quiz-link-section {
    margin: 1.5rem 0;
    text-align: center;
}

.quiz-link-btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.quiz-link-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}
