/* ============================================================
   Study Groups Styles
   ============================================================ */

.study-groups-container {
    padding: 40px 0;
}

.groups-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.groups-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.create-group-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.create-group-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.4);
}

/* Group Cards */
.group-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
    border: 1px solid #e2e8f0;
}

.group-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

.group-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.group-title {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.group-badge {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.group-badge.featured {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.group-subject {
    color: #667eea;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 10px;
}

.group-description {
    color: #64748b;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.group-stats {
    display: flex;
    gap: 20px;
    padding: 15px 0;
    border-top: 1px solid #f1f5f9;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 15px;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 18px;
    font-weight: 700;
    color: #667eea;
}

.stat-label {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 4px;
}

.group-level {
    display: inline-block;
    padding: 6px 12px;
    background: #f1f5f9;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #667eea;
    margin-bottom: 15px;
}

.group-actions {
    display: flex;
    gap: 10px;
}

.btn-join {
    flex: 1;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-join:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-view {
    flex: 1;
    background: #f1f5f9;
    color: #667eea;
    border: 1px solid #e2e8f0;
    padding: 10px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-view:hover {
    background: #e2e8f0;
}

/* Discussion Thread */
.discussion-thread {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-left: 4px solid #667eea;
}

.discussion-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.discussion-title {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
}

.discussion-meta {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #94a3b8;
    margin-bottom: 12px;
}

.discussion-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.discussion-type {
    display: inline-block;
    padding: 4px 8px;
    background: #f1f5f9;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    color: #667eea;
}

.discussion-solved {
    background: #10b981;
    color: white;
}

.discussion-urgent {
    color: #ef4444;
}

.discussion-content {
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 12px;
}

.discussion-replies {
    display: flex;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
}

.reply-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #94a3b8;
}

.reply-item i {
    font-size: 14px;
}

/* Discussion Reply */
.reply-box {
    background: #f8fafc;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.reply-author {
    font-weight: 700;
    color: #1e293b;
    font-size: 14px;
    margin-bottom: 8px;
}

.reply-content {
    color: #64748b;
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 8px;
}

.reply-time {
    font-size: 12px;
    color: #94a3b8;
}

.reply-solution-badge {
    background: #10b981;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

/* Study Schedule */
.schedule-card {
    background: white;
    border-radius: 12px;
    padding: 15px;
    border-left: 4px solid #f59e0b;
    margin-bottom: 15px;
}

.schedule-time {
    font-size: 12px;
    color: #94a3b8;
    margin-bottom: 8px;
}

.schedule-name {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 6px;
}

.schedule-type {
    display: inline-block;
    padding: 3px 8px;
    background: #fef3c7;
    color: #92400e;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.schedule-participants {
    font-size: 12px;
    color: #64748b;
    margin-top: 8px;
}

/* Group Analytics */
.analytics-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.analytics-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
}

.analytics-title {
    font-size: 14px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.analytics-value {
    font-size: 32px;
    font-weight: 700;
    color: #667eea;
}

.analytics-change {
    font-size: 12px;
    color: #10b981;
    margin-top: 8px;
}

/* Top Contributors */
.contributors-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.contributor-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
}

.contributor-item:last-child {
    border-bottom: none;
}

.contributor-info {
    flex: 1;
}

.contributor-name {
    font-weight: 600;
    color: #1e293b;
    font-size: 14px;
}

.contributor-score {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 4px;
}

.contributor-badge {
    background: #667eea;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .groups-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .groups-header h1 {
        font-size: 24px;
    }

    .group-stats {
        gap: 10px;
    }

    .group-actions {
        flex-direction: column;
    }

    .analytics-container {
        grid-template-columns: 1fr;
    }

    .discussion-header {
        flex-direction: column;
        gap: 10px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .group-card {
        background: #1e293b;
        border-color: #334155;
    }

    .group-title {
        color: #e2e8f0;
    }

    .group-description {
        color: #cbd5e1;
    }

    .discussion-thread {
        background: #1e293b;
    }

    .discussion-content {
        color: #cbd5e1;
    }

    .reply-box {
        background: #334155;
    }

    .reply-author {
        color: #e2e8f0;
    }

    .reply-content {
        color: #cbd5e1;
    }

    .analytics-card {
        background: #1e293b;
        border-color: #334155;
    }
}
