.home-container {
    display: flex;
    height: 100vh;
    background: white;
}

.sidebar {
    width: 280px;
    background: #f8fafc;
    border-right: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.sidebar-header h2 {
    color: #4f46e5;
    font-size: 1.5rem;
    margin-bottom: 16px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: white;
    border-radius: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white !important;
    color: #4f46e5 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    border: 1px solid #e0e7ff;
}

.create-group-btn {
    width: 100%;
    padding: 12px;
    background: #4f46e5;
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 24px;
    transition: all 0.2s;
}

.create-group-btn:hover {
    background: #4338ca;
    transform: translateY(-1px);
}

.my-groups {
    flex: 1;
    overflow-y: auto;
}

.my-groups h3 {
    font-size: 0.9rem;
    color: #6b7280;
    margin-bottom: 12px;
}

.groups-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.my-group-item {
    padding: 12px;
    background: white;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s;
}

.my-group-item:hover {
    background: #e0e7ff;
    transform: translateX(2px);
}

.group-info {
    flex: 1;
    overflow: hidden;
}

.group-name {
    font-weight: 500;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.group-last-message {
    font-size: 0.75rem;
    color: #6b7280;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.logout-btn-sidebar {
    margin-top: 20px;
    padding: 12px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    color: #ef4444;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.logout-btn-sidebar:hover {
    background: #fee2e2;
    border-color: #ef4444;
}

.main-content {
    flex: 1;
    padding: 24px 32px;
    overflow-y: auto;
}

.search-bar input {
    width: 100%;
    padding: 14px 20px;
    border: 1.5px solid #e5e7eb;
    border-radius: 40px;
    font-size: 1rem;
    transition: all 0.2s;
}

.search-bar input:focus {
    border-color: #4f46e5;
    outline: none;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.filter-tabs {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin: 20px 0;
}

.filter-btn {
    padding: 8px 18px;
    background: white;
    border: 1.5px solid #e5e7eb;
    border-radius: 40px;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.filter-btn.active {
    background: #4f46e5;
    color: white;
    border-color: #4f46e5;
}

.topics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.topic-card {
    background: white;
    border: 1.5px solid #e5e7eb;
    border-radius: 16px;
    padding: 20px;
    transition: all 0.2s;
}

.topic-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

.topic-card.joined {
    border-color: #10b981;
    background: linear-gradient(135deg, #fff 0%, #f0fdf4 100%);
}

.topic-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.topic-info h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.topic-info p {
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 8px;
}

.topic-members {
    font-size: 0.85rem;
    color: #4f46e5;
}

.joined-badge {
    display: inline-block;
    background: #10b981;
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    margin-left: 8px;
}

.join-btn,
.enter-btn {
    width: 100%;
    margin-top: 16px;
    padding: 10px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.join-btn {
    background: #4f46e5;
    color: white;
}

.join-btn:hover {
    background: #4338ca;
}

.enter-btn {
    background: #10b981;
    color: white;
}

.enter-btn:hover {
    background: #059669;
}

.badge-warning {
    background: #f59e0b;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
}