/* 
 * 个人主页样式表 - 现代化设计
 */

/* === 全局样式 === */
:root {
    /* 亮色主题 */
    --primary-color: #1e88e5;
    --secondary-color: #0d47a1;
    --accent-color: #ff5722;
    --text-color: #a4a4a4;
    --text-secondary: #444444;
    --background-color: #f8f9fa;
    --card-background: rgba(255, 255, 255, 0.85);
    --card-background-hover: rgba(255, 255, 255, 0.95);
    --shadow-color: rgba(0, 0, 0, 0.1);
    --border-radius: 12px;
    --box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* 暗色主题 */
.dark {
    --primary-color: #64b5f6;
    --secondary-color: #1976d2;
    --accent-color: #ff7043;
    --text-color: #f5f5f5;
    --text-secondary: #b0b0b0;
    --background-color: #121212;
    --card-background: rgba(30, 30, 30, 0.85);
    --card-background-hover: rgba(40, 40, 40, 0.95);
    --shadow-color: rgba(0, 0, 0, 0.3);
}

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

html {
    font-size: 16px;
}

body {
    font-family: "LXGW WenKai", "霞鹜文楷", "微软雅黑", "Microsoft YaHei", "PingFang SC", sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    transition: var(--transition);
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: var(--accent-color);
}

/* === 背景 === */
.bg-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -10;
    overflow: hidden;
}

#bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: brightness(0.9);
    z-index: 1;
}

.dark #bg {
    filter: brightness(0.7);
}

/* === 容器样式 === */
.container {    
    max-width: 960px;    
    margin: 0 auto;    
    padding: 1rem;    
    position: relative;    
    min-height: 100vh;
    z-index: 1;
    display: flex;
    flex-direction: column;
}

/* === 加载动画 === */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--background-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

.loading.hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-wrapper {
    text-align: center;
}

.spinner {
    margin: 0 auto;
    width: 50px;
    height: 40px;
    text-align: center;
    font-size: 10px;
}

.spinner > div {
    background-color: var(--primary-color);
    height: 100%;
    width: 6px;
    margin: 0 2px;
    display: inline-block;
    animation: sk-stretchdelay 1.2s infinite ease-in-out;
}

.spinner .rect2 {
    animation-delay: -1.1s;
}

.spinner .rect3 {
    animation-delay: -1.0s;
}

.spinner .rect4 {
    animation-delay: -0.9s;
}

.spinner .rect5 {
    animation-delay: -0.8s;
}

@keyframes sk-stretchdelay {
    0%, 40%, 100% { 
        transform: scaleY(0.4);
    }  20% { 
        transform: scaleY(1.0);
    }
}

.loading-text {
    font-size: 1.25rem;
    font-weight: bold;
    margin-top: 1.25rem;
    color: var(--primary-color);
}

/* === 主题切换 === */
.theme-toggle {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background-color: var(--card-background);
    box-shadow: var(--box-shadow);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 100;
    transition: var(--transition);
}

.theme-toggle i {
    font-size: 1.25rem;
    color: var(--primary-color);
}

.theme-toggle .fa-sun {
    display: none;
}

.dark .theme-toggle .fa-moon {
    display: none;
}

.dark .theme-toggle .fa-sun {
    display: block;
}

/* === 头部区域 === */
.header-area {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-bottom: 1.5rem;
    background-color: var(--card-background);
    border-radius: var(--border-radius);
    padding: 1.2rem;
    box-shadow: var(--box-shadow);
    text-align: center;
}

.logo-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.header-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 0.5rem;
}

.header-logo img {
    width: 4.5rem;
    height: 4.5rem;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 0.8rem;
    box-shadow: var(--box-shadow);
    border: 3px solid rgba(255, 255, 255, 0.2);
}

.site-name {
    font-size: 2rem;
    font-weight: bold;
    color: var(--text-color);
    margin: 0;
}

.site-desc {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-top: 0.3rem;
    margin-bottom: 0.5rem;
}

/* === 一言 === */
.hitokoto-container {
    width: 100%;
    margin-top: 0.8rem;
    padding: 0.8rem 1rem;
    background-color: rgba(125, 125, 125, 0.05);
    border-radius: var(--border-radius);
    position: relative;
}

#hitokoto-text {
    font-size: 0.95rem;
    font-style: italic;
    margin-bottom: 0.3rem;
}

#hitokoto-author {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-align: right;
}

.hitokoto-refresh {
    position: absolute;
    top: 0.8rem;
    right: 1rem;
    cursor: pointer;
    opacity: 0.7;
    transition: var(--transition);
}

.hitokoto-refresh:hover {
    opacity: 1;
    transform: rotate(180deg);
}

/* === 信息容器 === */
.info-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.about-section, .visitor-section {
    background-color: var(--card-background);
    border-radius: var(--border-radius);
    padding: 1rem;
    box-shadow: var(--box-shadow);
}

.about-content, .visitor-content {
    margin-top: 0.5rem;
}

.visitor-count {
    font-weight: bold;
    color: var(--primary-color);
}

/* === 链接标题 === */
.section-title {
    display: flex;
    align-items: center;
    margin-bottom: 0.8rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid rgba(125, 125, 125, 0.2);
}

.section-title i {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-right: 0.5rem;
}

.section-title span {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--text-color);
}

/* === 链接网格 === */
.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.site-card {
    display: flex;
    align-items: center;
    background-color: var(--card-background);
    border-radius: var(--border-radius);
    padding: 1rem;
    transition: var(--transition);
    color: var(--text-color);
    box-shadow: var(--box-shadow);
}

.site-card:hover {
    background-color: var(--card-background-hover);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.card-icon {
    background-color: rgba(125, 125, 125, 0.1);
    width: 2.8rem;
    height: 2.8rem;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 0.8rem;
    flex-shrink: 0;
}

.card-icon i {
    font-size: 1.4rem;
    color: var(--primary-color);
}

.card-title {
    font-size: 1.05rem;
    font-weight: 500;
}

/* === 社交栏 === */
.social-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    justify-content: center;
}

.social-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background-color: rgba(125, 125, 125, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition);
}

.social-icon i {
    font-size: 1.25rem;
    color: var(--text-color);
}

.social-icon:hover {
    background-color: var(--primary-color);
    transform: translateY(-5px);
}

/* === 页脚 === */
footer {
    margin-top: auto;
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-secondary);
    padding-top: 1rem;
    border-top: 1px solid rgba(125, 125, 125, 0.2);
}

footer p {
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

footer a {
    color: var(--text-color);
    font-weight: 500;
}

footer a:hover {
    color: var(--primary-color);
}

.icp-link {
    opacity: 1;
    color: var(--text-color);
}

/* === 网易云音乐播放器自定义样式 === */
.aplayer.aplayer-fixed {
    z-index: 100;
}

.aplayer.aplayer-fixed .aplayer-body {
    background-color: var(--card-background) !important;
    box-shadow: var(--box-shadow) !important;
}

.aplayer.aplayer-fixed .aplayer-list {
    border-color: rgba(125, 125, 125, 0.1) !important;
}

.aplayer .aplayer-info .aplayer-music .aplayer-title,
.aplayer .aplayer-info .aplayer-music .aplayer-author {
    color: var(--text-color) !important;
}

.aplayer .aplayer-info .aplayer-controller .aplayer-time {
    color: var(--text-secondary) !important;
}

/* 歌词显示 */
.aplayer.aplayer-fixed .aplayer-lrc {
    left: auto !important;
    right: 10px !important;
    width: 400px !important;
    margin-right: 0px !important;
    text-align: center !important;
}

.dark .aplayer.aplayer-fixed .aplayer-lrc:before,
.dark .aplayer.aplayer-fixed .aplayer-lrc:after {
    background: linear-gradient(to bottom, rgba(30, 30, 30, 0.9) 0%, rgba(30, 30, 30, 0) 100%) !important;
}

.dark .aplayer.aplayer-fixed .aplayer-lrc:after {
    background: linear-gradient(to top, rgba(30, 30, 30, 0.9) 0%, rgba(30, 30, 30, 0) 100%) !important;
}

.aplayer .aplayer-list ol li {
    background-color: var(--card-background) !important;
    color: var(--text-color) !important;
    border-color: rgba(125, 125, 125, 0.1) !important;
}

.aplayer .aplayer-list ol li:hover {
    background-color: var(--card-background-hover) !important;
}

.aplayer .aplayer-list ol li.aplayer-list-light {
    background-color: var(--card-background-hover) !important;
}

/* === 响应式设计 === */
@media (max-width: 1200px) {
    .container {
        padding: 1rem;
    }
}

@media (max-width: 768px) {
    .links-grid {
        grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
    }
    
    .site-name {
        font-size: 1.8rem;
    }
    
    .header-area {
        padding: 1rem;
    }
    
    .info-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0.8rem;
    }
    
    .links-grid {
        grid-template-columns: 1fr;
    }
    
    .header-logo img {
        width: 4rem;
        height: 4rem;
    }
    
    .site-name {
        font-size: 1.6rem;
    }
}

/* === 字体定义 === */
@font-face {
    font-family: 'LXGW WenKai';
    src: url('../fonts/lxgw-wenkai-regular.woff2') format('woff2'),
         url('../fonts/lxgw-wenkai-regular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
} 