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

html{
    scroll-behavior:smooth;
}

:root{
    --bg:#090d18;
    --card:rgba(255,255,255,.08);
    --card-hover:rgba(255,255,255,.12);
    --text:#ffffff;
    --sub:#b8c0d0;
    --accent:#f7d96d;
}

body{
    font-family:
    "Segoe UI",
    "Microsoft YaHei",
    sans-serif;

    color:var(--text);

    background:var(--bg);

    overflow-x:hidden;
}

body::before{
    content:"";
    position:fixed;
    inset:0;
    z-index:-2;

    background:
    linear-gradient(
        rgba(5,8,15,.75),
        rgba(5,8,15,.92)
    ),
    url("images/bg.jpg");

    background-size:cover;
    background-position:center;
}

#particles-js{
    position:fixed;
    top:0;
    left:0;
    width:100%;
    height:100%;
    z-index:-1;
}

.navbar{
    position:fixed;
    top:0;
    left:0;

    width:100%;
    height:70px;

    display:flex;
    justify-content:space-between;
    align-items:center;

    padding:0 40px;

    background:rgba(9,13,24,.92);

    border-bottom:
    1px solid rgba(255,255,255,.08);

    z-index:999;
}

.logo{
    font-size:24px;
    font-weight:700;
    color:var(--accent);
}

.nav-links{
    display:flex;
    gap:30px;
}

.nav-links a{
    text-decoration:none;
    color:white;
    transition:.3s;
}

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

.hero{
    height:100vh;
    padding-top:70px;

    display:flex;
    justify-content:center;
    align-items:center;

    text-align:center;
}

.hero-content{
    padding:20px;
}

.hero-content{
    animation:fadeUp 1.2s ease;
}

@keyframes fadeUp{
    from{
        opacity:0;
        transform:translateY(40px);
    }
    to{
        opacity:1;
        transform:translateY(0);
    }
}

.hero h1{
    font-size:clamp(80px,10vw,140px);
    font-weight:800;
    letter-spacing:2px;
}

.hero-subtitle{
    margin-top:15px;
    font-size:24px;
    color:var(--accent);
}

.hero-lang{
    margin-top:10px;
    color:var(--sub);
}

.explore-btn{
    display:inline-block;
    margin-top:48px;
    padding:16px 44px;
    text-decoration:none;
    color:white;
    font-size:18px;
    font-weight:600;
    letter-spacing:.08em;
    border:1px solid rgba(255,255,255,.3);
    border-radius:999px;
    transition:.3s;
}

.explore-btn:hover{
    background:rgba(255,255,255,.08);
    border-color:rgba(255,255,255,.6);
    letter-spacing:.12em;
}

.section{
    width:min(1100px,90%);
    margin:0 auto 120px auto;
    scroll-margin-top:90px;
}

.glass-card{
    background:var(--card);
    backdrop-filter:blur(20px);
    border:1px solid rgba(255,255,255,.08);
    border-radius:24px;
    padding:40px;
    transition:.3s;
}

.glass-card:hover{
    background:var(--card-hover);
}

.glass-card h2{
    margin-bottom:25px;
    color:var(--accent);
}

.about-card{
    display:flex;
    gap:40px;
    align-items:center;
}

.avatar{
    width:220px;
    height:220px;
    border-radius:50%;
    object-fit:cover;
    border:3px solid rgba(255,255,255,.2);
}

.avatar:hover{
    transform:scale(1.03);
    transition:.3s;
}

.apex-layout{
    display:flex;
    gap:40px;
    align-items:center;
    flex-wrap:wrap;
}

.predator-image{
    width:500px;
    max-width:100%;
    border-radius:16px;
    box-shadow:0 10px 40px rgba(0,0,0,.4);
}

.career-info{
    flex:1;
    font-size:20px;
}

.season-tag{
    display:inline-block;
    margin:5px;
    padding:8px 16px;
    border-radius:999px;
    background:rgba(255,255,255,.08);
}

.master{
    background:rgba(138,43,226,.18);
    border:1px solid rgba(138,43,226,.4);
    color:#d8b4fe;
}

.predator{
    background:rgba(220,38,38,.18);
    border:1px solid rgba(220,38,38,.4);
    color:#f87171;
}

.tags{
    display:flex;
    flex-wrap:wrap;
    gap:12px;
}

.tags span{
    padding:10px 18px;
    border-radius:999px;
    background:rgba(255,255,255,.08);
}

.poem-block{
    padding:60px 40px;
}

.poem-line{
    font-family:"Noto Serif SC","Source Han Serif CN","STSong",serif;
    font-size:22px;
    color:rgba(255,255,255,.55);
    line-height:2.8;
    letter-spacing:.15em;
    transition:.3s;
}

.poem-line:hover{
    color:rgba(255,255,255,.9);
}

.contact-grid{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:20px;
}

.contact-card{
    padding:25px;
    border-radius:18px;
    background:rgba(255,255,255,.05);
    border:1px solid rgba(255,255,255,.08);
    transition:.3s;
    text-decoration:none;
    color:var(--text);
    display:block;
}

.contact-card:hover{
    transform:translateY(-4px);
    background:rgba(255,255,255,.09);
    border-color:rgba(255,255,255,.18);
}

.contact-link:hover{
    border-color:rgba(247,217,109,.35);
}

.contact-card h3{
    color:var(--accent);
    margin-bottom:6px;
}

.contact-card p{
    color:var(--sub);
    font-size:13px;
    margin-bottom:12px;
}

.contact-icon{
    font-size:24px;
    margin-bottom:12px;
}

.contact-handle{
    display:inline-block;
    font-size:14px;
    font-weight:600;
    color:rgba(255,255,255,.75);
    background:rgba(255,255,255,.07);
    border:1px solid rgba(255,255,255,.12);
    border-radius:999px;
    padding:4px 12px;
}

.music-widget{
    position:fixed;
    right:25px;
    bottom:25px;
    width:320px;
    box-shadow:0 8px 30px rgba(0,0,0,.35);
    background:rgba(12,16,28,.95);
    border:1px solid rgba(255,255,255,.1);
    border-radius:20px;
    padding:16px;
    z-index:9999;
    transition:all .3s ease;
}

.music-header{
    font-weight:700;
    margin-bottom:8px;
}

#song-name{
    color:var(--sub);
    margin-bottom:15px;
}

.music-controls{
    display:flex;
    gap:10px;
}

.music-controls button{
    flex:1;
    border:none;
    cursor:pointer;
    padding:10px;
    border-radius:12px;
    background:rgba(255,255,255,.08);
    color:white;
    transition:.3s;
}

.music-controls button:hover{
    background:rgba(255,255,255,.15);
}

#backToTop{
    position:fixed;
    right:0;
    bottom:160px;
    width:48px;
    height:48px;
    border:none;
    border-radius:50%;
    cursor:pointer;
    background:rgba(255,255,255,.12);
    color:white;
    z-index:9999;
    display:none;
}

footer{
    text-align:center;
    padding:60px 20px;
    color:var(--sub);
}

@media(max-width:768px){
    .navbar{
        padding:0 20px;
    }
    .nav-links{
        display:none;
    }
    .about-card{
        flex-direction:column;
        text-align:center;
    }
    .music-widget{
        width:90%;
        right:5%;
    }
    .hero h1{
        font-size:52px;
    }
    .quote-card{
        font-size:18px;
    }
}

/* ===== Story ===== */

.story-card{
    margin:auto;
}

.story-title{
    margin-bottom:25px;
}

.language-switch{
    display:flex;
    gap:8px;
    margin-bottom:30px;
    flex-wrap:wrap;
}

.lang-btn{
    border:1px solid rgba(255,255,255,.15);
    cursor:pointer;
    padding:7px 18px;
    border-radius:999px;
    background:rgba(255,255,255,.05);
    color:#b8c0d0;
    font-weight:600;
    font-size:13px;
    letter-spacing:.04em;
    transition:all .2s;
    display:inline-flex;
    align-items:center;
    gap:6px;
}

.lang-btn:hover:not(.active){
    border-color:rgba(255,255,255,.35);
    background:rgba(255,255,255,.08);
    color:white;
}

.lang-btn.active{
    border-color:rgba(255,255,255,.7);
    background:rgba(255,255,255,.1);
    color:white;
}

.story-content{
    display:none;
    animation:fadeStory .4s ease;
}

.story-content.active{
    display:block;
}

.story-content p{
    line-height:2;
    margin-bottom:20px;
    color:var(--sub);
    font-size:18px;
    text-align:justify;
}

.story-content blockquote{
    margin-top:30px;
    padding:20px;
    border-left:4px solid var(--accent);
    background:rgba(255,255,255,.04);
    border-radius:12px;
    font-style:italic;
    color:white;
}

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

/* ===== About ===== */

.about-alias{
    font-size:15px;
    color:var(--sub);
    margin-bottom:18px;
    letter-spacing:.04em;
}

.about-interests{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    margin-bottom:22px;
    align-items:center;
}

.interest-primary{
    padding:8px 18px;
    border-radius:999px;
    background:rgba(255,255,255,.1);
    border:1px solid rgba(255,255,255,.2);
    font-size:14px;
    font-weight:600;
    color:white;
}

.interest-secondary{
    padding:5px 13px;
    border-radius:999px;
    background:rgba(255,255,255,.04);
    border:1px solid rgba(255,255,255,.08);
    font-size:12px;
    color:rgba(255,255,255,.45);
}

.about-quote{
    font-size:15px;
    color:rgba(255,255,255,.35);
    font-style:italic;
    letter-spacing:.06em;
    margin-top:4px;
}

/* ===== Apex Career ===== */

.career-seasons{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    margin-bottom:20px;
}

.career-details{
    display:flex;
    flex-direction:column;
    gap:10px;
}

.career-details p{
    font-size:15px;
    color:var(--sub);
}

/* ===== Music Progress ===== */

.music-progress-wrap{
    width:100%;
    height:3px;
    background:rgba(255,255,255,.1);
    border-radius:999px;
    margin-bottom:14px;
    cursor:pointer;
    overflow:hidden;
}

#music-progress-bar{
    height:100%;
    width:0%;
    background:var(--accent);
    border-radius:999px;
    transition:width .5s linear;
}

/* ===== Contact grid mobile ===== */

@media(max-width:768px){
    .contact-grid{
        grid-template-columns:repeat(2,1fr);
    }
}

/* ===== Apex Card ===== */

.apex-card{
    position:relative;
    overflow:hidden;
}

.apex-logo-bg{
    position:absolute;
    top:50%;
    right:-20px;
    transform:translateY(-50%);
    width:280px;
    height:280px;
    background:url("images/apex-logo.png") center/contain no-repeat;
    opacity:.04;
    pointer-events:none;
    z-index:0;
}

.apex-card > *:not(.apex-logo-bg){
    position:relative;
    z-index:1;
}

/* ===== Music Widget Toggle ===== */

.music-toggle{
    display:flex;
    align-items:center;
    gap:8px;
    cursor:pointer;
    user-select:none;
    padding:2px 0;
}

.music-toggle-label{
    flex:1;
    font-weight:700;
}

.music-toggle-arrow{
    font-size:10px;
    color:var(--sub);
    transition:transform .3s;
}

.music-body{
    overflow:hidden;
    max-height:200px;
    transition:max-height .3s ease, opacity .3s ease, margin .3s ease;
    margin-top:12px;
    opacity:1;
}

.music-widget.collapsed .music-body{
    max-height:0;
    opacity:0;
    margin-top:0;
}

/* ===== Twikoo ===== */

#twikoo-container .tk-submit .el-button--primary{
    background:var(--accent);
    border-color:var(--accent);
    color:#111;
}

#twikoo-container .tk-input input,
#twikoo-container .tk-input textarea,
#twikoo-container .el-textarea__inner,
#twikoo-container .el-input__inner{
    background:rgba(255,255,255,.06) !important;
    border-color:rgba(255,255,255,.12) !important;
    color:white !important;
}

#twikoo-container .tk-comment{
    border-bottom:1px solid rgba(255,255,255,.06);
}

#twikoo-container .tk-nick{
    color:var(--accent);
}

#twikoo-container .tk-content{
    color:var(--sub);
}

#twikoo-container .tk-meta{
    color:rgba(255,255,255,.3);
}

/* ===== ALS Real-time Stats ===== */

.als-stats{
    margin-top:28px;
    padding-top:24px;
    border-top:1px solid rgba(255,255,255,.08);
}

.als-loading{
    color:var(--sub);
    font-size:14px;
}

.als-error{
    color:rgba(255,100,100,.7);
    font-size:14px;
}

.als-grid{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:16px;
    margin-bottom:16px;
}

.als-item{
    background:rgba(255,255,255,.05);
    border:1px solid rgba(255,255,255,.08);
    border-radius:14px;
    padding:16px;
    text-align:center;
}

.als-item .als-value{
    font-size:18px;
    font-weight:700;
    color:var(--accent);
}

.als-item .als-label{
    font-size:12px;
    color:var(--sub);
    margin-top:4px;
}

.als-online{
    display:inline-block;
    width:10px;
    height:10px;
    border-radius:50%;
    background:#4ade80;
    margin-right:6px;
    vertical-align:middle;
}

.als-offline{
    display:inline-block;
    width:10px;
    height:10px;
    border-radius:50%;
    background:var(--sub);
    margin-right:6px;
    vertical-align:middle;
}

/* Legend Card */

.als-legend-card{
    position:relative;
    border-radius:16px;
    overflow:hidden;
    border:1px solid rgba(255,255,255,.08);
    background:rgba(255,255,255,.04);
}

.als-legend-banner{
    position:absolute;
    inset:0;
    width:100%;
    height:100%;
    object-fit:cover;
    opacity:.12;
    pointer-events:none;
}

.als-legend-body{
    position:relative;
    z-index:1;
    padding:18px 20px;
}

.als-legend-header{
    display:flex;
    align-items:center;
    gap:12px;
    margin-bottom:14px;
}

.als-legend-icon{
    width:40px;
    height:40px;
    border-radius:50%;
    border:2px solid rgba(255,255,255,.2);
    object-fit:cover;
}

.als-legend-name{
    font-size:18px;
    font-weight:700;
    color:white;
}

.als-detail-row{
    display:flex;
    align-items:center;
    gap:10px;
    margin-bottom:8px;
    flex-wrap:wrap;
}

.als-detail-label{
    font-size:13px;
    color:var(--sub);
    min-width:60px;
}

.als-detail-value{
    font-size:14px;
    font-weight:600;
    display:flex;
    align-items:center;
    gap:8px;
    flex-wrap:wrap;
}

.als-rarity-badge{
    font-size:11px;
    font-weight:600;
    padding:2px 8px;
    border-radius:999px;
    border:1px solid;
    opacity:.85;
}

.als-trackers{
    display:flex;
    flex-direction:column;
    gap:6px;
    margin-top:6px;
}

.als-tracker-item{
    display:flex;
    justify-content:space-between;
    align-items:center;
    background:rgba(255,255,255,.05);
    border-radius:8px;
    padding:7px 12px;
    font-size:13px;
}

.als-tracker-name{
    color:var(--sub);
}

.als-tracker-value{
    font-weight:700;
    color:var(--accent);
}

.als-credit{
    font-size:11px;
    color:rgba(255,255,255,.2);
    margin-top:12px;
    text-align:right;
}

@media(max-width:768px){
    .als-grid{
        grid-template-columns:repeat(2,1fr);
    }
    .als-detail-row{
        flex-direction:column;
        align-items:flex-start;
        gap:4px;
    }
}

.beian{
    margin-top:10px;
    font-size:14px;
}

.beian a{
    color:var(--sub);
    text-decoration:none;
    transition:.3s;
}

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