/* 页面通用样式 */

/* 通用动画 */
.animate-fade-in {
    animation: fadeIn 0.6s ease-out;
}

.animate-slide-up {
    animation: slideUp 0.6s ease-out;
}

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

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 页面头部 */
.page-header {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 40px;
    margin-bottom: 40px;
    text-align: center;
}

.page-header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.page-icon {
    width: 80px;
    height: 80px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
}

.page-title {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.page-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    margin: 0;
}

/* 留言板样式 */
.guestbook-container {
    display: grid;
    gap: 30px;
}

.guestbook-info {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 30px;
}

.guestbook-info-box h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.guestbook-info-box h3 i {
    color: var(--primary-color);
}

.guestbook-info-box p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 10px;
}

.guestbook-info-box a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.guestbook-info-box a:hover {
    text-decoration: underline;
}

/* 心情选择器 */
.mood-section {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 30px;
}

.mood-section h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.mood-selector {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.mood-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 15px;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    min-width: 80px;
}

.mood-btn:hover {
    background: var(--primary-lighter);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

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

.mood-icon {
    font-size: 24px;
}

.mood-text {
    font-size: 14px;
    font-weight: 500;
}

/* 关于我页面样式 */
.about-container {
    display: grid;
    gap: 30px;
}

.about-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 30px;
}

.about-profile {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    margin-bottom: 30px;
}

.profile-avatar {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--primary-color);
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-info h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.profile-info .profile-title {
    font-size: 16px;
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 15px;
}

.profile-info .profile-description {
    color: var(--text-secondary);
    line-height: 1.6;
}

.about-content {
    color: var(--text-primary);
    line-height: 1.8;
}

.about-content h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 30px 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

.about-content p {
    margin-bottom: 15px;
}

.about-content ul {
    margin: 15px 0;
    padding-left: 20px;
}

.about-content li {
    margin-bottom: 8px;
}

/* 友链页面样式 */
.links-container {
    display: grid;
    gap: 30px;
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.link-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 20px;
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
}

.link-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-hover-shadow);
    border-color: var(--primary-lighter);
    text-decoration: none;
    color: inherit;
}

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

.link-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.link-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.link-info h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 5px 0;
}

.link-url {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
}

.link-description {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 申请友链表单 */
.link-apply-form {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 30px;
}

.link-apply-form h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--bg-light);
    font-size: 14px;
    transition: var(--transition-fast);
}

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

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.submit-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: var(--border-radius);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
}

.submit-btn:hover {
    background: var(--primary-darker);
    transform: translateY(-1px);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .page-header {
        padding: 30px 20px;
    }
    
    .page-title {
        font-size: 28px;
    }
    
    .about-profile {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .links-grid {
        grid-template-columns: 1fr;
    }
    
    .mood-selector {
        justify-content: center;
    }
}

/* 评论嵌套样式 - 兼容 Typecho 默认结构 */
.comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.comment-list li {
    margin-bottom: 1rem;
}

.comment-list .comment-body {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    animation: fadeIn 0.6s ease-out;
}

.dark .comment-list .comment-body {
    background: #1f2937;
    border-color: #374151;
}

.comment-list .comment-children {
    margin-left: 2rem;
    margin-top: 1rem;
    padding-left: 1rem;
    border-left: 2px solid #e5e7eb;
}

.dark .comment-list .comment-children {
    border-left-color: #374151;
}

.comment-list .comment-children .comment-body {
    background: #f9fafb;
    padding: 1rem;
}

.dark .comment-list .comment-children .comment-body {
    background: #111827;
}

/* 深层嵌套样式 */
.comment-list .comment-children .comment-children {
    margin-left: 1rem;
}

.comment-list .comment-children .comment-children .comment-body {
    background: #f3f4f6;
    padding: 0.75rem;
}

.dark .comment-list .comment-children .comment-children .comment-body {
    background: #0f172a;
}

/* 评论元信息样式 */
.comment-list .comment-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
}

.comment-list .comment-author {
    font-weight: 600;
    color: #111827;
}

.dark .comment-list .comment-author {
    color: #f9fafb;
}

.comment-list .comment-date {
    color: #6b7280;
    font-size: 0.75rem;
}

.comment-list .comment-content {
    color: #374151;
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.dark .comment-list .comment-content {
    color: #d1d5db;
}

.comment-list .comment-reply {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: #6b7280;
    text-decoration: none;
    transition: color 0.2s;
}

.comment-list .comment-reply:hover {
    color: #3b82f6;
}

.dark .comment-list .comment-reply:hover {
    color: #60a5fa;
}

/* 限制嵌套深度，避免过度缩进 */
.comment-list .comment-children .comment-children .comment-children {
    margin-left: 0.5rem;
}

.comment-list .comment-children .comment-children .comment-children .comment-children {
    margin-left: 0;
    border-left: none;
    padding-left: 0;
}

/* 评论引用样式 */
.comment-quote {
    background: #f8fafc;
    border-left: 4px solid #e2e8f0;
    padding: 0.75rem 1rem;
    margin: 0.5rem 0;
    border-radius: 0 0.5rem 0.5rem 0;
    font-style: italic;
    color: #64748b;
}

.dark .comment-quote {
    background: #1e293b;
    border-left-color: #475569;
    color: #94a3b8;
}

.comment-quote .quote-author {
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.25rem;
    display: block;
}

.dark .comment-quote .quote-author {
    color: #cbd5e1;
}

.comment-quote .quote-content {
    margin: 0;
    line-height: 1.5;
}

/* 文本框中的引用预览样式 */
textarea.comment-textarea {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    line-height: 1.6;
}

/* 引用内容在文本框中的样式提示 */
.textarea-quote-hint {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.dark .textarea-quote-hint {
    color: #9ca3af;
}
