/* ==============================================
   基础样式和天空淡蓝色背景
   ============================================== */

/* 全局样式 */
* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    
    /* 天空淡蓝色渐变背景 */
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 25%, #90caf9 50%, #e1f5fe 75%, #f0f8ff 100%);
    background-attachment: fixed;
    background-size: 400% 400%;
    animation: skyGradient 20s ease infinite;
}

/* 天空背景动画 */
@keyframes skyGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 容器样式 */
.container {
    max-width: 1200px;
}

/* ==============================================
   管理员入口图标样式
   ============================================== */

.admin-entry-icon {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.admin-entry-icon a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
    text-decoration: none;
    backdrop-filter: blur(10px);
}

.admin-entry-icon a:hover {
    transform: translateY(-2px) scale(1.1);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    color: white;
}

.admin-entry-icon i {
    font-size: 1.2rem;
}

/* ==============================================
   导航栏样式
   ============================================== */

.navbar {
    /* 天空淡蓝色渐变背景，与页面背景一致 */
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 25%, #90caf9 50%, #e1f5fe 75%, #f0f8ff 100%) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50 !important;
    text-shadow: 0 1px 3px rgba(255, 255, 255, 0.8);
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: 8px;
    transition: all 0.3s ease;
    color: #2c3e50 !important;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    color: #1a252f !important;
}

.nav-link.active {
    background-color: rgba(255, 255, 255, 0.4);
    color: #1a252f !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* 导航栏切换按钮（移动端） */
.navbar-toggler {
    border: 1px solid rgba(255, 255, 255, 0.3);
    background-color: rgba(255, 255, 255, 0.2);
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.25);
}

/* ==============================================
   主要内容区域
   ============================================== */

.main-content {
    min-height: calc(100vh - 200px);
    padding-bottom: 3rem;
}

/* 欢迎语区域 */
.welcome-section {
    padding: 4rem 0 3rem;
    text-align: center;
}

.welcome-title {
    font-size: 2.5rem;
    font-weight: 300;
    color: #2c3e50;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.welcome-subtitle {
    font-size: 1.2rem;
    margin-bottom: 0;
    opacity: 0.8;
}

/* ==============================================
   卡片和内容样式
   ============================================== */

.card {
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    transition: all 0.3s ease;
}

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

.card-header {
    background-color: rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    font-weight: 600;
}

/* ==============================================
   按钮样式
   ============================================== */

.btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 0.5rem 1.5rem;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-outline-primary {
    border-color: #667eea;
    color: #667eea;
}

.btn-outline-primary:hover {
    background-color: #667eea;
    border-color: #667eea;
    transform: translateY(-1px);
}

/* ==============================================
   警告和消息样式
   ============================================== */

.alert {
    border: none;
    border-radius: 10px;
    backdrop-filter: blur(10px);
    margin-bottom: 1.5rem;
}

.alert-success {
    background-color: rgba(212, 237, 218, 0.9);
    color: #0f5132;
}

.alert-danger {
    background-color: rgba(248, 215, 218, 0.9);
    color: #721c24;
}

.alert-info {
    background-color: rgba(209, 236, 241, 0.9);
    color: #055160;
}

/* ==============================================
   页脚样式
   ============================================== */

.footer {
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    margin-top: auto;
    padding: 2rem 0 1rem;
}

.footer hr {
    border-color: rgba(0, 0, 0, 0.1);
}

/* ==============================================
   响应式设计
   ============================================== */

@media (max-width: 768px) {
    .welcome-title {
        font-size: 2rem;
    }
    
    .welcome-subtitle {
        font-size: 1rem;
    }
    
    .welcome-section {
        padding: 2rem 0;
    }
    
    .card {
        margin-bottom: 1rem;
    }
}

@media (max-width: 576px) {
    .welcome-title {
        font-size: 1.75rem;
    }
    
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
}

/* ==============================================
   特殊效果
   ============================================== */

/* 毛玻璃效果 */
.glass-effect {
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* 浮动动画 */
.float-animation {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==============================================
   工具类
   ============================================== */

.text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.border-radius-lg {
    border-radius: 12px;
}

.backdrop-blur {
    backdrop-filter: blur(10px);
}

.bg-white-translucent {
    background-color: rgba(255, 255, 255, 0.9);
}

/* 评论回复功能样式 */
.comment-item {
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.comment-item:hover {
    background-color: rgba(0, 123, 255, 0.02);
    border-radius: 8px;
    padding: 10px;
}

.comment-reply {
    position: relative;
}

.comment-reply::before {
    content: '';
    position: absolute;
    left: -18px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, #007bff, #6c757d);
    border-radius: 2px;
}

.comment-reply-badge {
    background-color: rgba(0, 123, 255, 0.1);
    color: #007bff;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    margin-left: 8px;
}

.comment-actions {
    margin-top: 10px;
}

.comment-reply-btn {
    background: none;
    border: 1px solid #dee2e6;
    color: #6c757d;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.comment-reply-btn:hover {
    background-color: #007bff;
    border-color: #007bff;
    color: white;
    transform: translateY(-1px);
}

.reply-form {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-top: 15px;
    border-left: 4px solid #007bff;
}

.reply-form-actions {
    margin-top: 15px;
}

/* 评论层级结构的垂直线条 */
.comment-item[data-comment-id] {
    position: relative;
}

/* 管理员回复的特殊样式（保留向后兼容） */
.comment-item .comment-author-name:contains("管理员") {
    color: #dc3545;
    font-weight: bold;
}

/* 评论加载动画 */
.comments-loading {
    opacity: 0.7;
}

.comments-loading .fa-spinner {
    animation: spin 1s linear infinite;
}

/* 评论为空状态 */
.comments-empty {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.comments-empty i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* 评论分页样式 */
.comments-pagination {
    margin-top: 2rem;
}

.comments-pagination .pagination {
    margin-bottom: 0;
}

.comments-pagination .page-link {
    color: #007bff;
    border-color: #dee2e6;
}

.comments-pagination .page-link:hover {
    color: #0056b3;
    background-color: #e9ecef;
    border-color: #dee2e6;
}

.comments-pagination .page-item.active .page-link {
    background-color: #007bff;
    border-color: #007bff;
}

/* 评论折叠按钮样式 */
.comment-collapse-btn {
    background: none;
    border: none;
    color: #6c757d;
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
    margin-left: 0.5rem;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
}

.comment-collapse-btn:hover {
    color: #007bff;
    background-color: #f8f9fa;
}

.comment-collapse-btn i {
    margin-right: 0.25rem;
}

/* 评论回复区域样式 */
.comment-replies {
    margin-top: 0.5rem;
    animation: fadeIn 0.3s ease;
}

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

/* 作者标识样式更新 */
.comment-item .comment-author-name[data-admin="true"] {
    color: #dc3545;
    font-weight: bold;
}

.comment-item .comment-author-name[data-admin="true"]::after {
    content: " 👑";
    font-size: 0.8em;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .comments-pagination .pagination {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .comments-pagination .page-item {
        margin: 0.125rem;
    }
    
    .comment-collapse-btn {
        font-size: 0.8rem;
        padding: 0.2rem 0.4rem;
    }
    
    .comment-reply {
        margin-left: 20px !important;
        padding-left: 10px !important;
    }
    
    .comment-reply::before {
        left: -15px;
    }
    
    .reply-form {
        padding: 15px;
    }
} 