/*
 * Copyright (C) 2025 KaedeharaLu
 * 依据 GNU 通用公共许可证 v3.0 授权
 * 请参阅 LICENSE 文件了解详细信息
 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6a5acd;
    --secondary-color: #9370db;
    --bg-color: #1a1a2e;
    --card-bg: #16213e;
    --text-color: #e6e6ff;
    --accent-color: #4cc9f0;
    --success-color: #4ade80;
    --warning-color: #fbbf24;
    --error-color: #f87171;
    --border-radius: 12px;
    --box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

body {
    font-family: 'Noto Sans SC', sans-serif;
    background: linear-gradient(135deg, var(--bg-color) 0%, #0f3460 100%);
    color: var(--text-color);
    min-height: 100vh;
    padding: 0px;
    line-height: 1.6;
    margin: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 主内容布局 */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
    flex: 1;
}

@media (min-width: 992px) {
    .main-content {
        flex-direction: row;
        align-items: flex-start;
        /* 防止等高 */
    }

    /* 修改左侧列宽度为45% */
    .left-column {
        width: 45%;
        flex-shrink: 0;
        display: flex;
        flex-direction: column;
        padding-right: 20px;
        height: auto;
        /* 高度自适应 */
    }

    /* 右侧列宽度为55% */
    .right-column {
        width: 55%;
        position: relative;
        display: flex;
        flex-direction: column;
    }
}

/* 头部样式 */
header {
    text-align: center;
    padding: 20px 0;
    margin-bottom: 0;
}

/* 标题样式 */
.logo-container {
    text-align: center;
    margin-top: 20px;
    margin-bottom: 20px;
}

.logo {
    font-size: 3.5rem;
    font-weight: 700;
    background: linear-gradient(45deg, var(--accent-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 1.5px;
    text-shadow: 0 4px 10px rgba(76, 201, 240, 0.2);
    display: block;
}

.subtitle {
    font-size: 1.5rem;
    font-weight: 300;
    font-style: italic;
    opacity: 0.85;
    margin: 0 auto;
    padding: 0 20px;
    margin-top: 15px;
}

/* 头像样式 */
.profile-avatar {
    width: 150px;
    height: 150px;
    border: 2px solid white;
    border-radius: 5px;
    object-fit: cover;
    margin: 0 auto;
    display: block;
}

/* 当前时间样式 */
.current-time {
    background: rgba(26, 26, 46, 0.7);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    padding: 25px;
    margin: 20px 0;
    box-shadow: var(--box-shadow);
    border: 1px solid rgba(106, 90, 205, 0.3);
    flex-grow: 0;
    /* 防止时间容器过度拉伸 */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.current-time-title {
    text-align: center;
    font-size: 1.6rem;
    margin-bottom: 25px;
    font-weight: 500;
    color: var(--accent-color);
}

.current-time-container {
    display: flex;
    justify-content: space-around;
    gap: 20px;
}

.current-time-item {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.current-time-value {
    font-size: 3.5rem;
    font-family: 'Roboto Mono', monospace;
    font-weight: 700;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
    margin-bottom: 5px;
}

.current-time-label {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    opacity: 0.7;
}

/* 社交链接样式 - 网格布局 */
.social-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin: 25px 0;
    margin-top: auto;
    padding-top: 20px;
}

.social-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s ease;
    padding: 15px 10px;
    background: rgba(22, 33, 62, 0.5);
    border-radius: 10px;
    border: 1px solid rgba(106, 90, 205, 0.2);
}

.social-link:hover {
    transform: translateY(-5px);
    background: rgba(106, 90, 205, 0.2);
    border-color: var(--accent-color);
}

.social-icon {
    font-size: 2.2rem;
    margin-bottom: 10px;
}

.social-name {
    font-size: 0.95rem;
}

/* 留言板样式 */
.comments-section {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--box-shadow);
    border: 1px solid rgba(106, 90, 205, 0.3);
    flex-grow: 1;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 30px;
    text-align: center;
    color: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    cursor: pointer;
}

.section-title i {
    font-size: 1.8rem;
    transition: transform 0.3s ease;
}

.section-title.collapsed i {
    transform: rotate(180deg);
    /* 折叠时箭头向上 */
}

.comment-form-container {
    max-height: 1000px;
    /* 初始展开状态 */
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.comment-form-container.collapsed {
    max-height: 0;
}

.comment-form {
    background: rgba(26, 26, 46, 0.6);
    border-radius: var(--border-radius);
    padding: 25px;
    border: 1px solid rgba(106, 90, 205, 0.3);
}

.comments-list {
    max-height: 500px;
    overflow-y: auto;
    padding-right: 10px;
    margin-bottom: 30px;
}

/* 滚动条样式 */
.comments-list::-webkit-scrollbar {
    width: 8px;
}

.comments-list::-webkit-scrollbar-track {
    background: rgba(26, 26, 46, 0.5);
    border-radius: 4px;
}

.comments-list::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

.comment {
    background: rgba(26, 26, 46, 0.6);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 20px;
    border-left: 3px solid var(--primary-color);
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.comment-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 15px;
    border: 2px solid var(--primary-color);
}

.user-info {
    flex: 1;
}

.username {
    font-weight: 600;
    font-size: 1.2rem;
    margin-bottom: 3px;
}

.blog-link {
    font-size: 0.9rem;
    color: var(--accent-color);
    text-decoration: none;
}

.blog-link:hover {
    text-decoration: underline;
}

.comment-content {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 15px;
    padding: 0 10px;
}

.comment-time {
    text-align: right;
    font-size: 0.85rem;
    color: rgba(230, 230, 255, 0.7);
    font-style: italic;
}

.loading {
    text-align: center;
    padding: 30px;
    font-size: 1.2rem;
}

.loading i {
    font-size: 2rem;
    margin-bottom: 15px;
    color: var(--accent-color);
    display: block;
}

.error {
    text-align: center;
    padding: 30px;
    background: rgba(248, 113, 113, 0.15);
    border-radius: var(--border-radius);
    color: var(--error-color);
}

/* 留言表单样式 */
.comment-form {
    background: rgba(26, 26, 46, 0.6);
    border-radius: var(--border-radius);
    padding: 25px;
    border: 1px solid rgba(106, 90, 205, 0.3);
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 12px 15px;
    background: rgba(22, 33, 62, 0.8);
    border: 1px solid rgba(106, 90, 205, 0.3);
    border-radius: 8px;
    color: var(--text-color);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-color);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.submit-btn {
    display: block;
    width: 100%;
    padding: 14px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.3s, opacity 0.3s;
}

.submit-btn:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.submit-btn:disabled {
    background: #555;
    cursor: not-allowed;
    transform: none;
    opacity: 0.7;
}

.form-error {
    color: var(--error-color);
    font-size: 0.9rem;
    margin-top: 5px;
    display: block;
}

.success-message {
    text-align: center;
    padding: 15px;
    background: rgba(76, 222, 128, 0.15);
    border-radius: var(--border-radius);
    color: var(--success-color);
    margin-top: 20px;
    animation: fadeIn 0.5s;
}

.avatar-preview {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    margin-top: 10px;
    object-fit: cover;
    background-color: #2c2c54;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.avatar-preview i {
    font-size: 24px;
    color: var(--secondary-color);
}

.form-row {
    display: flex;
    gap: 20px;
}

.form-col {
    flex: 1;
}

/* 页脚样式 */
footer {
    /* position: relative; */
    width: 100%;
    text-align: center;
    padding: 30px 0;
    font-size: 0.9rem;
    opacity: 0.7;
    /* margin-top: 40px; */
    margin-top: auto;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .logo {
        font-size: 2.8rem;
    }

    .subtitle {
        font-size: 1.2rem;
    }

    .current-time-container {
        gap: 15px;
    }

    .current-time-value {
        font-size: 2.5rem;
    }

    .social-links {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 2.3rem;
    }

    .current-time-container {
        gap: 10px;
    }

    .current-time-value {
        font-size: 2rem;
    }

    .current-time-label {
        font-size: 0.9rem;
    }

    .social-links {
        grid-template-columns: repeat(2, 1fr);
    }

    .social-icon {
        font-size: 2rem;
    }
}

/* 新增：在宽屏时调整布局 */
@media (min-width: 992px) and (max-width: 1199px) {
    .current-time-value {
        font-size: 3rem;
    }
}

footer a {
    color: var(--text-color);
    text-decoration: none;
}

footer a:hover {
    color: var(--accent-color);
    text-decoration: none;
}