/* Tloong博客 - 主样式文件 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;600;700&display=swap');
@import url('https://cdn.jsdelivr.net/npm/tsangertype@latest/dist/TsangerJinKai01-27533-W03/result.css');

:root {
    --primary-color: rgb(79 70 229 / var(--tw-bg-opacity, 1));
    --primary-hover: rgb(67 56 202 / var(--tw-bg-opacity, 1));
    --primary-light: rgb(99 102 241 / var(--tw-bg-opacity, 1));
}

/* 基础重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'TsangerJinKai01-27533', 'Inter', 'Noto Sans SC', sans-serif;
    line-height: 1.6;
    color: #333;
}

.gradient-bg {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
}

.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

.animate-fade-in {
    animation: fadeIn 0.6s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.news-item {
    border-bottom: 1px solid rgba(232, 228, 228, 0.4);
}

.category-tab {
    background: var(--primary-color);
    color: white;
    border-radius: 16px 0 0 16px;
}

.category-count {
    background: var(--primary-hover);
    color: white;
    border-radius: 0 16px 16px 0;
}

.text-primary {
    color: var(--primary-color);
}

.bg-primary {
    background-color: var(--primary-color);
}

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

.border-primary {
    border-color: var(--primary-color);
}

.hover\:text-primary:hover {
    color: var(--primary-color);
}

.hover\:bg-primary-hover:hover {
    background-color: var(--primary-hover);
}

/* 新闻条目悬停效果 */
.news-item {
    transition: all 0.3s ease;
    cursor: pointer;
    border-radius: 8px;
    padding: 16px;
    margin: 4px 0;
}

.news-item:hover {
    background-color: rgba(79, 70, 229, 0.05);
}

/* 弹窗样式 */
.modal-overlay {
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.form-input {
    transition: all 0.3s ease;
}

.form-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* 分页样式 */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
    padding: 16px 0;
}

.pagination-btn {
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    background: white;
    color: #6b7280;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    min-width: 40px;
    text-align: center;
}

.pagination-btn:hover:not(.disabled) {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 评论区域样式 */
.comment-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 12px 16px;
    border-radius: 12px;
    transition: all 0.3s ease;
    user-select: none;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

.comment-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.comment-btn:active {
    transform: translateY(0);
}

.comment-btn .count {
    font-weight: 700;
    font-size: 20px;
    line-height: 1;
    color: #374151;
}

.comment-btn i {
    transition: all 0.3s ease;
}

/* 图标默认颜色 */
.comment-btn i.text-red-400 {
    color: #f87171 !important;
}

.comment-btn i.text-blue-400 {
    color: #60a5fa !important;
}

.comment-btn i.text-yellow-400 {
    color: #fbbf24 !important;
}

.comment-textarea {
    transition: all 0.3s ease;
    font-family: inherit;
    border: 2px solid #e5e7eb;
}

.comment-textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
    outline: none;
}

.submit-comment-btn {
    transition: all 0.3s ease;
    font-weight: 600;
    background-color: #e5e7eb;
    color: #6b7280;
}

.submit-comment-btn:hover:not(.active) {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    background-color: #d1d5db;
}

.submit-comment-btn.active {
    background-color: rgb(79, 70, 229) !important;
    color: white !important;
}

.submit-comment-btn.active:hover {
    background-color: rgb(67, 56, 202) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(79, 70, 229, 0.3);
}

/* 评论按钮动画效果 */
.comment-btn.animate-pulse {
    animation: commentPulse 0.4s ease-in-out;
}

@keyframes commentPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.15);
    }

    100% {
        transform: scale(1);
    }
}

/* 点击后的状态样式 */
.comment-btn.text-red-500 {
    background-color: rgba(239, 68, 68, 0.1);
}

.comment-btn.text-red-500 i {
    color: #ef4444 !important;
}

.comment-btn.text-blue-500 {
    background-color: rgba(59, 130, 246, 0.1);
}

.comment-btn.text-blue-500 i {
    color: #3b82f6 !important;
}

.comment-btn.text-yellow-500 {
    background-color: rgba(245, 158, 11, 0.1);
}

.comment-btn.text-yellow-500 i {
    color: #f59e0b !important;
}

/* 评论列表样式 */
.comment-list {
    border-top: 1px solid #f3f4f6;
    padding-top: 16px;
}

.comment-item {
    display: flex;
    gap: 12px;
    padding: 16px 0;
    border-bottom: 1px solid #f9fafb;
}

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

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
}

.comment-content {
    flex: 1;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.comment-floor {
    font-weight: 600;
    color: #6b7280;
    font-size: 14px;
}

.comment-time {
    color: #9ca3af;
    font-size: 12px;
}

.comment-text {
    color: #374151;
    line-height: 1.5;
    margin-bottom: 8px;
}

.comment-actions {
    display: flex;
    justify-content: flex-end;
}

.reply-btn {
    background-color: #e5e7eb;
    color: #6b7280;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.reply-btn:hover {
    background-color: #d1d5db;
    color: #374151;
}

.reply-section {
    margin-left: 52px;
    margin-top: 12px;
    padding-left: 16px;
    border-left: 2px solid #f3f4f6;
}

.reply-item {
    padding: 12px 0;
    border-bottom: 1px solid #f9fafb;
}

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

.reply-input-area {
    margin-top: 12px;
    display: none;
}

.reply-input-area.active {
    display: block;
}

.reply-textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    resize: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.reply-textarea:focus {
    border-color: rgb(79, 70, 229);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
    outline: none;
}

.reply-submit-btn {
    background-color: #e5e7eb;
    color: #6b7280;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 8px;
}

.reply-submit-btn:hover {
    background-color: #d1d5db;
}

.reply-submit-btn.active {
    background-color: rgb(79, 70, 229);
    color: white;
}



/* 禁用状态样式 */
.comment-textarea:disabled {
    background-color: #f9fafb;
    color: #9ca3af;
    cursor: not-allowed;
    border-color: #e5e7eb;
}

.comment-textarea:disabled::placeholder {
    color: #d1d5db;
}

.submit-comment-btn:disabled {
    background-color: #f3f4f6 !important;
    color: #d1d5db !important;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.comment-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.comment-btn:disabled:hover {
    background-color: transparent;
    transform: none !important;
    box-shadow: none !important;
}



.reply-textarea:disabled {
    background-color: #f9fafb;
    color: #9ca3af;
    cursor: not-allowed;
    border-color: #e5e7eb;
}

.reply-submit-btn:disabled {
    background-color: #f3f4f6 !important;
    color: #d1d5db !important;
    cursor: not-allowed;
}



/* 评论区域响应式设计 */
@media (max-width: 640px) {
    .comment-btn {
        padding: 10px 12px;
        gap: 6px;
    }

    .comment-btn .count {
        font-size: 18px;
    }

    .comment-btn i {
        font-size: 1.5rem !important;
    }

    .comment-textarea {
        font-size: 16px;
        padding: 12px;
    }

    .submit-comment-btn {
        padding: 12px 20px;
        font-size: 16px;
    }

    .comment-avatar {
        width: 32px;
        height: 32px;
    }

    .reply-section {
        margin-left: 44px;
        padding-left: 12px;
    }

    .login-prompt {
        padding: 12px;
    }

    .login-prompt .flex {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }



}