.community-content {
    padding: 3rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.community-content h1 {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 2rem;
    text-align: center;
}

.btn {
    padding: 0.8rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-block;
    margin: 0.5rem;
}

.primary-btn {
    background-color: #4a90e2;
    color: white;
}

.primary-btn:hover {
    background-color: #3a7bc8;
}

.secondary-btn {
    background-color: #f0f0f0;
    color: #333;
}

.secondary-btn:hover {
    background-color: #e0e0e0;
}


@media (max-width: 768px) {
    .community-content {
        padding: 2rem 1rem;
    }
    
    .community-content h1 {
        font-size: 2rem;
    }
}


.breadcrumb {
    padding: 1rem 2rem;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: #666;
    text-decoration: none;
}

.page-title {
    font-size: 2.5rem;
    margin: 0 2rem;
}

.greeting {
    margin: 0.5rem 2rem;
    color: #666;
}

.dashboard-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 2rem;
}

.progress-section {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.user-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.progress-chart {
    height: 200px;
    margin: 1rem 0;
    background: #f5f5f5;
    border-radius: 8px;
}

.stats {
    display: flex;
    justify-content: space-around;
    margin-top: 1rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stat-bar {
    width: 150px;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
}

.leaderboard-section {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

.pagination {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.pagination button {
    border: none;
    background: none;
    cursor: pointer;
}

.view-options {
    display: flex;
    gap: 0.5rem;
}

.view-options button {
    padding: 0.25rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: none;
    cursor: pointer;
}

.view-options button.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.discussions-container {
    padding: 2rem;
}

.discussions-container h2 {
    margin-bottom: 1.5rem;
}

.discussions-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 1rem;
}

.tags-filter {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.tag {
    padding: 0.25rem 1rem;
    border-radius: 16px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.tag:hover {
    opacity: 0.8;
}

.tag.active {
    opacity: 0.7;
    box-shadow: inset 0 0 0 2px rgba(255,255,255,0.5);
}

.tag.algebra { background: #007bff; color: white; }
.tag.quadratic { background: #00bcd4; color: white; }
.tag.parabolic { background: #4caf50; color: white; }
.tag.discriminant { background: #9c27b0; color: white; }
.tag.vertex { background: #e91e63; color: white; }
.tag.graphing { background: #ff9800; color: white; }

.questions-section,
.solutions-section {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 12px;
}

.questions-section h3,
.solutions-section h3 {
    margin-bottom: 1rem;
    color: #333;
}

.questions-list,
.solutions-list {
    display: grid;
    gap: 1rem;
}

.question-item,
.solution-item {
    margin-bottom: 1rem;
    padding: 1.2rem;
    border-radius: 8px;
    background: #f9f9f9;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.question-item:hover,
.solution-item:hover {
    background: #f0f0f0;
    box-shadow: 0 3px 8px rgba(0,0,0,0.15);
    transform: translateY(-2px);
    cursor: pointer;
}

.question-item::after,
.solution-item::after {
    content: '\f178'; /* Font Awesome arrow right icon */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
}

.question-item:hover::after,
.solution-item:hover::after {
    opacity: 1;
    transform: translateY(-50%) translateX(5px);
}

.question-item h4,
.solution-item h4 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    color: #333;
    transition: color 0.3s;
}

.question-item:hover h4,
.solution-item:hover h4 {
    color: #4a90e2;
}

.question-tags,
.solution-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.leaderboard-entry {
    display: flex;
    align-items: center;
    padding: 0.8rem;
    gap: 1rem;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
}

.leaderboard-entry:hover {
    background-color: #f8f9fa;
}

.leaderboard-entry .rank {
    font-weight: bold;
    min-width: 2rem;
    color: #666;
}

.leaderboard-entry .user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.leaderboard-entry .username {
    flex: 1;
    font-weight: 500;
}

.leaderboard-entry .points {
    color: #666;
    font-weight: 500;
}

@media (max-width: 1024px) {
    .discussions-content {
        grid-template-columns: 1fr;
    }
    
    .questions-section,
    .solutions-section {
        margin-bottom: 2rem;
    }

    .dashboard-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .discussions-container {
        padding: 1rem;
    }
    
    .tag {
        padding: 0.25rem 0.75rem;
        font-size: 0.8rem;
    }

    .dashboard-container {
        padding: 1rem;
        margin: 0 auto;
        width: 100%;
        max-width: 100%;
    }

    .progress-section {
        padding: 1rem;
        width: 100%;
        box-sizing: border-box;
        margin-bottom: 1rem;
    }

    .user-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
        width: 100%;
    }

    .progress-chart {
        height: 180px;
        width: 100%;
    }

    .leaderboard-section {
        padding: 1rem;
        width: 100%;
        box-sizing: border-box;
    }

    .leaderboard-header {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
        width: 100%;
    }

    .pagination {
        margin: 0.5rem 0;
        width: 100%;
        justify-content: center;
    }

    .view-options {
        width: 100%;
        justify-content: center;
    }

    .view-options button {
        flex: 0 1 auto;
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .leaderboard-entry {
        padding: 0.8rem;
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
    }

    .leaderboard-entry .user-avatar {
        width: 40px;
        height: 40px;
    }
    
    .leaderboard-entry .username {
        flex: 1;
        margin-left: 10px;
    }
    
    .greeting {
        margin: 1rem;
        text-align: center;
    }
    
    .stats {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .stat-item {
        width: 100%;
        justify-content: center;
    }
}

/* Add specific styles for extra small devices */
@media (max-width: 480px) {
    .dashboard-container {
        padding: 0.5rem;
    }
    
    .leaderboard-entry {
        font-size: 0.9rem;
    }
    
    .leaderboard-entry .user-avatar {
        width: 35px;
        height: 35px;
    }
    
    .view-options {
        gap: 0.25rem;
    }
    
    .view-options button {
        padding: 0.4rem 0.7rem;
        font-size: 0.8rem;
    }
    
    .tag {
        padding: 0.2rem 0.5rem;
        font-size: 0.75rem;
    }
    
    .discussions-content {
        gap: 1rem;
    }
}

.progress-chart {
    position: relative;
    width: 100%;
    height: 200px;
    margin: 1rem 0;
    background: #f5f5f5;
    border-radius: 8px;
    overflow: hidden;
}

.progress-chart canvas {
    width: 100% !important;
    height: 100% !important;
}

html.dark .community-content h1 {
    color: var(--heading-color);
}

html.dark .breadcrumb a {
    color: var(--text-color);
}

html.dark .greeting {
    color: var(--text-color);
}

html.dark .progress-section,
html.dark .leaderboard-section {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
}

html.dark .progress-chart {
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
}

html.dark .progress-chart canvas {
    filter: invert(0.85) hue-rotate(180deg);
}

html.dark .stat-item {
    color: var(--text-color);
}

html.dark .stat-bar {
    background-color: rgba(255, 255, 255, 0.1);
}

html.dark .stat-bar > div {
    background-color: var(--btn-primary-bg);
}

html.dark .leaderboard-entry {
    background-color: var(--card-bg);
    border-color: var(--border-color);
}

html.dark .leaderboard-entry:hover {
    background-color: var(--nav-bg);
}

html.dark .leaderboard-entry .rank {
    color: var(--text-color);
}

html.dark .leaderboard-entry .username {
    color: var(--text-color);
}

html.dark .leaderboard-entry .points {
    color: var(--text-color);
}

html.dark .questions-section,
html.dark .solutions-section {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
}

html.dark .questions-section h3,
html.dark .solutions-section h3 {
    color: var(--heading-color);
}

html.dark .question-item,
html.dark .solution-item {
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
}

html.dark .question-item:hover,
html.dark .solution-item:hover {
    background: #333;
    border-color: #444;
}

html.dark .question-item h4,
html.dark .solution-item h4 {
    color: #e0e0e0;
}

html.dark .question-item:hover h4,
html.dark .solution-item:hover h4 {
    color: #4a90e2;
}

html.dark .tag {
    opacity: 0.85;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

html.dark .tag:hover {
    opacity: 1;
}

html.dark .tag.active {
    opacity: 1;
    box-shadow: 0 0 0 2px var(--btn-primary-bg);
}

html.dark .view-options button {
    background-color: var(--card-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

html.dark .view-options button:hover {
    background-color: var(--nav-bg);
}

html.dark .view-options button.active {
    background-color: var(--btn-primary-bg);
    color: var(--btn-primary-text);
    border-color: var(--btn-primary-bg);
}

html.dark .pagination button {
    color: var(--text-color);
}

html.dark .pagination button:hover {
    color: var(--link-color);
}

html.dark .stats {
    color: var(--text-color);
}

html.high-contrast .progress-chart canvas {
    filter: invert(1) hue-rotate(180deg);
}

html.high-contrast .tag {
    opacity: 1;
    box-shadow: 0 0 0 2px #ffffff;
}