/**
 * 社区通知样式
 */

/* 通知徽章 */
.notification-badge {
    position: fixed;
    top: 80px;
    right: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    cursor: pointer;
    z-index: 1000;
    animation: slideIn 0.3s ease;
    font-size: 14px;
}

.notification-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 评论区 */
.comments-section {
    border-top: 1px solid var(--color-border);
    padding: 1rem;
    background: var(--color-bg);
    margin-top: 1rem;
    border-radius: 0 0 8px 8px;
}

.comments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-weight: 600;
}

.btn-close-comments {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--color-text-secondary);
    padding: 4px 8px;
    border-radius: 4px;
}

.btn-close-comments:hover {
    background: var(--color-border);
}

.comments-list {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 1rem;
}

.empty-comments {
    color: var(--color-text-secondary);
    text-align: center;
    padding: 2rem;
}

/* 评论项 */
.comment-item {
    padding: 1rem;
    background: white;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
}

.comment-meta {
    display: flex;
    flex-direction: column;
}

.comment-meta strong {
    font-size: 0.875rem;
}

.comment-date {
    font-size: 0.75rem;
    color: var(--color-text-secondary);
}

.comment-content {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--color-text);
    margin-bottom: 0.5rem;
    word-wrap: break-word;
}

.comment-actions {
    display: flex;
    gap: 1rem;
}

.btn-reply {
    background: none;
    border: none;
    color: var(--color-accent);
    font-size: 0.8rem;
    cursor: pointer;
    padding: 0;
}

.btn-reply:hover {
    text-decoration: underline;
}

/* 评论表单 */
.comment-form {
    margin-top: 1rem;
}

.comment-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
    font-size: 0.9rem;
}

.comment-form textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.1);
}

.comment-form-actions {
    margin-top: 0.5rem;
    text-align: right;
}

.btn-submit-comment {
    background: var(--color-accent);
    color: white;
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.btn-submit-comment:hover:not(:disabled) {
    background: #374151;
    transform: translateY(-1px);
}

.btn-submit-comment:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.login-required {
    text-align: center;
    padding: 1rem;
    color: var(--color-text-secondary);
}

.login-required p {
    margin-bottom: 0.5rem;
}

.loading {
    text-align: center;
    padding: 1rem;
    color: var(--color-text-secondary);
}

/* 通知页面 */
.notifications-page {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
}

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

.notifications-list {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.notification-item {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    transition: background 0.2s;
}

.notification-item:hover {
    background: var(--color-bg);
}

.notification-item.unread {
    background: rgba(102, 126, 234, 0.05);
}

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.notification-icon.comment {
    background: #dbeafe;
}

.notification-icon.reply {
    background: #d1fae5;
}

.notification-icon.follow {
    background: #fce7f3;
}

.notification-icon.at {
    background: #fef3c7;
}

.notification-content {
    flex: 1;
}

.notification-message {
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 0.25rem;
}

.notification-time {
    font-size: 0.75rem;
    color: var(--color-text-secondary);
}

.notification-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-mark-read {
    background: none;
    border: 1px solid var(--color-border);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
}

.btn-mark-read:hover {
    background: var(--color-bg);
}

.empty-notifications {
    text-align: center;
    padding: 3rem;
    color: var(--color-text-secondary);
}

/* 响应式 */
@media (max-width: 640px) {
    .notification-badge {
        top: 70px;
        right: 10px;
        padding: 8px 16px;
        font-size: 12px;
    }

    .comments-section {
        padding: 0.75rem;
    }

    .comment-item {
        padding: 0.75rem;
    }
}
