/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

/* 顶部导航栏 */
.navbar {
    background: linear-gradient(90deg, #FF4500 0%, #FF6B35 100%);
    color: white;
    padding: 0;
    box-shadow: 0 2px 10px rgba(255, 69, 0, 0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.nav-brand {
    font-size: 1.4rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-brand i {
    font-size: 1.8rem;
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-item {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* 容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* 页面标题 */
.page-header {
    text-align: center;
    margin: 2rem 0 3rem 0;
}

.page-header h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 功能卡片区域 */
.feature-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #e1e8ed;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.card-icon {
    background: linear-gradient(45deg, #FF4500, #FF6B35);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem auto;
    color: white;
    font-size: 1.5rem;
}

.card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #2c3e50;
    font-weight: 600;
}

.card p {
    color: #666;
    line-height: 1.5;
    font-size: 0.95rem;
}

/* 主表单区域 */
.main-form {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    border: 1px solid #e1e8ed;
}

.form-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #f8f9fa;
}

.form-header i {
    color: #FF4500;
    font-size: 1.5rem;
}

.form-header h2 {
    color: #2c3e50;
    font-size: 1.8rem;
    font-weight: 600;
}

/* 表单区块 */
.form-section {
    margin-bottom: 2.5rem;
}

.form-section h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #34495e;
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.form-section h3 i {
    color: #FF4500;
}

/* 表单标签和输入 */
.form-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
}

.form-label i {
    color: #FF4500;
}

textarea, select, input[type="number"] {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e1e8ed;
    border-radius: 10px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    font-family: inherit;
    background: #fafbfc;
}

textarea:focus, select:focus, input[type="number"]:focus {
    outline: none;
    border-color: #FF4500;
    background: white;
    box-shadow: 0 0 0 3px rgba(255, 69, 0, 0.1);
}

textarea {
    resize: vertical;
    min-height: 120px;
}

.form-help {
    font-size: 0.85rem;
    color: #666;
    margin-top: 0.5rem;
    font-style: italic;
}

/* 表单行 */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

/* 单选按钮组 */
.radio-group {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 500;
    color: #2c3e50;
    transition: color 0.3s ease;
}

.radio-label:hover {
    color: #FF4500;
}

.radio-label input[type="radio"] {
    display: none;
}

.radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #e1e8ed;
    border-radius: 50%;
    position: relative;
    transition: all 0.3s ease;
}

.radio-label input[type="radio"]:checked + .radio-custom {
    border-color: #FF4500;
    background: #FF4500;
}

.radio-label input[type="radio"]:checked + .radio-custom::after {
    content: '';
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* 复选框组 */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-weight: 500;
    color: #2c3e50;
    transition: color 0.3s ease;
}

.checkbox-label:hover {
    color: #FF4500;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #e1e8ed;
    border-radius: 4px;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
    border-color: #FF4500;
    background: #FF4500;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '✓';
    color: white;
    font-size: 14px;
    font-weight: bold;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* 数量限制网格 */
.limit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.limit-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.limit-item label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.9rem;
}

.limit-item input[type="number"] {
    padding: 0.75rem;
}

/* 按钮样式 */
.btn-primary, .btn-secondary {
    padding: 1rem 2rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    text-decoration: none;
    justify-content: center;
}

.btn-primary {
    background: linear-gradient(45deg, #FF4500, #FF6B35);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 69, 0, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 69, 0, 0.4);
}

.btn-secondary {
    background: #f8f9fa;
    color: #495057;
    border: 2px solid #dee2e6;
}

.btn-secondary:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    transform: translateY(-1px);
}

.form-submit {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #f8f9fa;
}

.form-submit .btn-primary {
    min-width: 200px;
    font-size: 1.1rem;
    padding: 1.2rem 2.5rem;
}

/* 结果展示区域 */
.results-section {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-top: 2rem;
    border: 1px solid #e1e8ed;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f8f9fa;
    flex-wrap: wrap;
    gap: 1rem;
}

.results-header h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #2c3e50;
    font-size: 1.5rem;
}

.results-header h3 i {
    color: #FF4500;
}

.results-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.results-actions .btn-secondary {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
}

.results-content {
    max-height: 600px;
    overflow-y: auto;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

/* 模态框 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal-content {
    background: white;
    padding: 3rem;
    border-radius: 20px;
    text-align: center;
    max-width: 90%;
    width: 400px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* 进度指示器 */
.progress-container h3 {
    color: #2c3e50;
    margin: 1rem 0;
}

.progress-container p {
    color: #666;
    margin-bottom: 2rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #FF4500;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #f3f3f3;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 1rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(45deg, #FF4500, #FF6B35);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .nav-container {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
    }

    .nav-menu {
        gap: 1rem;
    }

    .page-header h1 {
        font-size: 2rem;
    }

    .feature-cards {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .main-form {
        padding: 2rem;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .limit-grid {
        grid-template-columns: 1fr;
    }

    .radio-group {
        flex-direction: column;
        gap: 1rem;
    }

    .results-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .results-actions {
        width: 100%;
        justify-content: stretch;
    }

    .results-actions .btn-secondary {
        flex: 1;
    }
}

/* Styles for results, filters, and posts (restored) */
.filter-section {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-top: 2rem;
    border: 1px solid #e1e8ed;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.filter-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-item label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.9rem;
}

.filter-item input[type="number"] {
    padding: 0.75rem;
}


.analysis-section {
    margin-bottom: 2rem;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.analysis-section h3 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
}

.analysis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.analysis-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
    border: 1px solid #e1e8ed;
    transition: transform 0.3s ease;
}

.analysis-card:hover {
    transform: translateY(-2px);
}

.analysis-number {
    font-size: 2rem;
    font-weight: bold;
    color: #FF4500;
    margin-bottom: 0.5rem;
}

.analysis-label {
    color: #666;
    font-size: 0.9rem;
}

.subreddit-stats, .top-posts {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    border: 1px solid #e1e8ed;
}

.subreddit-stats h4, .top-posts h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-rank {
    font-weight: bold;
    color: #FF4500;
    min-width: 30px;
}

.stat-name {
    flex: 1;
    font-weight: 500;
    margin-left: 1rem;
}

.stat-count {
    color: #666;
    font-size: 0.9rem;
}

.posts-section h3, .comments-section h3 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.post-item {
    background: white;
    border: 1px solid #e1e8ed;
    border-radius: 10px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.post-index {
    font-weight: bold;
    color: #FF4500;
    font-size: 1.1rem;
}

.post-heat {
    font-weight: bold;
    font-size: 0.9rem;
}

.post-content {
    padding: 1.5rem;
}

.post-title {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    line-height: 1.4;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #666;
}

.post-text {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    color: #495057;
    line-height: 1.5;
    white-space: pre-wrap; /* Preserve line breaks in comments */
}

.post-flair {
    display: inline-block;
    background: #FF4500;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    margin: 0.5rem 0;
}

.post-link {
    font-size: 0.9rem;
    margin-top: 1rem;
}

.post-link a {
    color: #FF4500;
    text-decoration: none;
}

.post-link a:hover {
    text-decoration: underline;
}

.post-preview {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.post-preview:last-child {
    border-bottom: none;
}

.post-rank {
    font-size: 1.2rem;
    font-weight: bold;
    color: #FF4500;
    min-width: 30px;
}

.post-info {
    flex: 1;
}

/* The .post-title inside .post-preview is different */
.post-preview .post-title {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* The .post-meta inside .post-preview is different */
.post-preview .post-meta {
    font-size: 0.8rem;
    color: #666;
    gap: 0.5rem;
}

/* Styles for History Page */
.history-container .tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid #dee2e6;
}

.history-container .tab-button {
    padding: 1rem 2rem;
    border: none;
    background: none;
    font-size: 1.1rem;
    font-weight: 600;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    transform: translateY(2px);
}

.history-container .tab-button.active {
    color: #FF4500;
    border-bottom-color: #FF4500;
}

.table-container {
    overflow-x: auto;
    position: relative;
    min-height: 200px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.data-table th, .data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.data-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

.data-table tbody tr:hover {
    background-color: #f1f3f5;
}

.data-table td a {
    color: #FF4500;
    text-decoration: none;
    font-weight: 500;
}

.data-table td a:hover {
    text-decoration: underline;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 2rem;
    gap: 0.5rem;
}

.page-button {
    padding: 0.5rem 1rem;
    border: 1px solid #dee2e6;
    background: white;
    color: #495057;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.page-button:hover:not(:disabled) {
    background: #e9ecef;
    border-color: #adb5bd;
}

.page-button.active {
    background: #FF4500;
    color: white;
    border-color: #FF4500;
}

.page-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #FF4500;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.page-ellipsis {
    display: inline-flex;
    align-items: center;
    padding: 0 0.5rem;
    color: #6c757d;
}

/* Styles for History Page Controls */
.history-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background-color: #f8f9fa;
    border-radius: 10px;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.control-group label {
    font-weight: 600;
    color: #495057;
}

.control-group select {
    min-width: 200px;
    padding: 0.5rem;
}

#getCommentsBtn {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
}

.control-group select:disabled {
    background-color: #e9ecef;
    cursor: not-allowed;
}

/* Reddit任务状态弹窗样式 */
.task-status-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    min-width: 500px;
    max-width: 800px;
    max-height: 80vh;
    overflow: hidden;
    display: none;
}

.task-status-header {
    background: linear-gradient(90deg, #FF4500 0%, #FF6B35 100%);
    color: white;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.task-status-header h3 {
    margin: 0;
    font-size: 1.2rem;
}

.close-status {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.close-status:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.task-status-content {
    padding: 1.5rem;
}

.task-message {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: #333;
    font-weight: 500;
}

.task-progress {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #FF4500 0%, #FF6B35 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    font-size: 0.9rem;
    color: #666;
    min-width: 40px;
}

.task-logs {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    max-height: 300px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
}

.log-entry {
    margin-bottom: 0.5rem;
    color: #555;
    white-space: pre-wrap;
}

.log-entry:last-child {
    margin-bottom: 0;
}

/* 滚动条样式 */
.task-logs::-webkit-scrollbar {
    width: 8px;
}

.task-logs::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.task-logs::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.task-logs::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 下载控件样式 */
.download-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: auto;
}

.download-controls label {
    font-weight: 500;
    color: #555;
}

.download-controls select {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    font-size: 0.9rem;
    min-width: 80px;
}

.download-controls button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    white-space: nowrap;
}

.download-controls button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.history-controls {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

/* 下载成功提示样式 */
.download-success-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(90deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    max-width: 400px;
    animation: slideInRight 0.3s ease-out;
}

.download-success-toast i {
    font-size: 1.2rem;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Twitter评论样式 */
.comments-row {
    background: #f8f9fa;
}

.comments-container {
    padding: 1rem;
    border-left: 3px solid #1DA1F2;
}

.comments-container h4 {
    color: #1DA1F2;
    margin-bottom: 1rem;
    font-size: 1rem;
    font-weight: 600;
}

.comment-item {
    background: white;
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    padding: 0.8rem;
    margin-bottom: 0.8rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.comment-item:last-child {
    margin-bottom: 0;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.comment-header strong {
    color: #14171a;
    font-weight: 700;
}

.comment-username {
    color: #657786;
    font-weight: 400;
}

.comment-time {
    color: #657786;
    margin-left: auto;
    font-size: 0.8rem;
}

.comment-content {
    color: #14171a;
    line-height: 1.5;
    margin-bottom: 0.5rem;
    word-wrap: break-word;
}

.comment-metrics {
    font-size: 0.8rem;
    color: #657786;
    display: flex;
    gap: 1rem;
}

.btn-small {
    background: #1DA1F2;
    color: white;
    border: none;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    margin-left: 0.5rem;
    transition: background-color 0.2s;
}

.btn-small:hover {
    background: #1991db;
}

.view-comments {
    font-weight: 500;
}