/* ===== GLOBAL RESET ===== */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;700;900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 76px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, sans-serif;
    /* translucent layer over the image makes it appear 'more transparent' */
    background:
        linear-gradient(rgba(255,255,255,0.28), rgba(255,255,255,0.28)),
        url("images/bg.jpg") center top / cover no-repeat scroll;
    color: #333;
}

/* =====================
   FLOATING BUBBLE (follows mouse)
   ===================== */
.floating-bubble {
    position: fixed;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, rgba(255,255,255,0.8), rgba(100,200,255,0.4));
    box-shadow: 0 0 30px rgba(100,180,255,0.5), inset -2px -2px 5px rgba(0,0,0,0.1);
    pointer-events: none;
    z-index: 999;
    filter: blur(0.5px);
    will-change: transform;
}

/* Anime-style headings */
h1 {
    font-family: 'Noto Sans SC', sans-serif;
    font-weight: 900;
    font-size: 3rem;
    letter-spacing: 2px;
    background: linear-gradient(135deg, #ff7eb3 50%, #b39cff 70%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 8px 16px rgba(255,126,179,0.25);
    margin-bottom: 20px;
}

@media (max-width: 480px) {
    h1 { font-size: 2rem; letter-spacing: 1px; }
}

/* No special-case fixed background; same behavior across devices */


/* =====================
   FLOATING NAVBAR
   ===================== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: #ffffffcc;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px #0000001a;
    z-index: 1000;
}

.navbar ul {
    display: flex;
    justify-content: center;
    gap: 35px;
    list-style: none;
    padding: 15px 0;
}

.navbar a {
    text-decoration: none;
    color: #444;
    font-weight: 600;
    font-size: 15px;
    transition: 0.2s;
}

.navbar a:hover {
    color: #6a5acd;
}


/* =====================
   HOMEPAGE ICON LINKS
   ===================== */
.links.icons {
    display: flex;
    justify-content: center;
    gap: 18px;
    margin-top: 12px;
}

.icon-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    color: #444;
    border-radius: 10px;
    transition: background-color 0.15s, color 0.15s, transform 0.08s;
}

.icon-link svg {
    width: 22px;
    height: 22px;
}

.icon-link:hover {
    background: #f2f2ff;
    color: #6a5acd;
    transform: translateY(-2px);
}

.icon-link:focus {
    outline: 3px solid #dfe6ff;
    outline-offset: 2px;
}


/* =====================
   TAGS (Homepage)
   ===================== */
.tags {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.tag {
    display: inline-block;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.55);
    border-radius: 12px;
    color: #333;
    font-size: 13px;
    font-weight: 600;
    backdrop-filter: blur(6px);
    border: 1px solid rgba(100, 100, 120, 0.08);
    box-shadow: 0 1px 6px rgba(0,0,0,0.04);
}

.tag:hover {
    background: rgba(255,255,255,0.72);
}


/* =====================
   PAGE SECTION BASE
   ===================== */
.page {
    min-height: 100vh;
    min-height: 100svh;
    height: auto;
    gap: 0;
    display: flex;
    flex-direction: column;     /* 修复，使内容上下排列 */
    justify-content: flex-start;
    align-items: center;
    padding: 100px 24px 64px;
    scroll-margin-top: 12px;
    text-align: center;
}

#home, #hobby, #experience, #contact { background: transparent; }

/* Keep navbar readable with a subtle solid background */
.navbar {
    background: rgba(255,255,255,0.9);
}


/* =====================
   AVATAR
   ===================== */
.avatar {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 20px;
}


/* =====================
   HOBBY — GAME LOGOS
   ===================== */
.game-logos {
    display: flex;
    justify-content: center;
    gap: 28px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.game-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 92px;
    height: 92px;
    border-radius: 14px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    cursor: pointer;
}

.game-logo:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 22px rgba(0,0,0,0.08);
}

.game-logo img {
    width: 84px;
    height: 84px;
    object-fit: contain;
    border-radius: 10px;
}


/* =====================
   HOBBY — TEXT BELOW LOGOS
   ===================== */
.hobby-text {
    margin-top: 25px;          /* 让文字自然在 LOGO 下方 */
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.anime-text {
    font-family: 'Noto Sans SC', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', sans-serif;
    font-weight: 800;
    font-size: 16px;
    letter-spacing: 0.4px;
    line-height: 1.35;
    /* solid black color */
    color: #1a1a1a;
    /* subtle drop shadow for readability against image */
    text-shadow: 0 2px 6px rgba(0,0,0,0.06);
    position: relative;
    display: inline-block;
    padding: 8px 14px;
    border-radius: 12px;
}

/* glassmorphism border/background for anime-text */
.anime-text::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 24px rgba(31,30,51,0.12);
    z-index: -1;
}

/* links inside anime-text should not show underline and should keep gradient look */
.anime-text a {
    color: inherit;
    text-decoration: none;
}

.contact-list { display: flex; flex-direction: column; gap: 8px; align-items: center; }

@media (max-width: 480px) {
    .anime-text { font-size: 14px; }
    .game-logo { width: 76px; height: 76px; }
    .game-logo img { width: 68px; height: 68px; }
}

/* =====================
   BILIBILI EMBED (responsive)
   ===================== */
.video-wrapper {
    width: 100%;
    max-width: 800px;
    flex: 0 0 auto;
    margin: 22px auto;
    position: relative;
    border-radius: 12px;
    overflow: visible;
    box-shadow: 0 12px 32px rgba(0,0,0,0.12);
    background: #000;
}
.video-wrapper .iframe-container {
    position: relative;
    aspect-ratio: 16 / 9;
}
.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

@media (max-width: 480px) {
    .video-wrapper { width: 100%; }
}

/* EXPERIENCE SECTION — 整理为逐行、Anime 风格一样的布局 */
.experience-text {
    margin-top: 25px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 8px;                     /* 控制句与句之间间距 */
    align-items: center;
}

/* =====================
   FLOATING AUDIO PLAYER
   ===================== */
.floating-player {
    position: fixed;
    left: 20px;
    bottom: 20px;
    width: 340px;
    max-width: calc(100vw - 32px);
    min-height: 104px;
    padding: 14px;
    background:
        radial-gradient(circle at 14% 12%, rgba(255,255,255,0.78), transparent 34%),
        linear-gradient(135deg, rgba(255,244,251,0.88), rgba(240,235,255,0.82));
    border: 1px solid rgba(255,255,255,0.78);
    border-radius: 22px;
    box-shadow: 0 20px 50px rgba(74,56,118,0.2), inset 0 1px 0 rgba(255,255,255,0.8);
    backdrop-filter: blur(18px) saturate(135%);
    -webkit-backdrop-filter: blur(18px) saturate(135%);
    z-index: 1100;
    display: flex;
    align-items: center;
    gap: 13px;
    overflow: hidden;
    user-select: none;
    transition: width .3s ease, min-height .3s ease, padding .3s ease, transform .2s ease, box-shadow .2s ease;
}

.floating-player::before {
    content: "";
    position: absolute;
    width: 120px;
    height: 120px;
    right: -50px;
    bottom: -70px;
    border-radius: 50%;
    background: rgba(255,126,179,.22);
    filter: blur(20px);
    pointer-events: none;
}

.floating-player:hover {
    transform: translateY(-2px);
    box-shadow: 0 24px 58px rgba(74,56,118,0.25), inset 0 1px 0 rgba(255,255,255,0.9);
}

.fp-art {
    position: relative;
    z-index: 1;
    flex: 0 0 70px;
    width: 70px;
    height: 70px;
    display: grid;
    place-items: center;
    color: #fff;
    border: 1px solid rgba(255,255,255,.76);
    border-radius: 18px;
    background:
        linear-gradient(145deg, rgba(255,126,179,.5), rgba(114,92,220,.42)),
        url("avatar.png") center / cover;
    box-shadow: 0 10px 24px rgba(106,90,205,.23), inset 0 0 24px rgba(255,255,255,.15);
    overflow: hidden;
}

.fp-note {
    font: 700 28px/1 Georgia, serif;
    text-shadow: 0 2px 10px rgba(60,35,100,.35);
}

.fp-wave {
    position: absolute;
    right: 8px;
    bottom: 8px;
    height: 14px;
    display: flex;
    align-items: flex-end;
    gap: 2px;
}

.fp-wave i {
    width: 3px;
    height: 6px;
    border-radius: 999px;
    background: rgba(255,255,255,.9);
    animation: fp-wave 850ms ease-in-out infinite alternate;
    animation-play-state: paused;
}

.fp-wave i:nth-child(2) { height: 12px; animation-delay: -300ms; }
.fp-wave i:nth-child(3) { height: 9px; animation-delay: -600ms; }
.floating-player.is-playing .fp-wave i { animation-play-state: running; }

@keyframes fp-wave {
    to { height: 14px; opacity: .65; }
}

.fp-controls {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 9px;
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
}

.fp-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.fp-heading > div { min-width: 0; }

.fp-kicker {
    display: block;
    margin-bottom: 2px;
    color: #8e7ec5;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 1.4px;
}

.fp-title {
    display: block;
    overflow: hidden;
    color: #322d48;
    font-size: 13px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fp-collapse {
    flex: 0 0 25px;
    width: 25px;
    height: 25px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: rgba(255,255,255,.55);
    color: #6f5aa8;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
}

.fp-top-row,
.fp-bottom-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.fp-bottom-row {
    justify-content: space-between;
}

.fp-play {
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    background: linear-gradient(145deg,#ff7eb3,#8670e8);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 7px 16px rgba(134,112,232,.28);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.fp-play::before {
    content: "▶";
    margin-left: 2px;
    font-size: 12px;
}

.fp-play[data-playing="true"]::before {
    content: "Ⅱ";
    margin-left: 0;
    font-size: 11px;
    font-weight: 900;
}

.fp-times {
    display: flex;
    gap: 4px;
    color: #706881;
    font-size: 10px;
    font-variant-numeric: tabular-nums;
}

.fp-progress {
    --progress: 0%;
    -webkit-appearance: none;
    appearance: none;
    min-width: 0;
    width: 100%;
    height: 5px;
    border-radius: 999px;
    background: linear-gradient(90deg, #ff7eb3 0 var(--progress), rgba(111,90,168,.14) var(--progress) 100%);
    flex: 1 1 auto;
    cursor: pointer;
}
.fp-progress::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 3px solid #a274da; box-shadow: 0 2px 8px rgba(106,90,205,.3); }
.fp-progress::-moz-range-thumb { width: 8px; height: 8px; border-radius: 50%; background: #fff; border: 3px solid #a274da; box-shadow: 0 2px 8px rgba(106,90,205,.3); }

.fp-volume {
    --vol: 80;
    width: 64px;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(90deg, #9a80dc calc(var(--vol) * 1%), rgba(111,90,168,.14) calc(var(--vol) * 1%));
    border-radius: 999px;
    padding: 0;
    cursor: pointer;
}
.fp-volume::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 3px 8px rgba(127,102,255,.2);
    border: 2px solid #9a80dc;
    cursor: pointer;
}
.fp-volume::-moz-range-thumb {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 3px 8px rgba(127,102,255,.2);
    border: 2px solid #9a80dc;
    cursor: pointer;
}

.fp-right { display: flex; align-items: center; gap: 8px; }

.fp-mute { width: 20px; background: transparent; border: none; font-size: 15px; cursor: pointer; color: #725cae; }
.fp-mute.is-muted { opacity: .4; text-decoration: line-through; }

/* Unmute / autoplay hint */
.fp-unmute {
    position: absolute;
    left: 0;
    top: -42px;
    background: linear-gradient(135deg,#ff7eb3,#8b73e8);
    color: #fff;
    padding: 4px 8px;
    font-size: 10px;
    border-radius: 999px;
    box-shadow: 0 6px 16px rgba(127,102,255,.18);
    border: none;
    cursor: pointer;
    transform-origin: left center;
    animation: fp-unmute-pulse 1600ms infinite;
    display: none;
}

.floating-player.is-collapsed {
    width: 188px;
    min-height: 58px;
    padding: 9px;
    border-radius: 18px;
}

.floating-player.is-collapsed .fp-art {
    flex-basis: 40px;
    width: 40px;
    height: 40px;
    border-radius: 12px;
}

.floating-player.is-collapsed .fp-note { font-size: 18px; }
.floating-player.is-collapsed .fp-wave { right: 4px; bottom: 4px; transform: scale(.7); }
.floating-player.is-collapsed .fp-kicker,
.floating-player.is-collapsed .fp-top-row,
.floating-player.is-collapsed .fp-bottom-row,
.floating-player.is-collapsed .fp-unmute { display: none !important; }
.floating-player.is-collapsed .fp-title { font-size: 12px; }

@keyframes fp-unmute-pulse {
    0% { transform: translateY(0) scale(1); opacity: 1; }
    50% { transform: translateY(-4px) scale(1.02); opacity: 0.95; }
    100% { transform: translateY(0) scale(1); opacity: 1; }
}

@media (max-width: 520px) {
    .floating-player { left: 12px; bottom: 12px; width: min(310px, calc(100vw - 24px)); }
    .floating-player.is-collapsed { width: 176px; }
}

/* Allow narrow screens and long text to flow without horizontal overflow. */
.page > * { min-width: 0; }
.page > :not(.video-wrapper) { max-width: 100%; }
.page > h1, .game-logos, .hobby-text { flex-shrink: 0; }
.anime-text { overflow-wrap: anywhere; line-height: 1.65; isolation: isolate; }
.navbar ul { gap: clamp(16px, 5vw, 35px); padding: 15px 12px; }
@media (max-width: 480px) {
    .page { padding: 88px 16px 48px; }
    .game-logos { gap: 14px; }
}
@media (hover: none) {
    .floating-bubble { display: none; }
}
