/* ============================================
   个人主页 - 样式表（参考 imsyy.top 布局）
   色调: 暖橙 / 青绿 / 毛玻璃
   ============================================ */

/* ---------- 重置 ---------- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --glass-bg: rgba(255, 255, 255, 0.12);
    --glass-border: rgba(255, 255, 255, 0.18);
    --glass-hover: rgba(255, 255, 255, 0.18);
    --text-main: rgba(255, 255, 255, 0.92);
    --text-sub: rgba(255, 255, 255, 0.65);
    --text-dim: rgba(255, 255, 255, 0.4);
    --accent-teal: #4fd1c5;
    --accent-warm: #f0a070;
    --font-sans: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    --font-hand: 'Kalam', cursive;
}

html { font-size: 16px; }

body {
    font-family: var(--font-sans);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ---------- 全屏背景 ---------- */
.bg-layer {
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        url('https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=1920&q=80')
        center/cover no-repeat fixed;
}
.bg-layer::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(20, 15, 30, 0.35) 0%,
        rgba(40, 25, 20, 0.25) 50%,
        rgba(10, 20, 35, 0.4) 100%
    );
}

/* ---------- 顶部音乐栏 ---------- */
.top-bar {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
}

.music-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.music-icon {
    color: var(--text-sub);
    display: flex;
    align-items: center;
    animation: musicBounce 0.9s ease-in-out infinite alternate;
}

@keyframes musicBounce {
    from { transform: translateY(-1px); }
    to   { transform: translateY(1px); }
}

.music-text {
    font-size: 0.82rem;
    color: var(--text-sub);
    white-space: nowrap;
    letter-spacing: 0.03em;
}

/* ---------- 主容器 ---------- */
.container {
    display: flex;
    min-height: 100vh;
    padding: 80px 48px 56px;
    gap: 32px;
    position: relative;
}

/* ========== 左侧区域 ========== */
.left-area {
    flex: 0 0 38%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 28px;
    max-width: 420px;
}

/* 头像 */
.avatar-circle {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: rgba(30, 30, 35, 0.7);
    border: 3px solid rgba(255, 255, 255, 0.15);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.35),
        inset 0 0 20px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: avatarFloat 6s ease-in-out infinite alternate;
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 名字 */
.site-name {
    font-family: var(--font-hand);
    font-size: 2.8rem;
    color: #fff;
    letter-spacing: 0.02em;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
    line-height: 1.2;
}

.name-sub {
    font-size: 0.55em;
    color: rgba(255, 255, 255, 0.55);
    vertical-align: baseline;
    margin-left: 2px;
}

/* 打字行 */
.typed-line {
    font-size: 0.95rem;
    color: var(--text-sub);
    font-weight: 300;
    min-height: 1.5em;
    margin-top: 4px;
}

.cursor-blink {
    color: var(--accent-teal);
    animation: cursorFlash 1s step-end infinite;
}

@keyframes cursorFlash {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0; }
}

/* ---------- 引言卡片 ---------- */
.quote-card {
    padding: 26px 30px;
    position: relative;
}

.quote-mark {
    font-family: Georgia, serif;
    font-size: 2.4rem;
    color: rgba(255, 255, 255, 0.12);
    position: absolute;
    line-height: 1;
    user-select: none;
}
.left-mark  { top: 10px; left: 14px; }
.right-mark { bottom: 4px; right: 14px; }

.quote-content {
    font-size: 0.95rem;
    color: var(--text-main);
    line-height: 1.85;
    position: relative;
    z-index: 1;
}
.quote-content strong {
    font-style: italic;
    color: var(--accent-warm);
    font-weight: 500;
}

/* ---------- 社交图标 ---------- */
.social-row {
    display: flex;
    gap: 14px;
}

.social-item {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-sub);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-item:hover {
    color: var(--accent-teal);
    background: rgba(79, 209, 197, 0.1);
    border-color: rgba(79, 209, 197, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(79, 209, 197, 0.12);
}

/* ========== 右侧区域 ========== */
.right-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 22px;
    min-width: 0;
}

/* 第一行：播放器 + 时间 */
.row-top {
    display: flex;
    gap: 20px;
}

/* 播放器卡片 */
.player-card {
    flex: 1;
    padding: 24px 28px;
    min-width: 260px;
}

/* 进度条 */
.progress-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.progress-bar {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: height 0.2s ease;
}

.progress-bar:hover {
    height: 6px;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-teal), #6ee7d9);
    border-radius: 2px;
    transition: width 0.3s linear;
}

.time-current,
.time-total {
    font-size: 0.72rem;
    color: var(--text-dim);
    font-variant-numeric: tabular-nums;
    min-width: 32px;
    text-align: center;
}

/* 播放列表面板 */
.playlist-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease;
    opacity: 0;
    margin-top: 0;
}

.playlist-panel.show {
    max-height: 200px;
    opacity: 1;
    margin-top: 14px;
}

.playlist-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.playlist-item {
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.82rem;
    color: var(--text-sub);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: none;
}

.playlist-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-main);
}

.playlist-item.active {
    color: var(--accent-teal);
    background: rgba(79, 209, 197, 0.08);
}

.player-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
}

.tab-btn {
    padding: 5px 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: transparent;
    color: var(--text-dim);
    font-size: 0.78rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: inherit;
}

.tab-btn.active {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-sub);
    border-color: rgba(255, 255, 255, 0.2);
}

.player-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
    margin-bottom: 14px;
}

.ctrl-btn {
    background: none;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, opacity 0.2s;
    opacity: 0.85;
}

.ctrl-btn:hover {
    transform: scale(1.12);
    opacity: 1;
}

.ctrl-play {
    color: var(--text-main);
}

.player-track {
    text-align: center;
    font-size: 0.84rem;
    color: var(--text-sub);
    letter-spacing: 0.02em;
}

/* 时间卡片 */
.time-card {
    flex: 0 0 240px;
    padding: 24px 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 6px;
}

.time-date-str {
    font-size: 0.82rem;
    color: var(--text-sub);
    letter-spacing: 0.04em;
}

.time-big {
    font-size: 2.4rem;
    font-weight: 300;
    color: #fff;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.05em;
    line-height: 1.2;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.25);
}

.weather-line {
    display: flex;
    gap: 16px;
    font-size: 0.78rem;
    color: var(--text-dim);
}

/* ---------- 导航网格 ---------- */
.nav-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

/* ---------- 通用毛玻璃卡片 ---------- */
.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18), 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.35s ease;
}

.glass-card:hover {
    background: var(--glass-hover);
    border-color: rgba(255, 255, 255, 0.26);
    transform: translateY(-2px);
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.22),
        0 4px 12px rgba(0, 0, 0, 0.12);
}

/* 导航卡片 */
.nav-card {
    padding: 26px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-sub);
    transition: all 0.35s ease;
}

.nav-card:hover {
    color: var(--text-main);
}

.nav-icon {
    color: var(--text-sub);
    transition: all 0.3s ease;
}

.nav-card:hover .nav-icon {
    color: var(--accent-teal);
    transform: scale(1.08);
}

.nav-label {
    font-size: 0.88rem;
    letter-spacing: 0.06em;
}

/* ---------- 底部栏 ---------- */
.bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 36px;
    font-size: 0.8rem;
    color: var(--text-dim);
    background: linear-gradient(to top, rgba(0, 0, 0, 0.25), transparent);
    pointer-events: none;
}

.bottom-bar > * {
    pointer-events: auto;
}

.footer-music {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-sub);
    letter-spacing: 0.04em;
}

.footer-right {
    letter-spacing: 0.04em;
}

/* ========== 响应式 ========== */

@media (max-width: 1200px) {
    .container {
        padding: 72px 32px 52px;
        gap: 24px;
    }

    .nav-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }

    .time-big { font-size: 2rem; }
}

@media (max-width: 900px) {
    .container {
        flex-direction: column;
        padding: 72px 24px 64px;
        gap: 24px;
    }

    .left-area {
        flex: none;
        max-width: 100%;
        align-items: center;
        text-align: center;
    }

    .profile-block,
    .quote-card,
    .social-row {
        align-items: center;
    }

    .site-name {
        font-size: 2.2rem;
    }

    .right-area {
        flex: none;
        width: 100%;
    }

    .row-top {
        flex-direction: column;
    }

    .player-card,
    .time-card {
        flex: none;
        min-width: auto;
    }

    .time-card {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        padding: 18px 24px;
        gap: 4px 16px;
    }

    .time-big { font-size: 1.8rem; }

    .nav-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .container {
        padding: 68px 16px 58px;
    }

    .top-bar {
        top: 12px;
    }

    .music-pill {
        padding: 6px 14px;
    }
    .music-text {
        font-size: 0.72rem;
    }

    .avatar-circle {
        width: 88px;
        height: 88px;
    }

    .site-name {
        font-size: 1.8rem;
    }

    .quote-card {
        padding: 20px 22px;
    }

    .nav-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .nav-card {
        padding: 18px 14px;
    }

    .bottom-bar {
        padding: 12px 18px;
        font-size: 0.72rem;
        flex-direction: column;
        gap: 4px;
    }
}
