/* css/all.css — all.html 暗色主题卡片样式 */

/* 暗色主题变量 */
:root {
    --bg-dark: #121212;
    --text-main: rgba(255, 255, 255, 0.9);
    --text-muted: #c0c0c0;
    --card-transition: cubic-bezier(0.34, 1.56, 0.64, 1);
    --primary: #fd99cb;
    --accent: #6699ff;
}

/* all.html 页面专属暗色背景 */
body {
    background: var(--bg-dark);
    background-attachment: fixed;
    color: var(--text-main);
}

#bodyContainer {
    background: transparent;
}

/* 滚动条 */
::-webkit-scrollbar {
    display: block;
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 2em;

}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary), var(--accent), #fec001);
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-main);
    background-clip: padding-box;
}

::-webkit-scrollbar-corner {
    background-color: transparent;
}

/* 标题暗色适配 */
#title {
    color: rgba(255, 255, 255, 0.9);
    animation: titleShadow 13s linear infinite;
}

@keyframes titleShadow {
    0% {
        text-shadow: #f34f6d 0 0 8px, #f34f6d 0 0 16px;
    }

    16.7% {
        text-shadow: #2681c8 0 0 8px, #2681c8 0 0 16px;
    }

    33.3% {
        text-shadow: #ffc30b 0 0 8px, #ffc30b 0 0 16px;
    }

    50% {
        text-shadow: #0fbe94 0 0 8px, #0fbe94 0 0 16px;
    }

    66.6% {
        text-shadow: #8dbbff 0 0 8px, #8dbbff 0 0 16px;
    }

    83.3% {
        text-shadow: #f39800 0 0 8px, #f39800 0 0 16px;
    }

    100% {
        text-shadow: #f34f6d 0 0 8px, #f34f6d 0 0 16px;

    }
}

/* 卡片网格 */
#card-container {
    display: grid;
    width: 90%;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 24px;
}

/* 卡片 */
.card {
    background: transparent;
    position: relative;
    border: none;
    padding: 1px;
    overflow: hidden;
    transition: all 0.4s var(--card-transition);
    display: flex;
    flex-direction: column;
    cursor: pointer;
    opacity: 0;
    animation: fadeUp 1.2s ease forwards;
}

/* 鼠标追光效果 */
.card::before {
    content: '';
    position: absolute;
    border: none;
    inset: 0;
    padding: 1px;
    background: radial-gradient(circle,
            var(--card-glow-next, #ff74b8) 0,
            var(--card-glow, #ff74b8) 100px,
            transparent 200px);
    background-size: 400px 400px;
    background-repeat: no-repeat;
    background-position: calc(var(--x, -10000px) - 200px) calc(var(--y, -10000px) - 200px);
    transition: background-position .2s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 0;
    pointer-events: none;
    -webkit-mask:
        linear-gradient(#000 0 0) padding-box,
        linear-gradient(#000 0 0) content-box;
    -webkit-mask-composite: xor;
    mask:
        linear-gradient(#000 0 0) padding-box,
        linear-gradient(#000 0 0) content-box;
    mask-composite: exclude;
}

@keyframes fadeUp {
    to {
        opacity: 1;
    }
}

.card:hover {
    box-shadow: 0 0 8px var(--card-glow, var(--text-main)) inset,
        0 0 12px var(--card-glow, var(--text-main));
    z-index: 2;
}

/* 图片区域 */
.card .imgwrap {
    position: relative;
    background: transparent;
    width: 100%;
    aspect-ratio: 3 / 4;
    border: none;
    z-index: 10;
    overflow: hidden;
}

.card .imgwrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    display: block;
    border: none;
    transition: transform 0.6s ease;
}

.card:hover .imgwrap img {
    transform: scale(1.05);
}

/* 名称区域 */
.card .name {
    position: relative;
    z-index: 1;
    background: transparent;
    padding: 12px 14px;
    flex: 1;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
    text-shadow: 0 0 8px var(--card-name, var(--text-main));
    text-align: center;
}

#radarChart {
    height: 260px;
    margin-top: 10px;
}

/* Modal */
#modal {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.7) url('../assets/img/bg_geo_pc.svg') center / 100%;
    backdrop-filter: blur(10px);
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: opacity 0.6s, visibility 0.6s;
}

#modal.open {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
}

#modal .modal-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-height: 90%;
}

#modal .dialog {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 16px;
    max-width: 700px;
    width: 90vw;
    padding: 20px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    animation: dialogShadow 12s linear infinite;
    filter: drop-shadow(rgba(71, 68, 150, 0.25) 0px 6px 8px);
}

@keyframes dialogShadow {
    0% {
        box-shadow: var(--dialog-color, var(--text-main)) 0 0 6px inset;
    }

    50% {
        box-shadow: var(--dialog-color, var(--text-main)) 0 0 14px inset;
    }

    100% {
        box-shadow: var(--dialog-color, var(--text-main)) 0 0 6px inset;
    }
}

#modal .dialog::before,
#modal .dialog::after {
    position: absolute;
    display: block;
    content: "";
    width: 120px;
    height: 120px;
    background: url('../assets/img/icon_tri.svg') center / contain no-repeat;
    pointer-events: none;
    z-index: 0;
}

#modal .dialog::before {
    top: 0;
    left: 0;
}

#modal .dialog::after {
    bottom: 0;
    right: 0;
    transform: scale(-1, -1);
}

/* Modal 关闭按钮 */
#modal .close {
    display: block;
    position: relative;
    width: 48px;
    margin-top: 20px;
    cursor: pointer;
    filter: drop-shadow(rgba(71, 68, 150, 0.25) 0px 6px 8px);
    transition: filter 0.3s;
    flex-shrink: 0;
}

#modal .close img {
    display: block;
    width: 100%;
    transition: opacity 0.3s;
}

#modal .close .close-hover {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
}

#modal .close:hover {
    filter: none;
}

#modal .close:hover .close-off {
    opacity: 0;
}

#modal .close:hover .close-hover {
    opacity: 1;
}

#detail-content {
    display: flex;
    gap: 16px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

#detail-content::-webkit-scrollbar {
    display: none;
}

#detail-content .text {
    flex: 1;
    user-select: text;

}

#detail-content .text h2 {
    color: var(--text-main);
    margin: 12px 0 16px 12px;
    padding-bottom: 8px;
    text-shadow: 0 0 12px var(--h2shadow, var(--text-main));
}

#detail-content .avatar-frame {
    flex-shrink: 0;
    width: 300px;
}

#detail-content .avatar-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    border-radius: 8px;
}

#detail-content .info {
    margin: 8px 0;
    padding-left: 5rem;
    text-indent: -5rem;
    color: #333;
}

#detail-content .info strong {
    display: inline-block;
    width: 80px;
    text-indent: 0;
    color: #666;
}

#detail-content .info .spoiler {
    background: #a1a1a1;
    color: transparent;
    border-radius: 3px;
    transition: all 0.6s ease;
}

#detail-content .info .spoiler:hover {
    background: transparent;
    color: #333;
}

#detail-content .info-quote {
    padding-left: 0;
    text-indent: 0;
    text-align: center;
    color: var(--text-main);
    font-size: 18px;
    margin: 20px 0;
    text-shadow: 0 0 8px var(--quote-shadow, var(--text-main));
}

#detail-content .info-quote::before {
    content: "「";
}

#detail-content .info-quote::after {
    content: "」";
}

#detail-content .info-quote::before,
#detail-content .info-quote::after {
    font-size: 20px;
}


#detail-content a {
    color: #8dbbff;
}

/* 打字特效 */
#typing {
    margin-bottom: 36px;
    text-align: center;
    font-size: 36px;
    font-weight: 700;
    font-family: 'font-typing';
    color: black;
    text-shadow: #fff 0 0 3px, #fff 0 0 5px, #fff 0 0 7px, #fff 0 0 10px, #fff 0 0 12px, #fff 0 0 15px, #fff 0 0 20px;
}

#typing-intermark {
    letter-spacing: -0.5em;
}

#typing-rear {
    letter-spacing: -0.3em;
}

span#ex-mark {
    font-size: 36px;
    letter-spacing: -0.7em;
}

span#ex-mark1 {
    color: #f34f6d;
}

span#ex-mark2 {
    color: #2681c8;
}

span#ex-mark3 {
    color: #ffc30b;
}

span#ex-mark4 {
    color: #0fbe94;
}

span#ex-mark5 {
    color: #8dbbff;
}

span#ex-mark6 {
    color: #f39800;
}

@keyframes typing-blink {

    from,
    to {
        border-color: transparent;
    }

    50% {
        border-color: #fff;
    }
}

span#typing-mark {
    position: relative;
    top: -5px;
    margin-left: 2px;
    font-size: 28px;
    border-right: 2px solid #fff;
}

/* =========================================
   分页样式
   ========================================= */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 40px 0 60px;
    gap: 12px;
    flex-wrap: wrap;
    position: relative;
    z-index: 10;
}

.pg-btn {
    min-width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 6px;
    box-shadow: 0 0 8px var(--text-main);
    color: var(--text-muted);
    font-family: 'font-title';
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    backdrop-filter: blur(5px);
    position: relative;
    overflow: hidden;
}

.pg-btn:not(:disabled):hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 0 12px #fff;
    text-shadow: 0 0 8px #fff;
}

#pagination .pg-btn.active {
    background: linear-gradient(135deg, var(--accent), var(--primary));
    color: #fff;
    box-shadow: 0 0 8px var(--accent), 0 0 12px var(--primary);
    font-weight: bold;
    transform: scale(1.1);
    z-index: 1;
}

.pg-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.pg-dots {
    cursor: text;
    position: relative;
}

.pg-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: #fff;
    text-align: center;
    font-family: 'font-title';
    font-size: 16px;
    outline: none;
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
    transition: all 0.2s ease;
}

.pg-input::-webkit-outer-spin-button,
.pg-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.pg-input[type=number] {
    appearance: textfield;
    -moz-appearance: textfield;
}

#pagination .pg-dots.input-mode {
    box-shadow: 0 0 12px #fff;
}

.pg-dots.input-mode .pg-input {
    opacity: 1;
    transform: scale(1.05);
    pointer-events: auto;
}

.pg-dots.input-mode span {
    opacity: 0;
}

/* =========================================
   右下角按钮堆叠
   ========================================= */

/* =========================================
   移动端适配
   ========================================= */
@media screen and (max-width: 808px) {
    #bodyContainer {
        padding: 10px;
        width: 100%;
        box-sizing: border-box;
        padding-bottom: 80px;
    }

    /* 两列卡片网格 */
    #card-container {
        width: 100%;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .card .imgwrap {
        aspect-ratio: 3 / 4;
    }

    /* Modal 移动端 */
    #modal .dialog {
        width: 92%;
        min-width: 400px;
        max-height: 85vh;
        padding: 20px 15px;
        display: flex;
        flex-direction: column;
    }

    #detail-content {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    #detail-content .avatar-frame {
        order: -1;
    }

    #detail-content .text {
        width: 100%;
    }

    #detail-content .text h2 {
        text-align: center;
        margin-top: 0;
        font-size: 1.5rem;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
        padding-bottom: 15px;
        margin-bottom: 15px;
    }

    #detail-content .info {
        padding-left: 0;
        text-indent: 0;
        display: flex;
        font-size: 14px;
        margin: 6px 0;
        line-height: 1.4;
    }

    #detail-content .info>span {
        flex: 1;
        min-width: 0;
    }

    #detail-content .info-quote {
        font-size: 16px;
        margin: 16px 0;
        display: block;
    }

    #detail-content .info-quote::before,
    #detail-content .info-quote::after {
        font-size: 18px;
    }

    #detail-content .info strong {
        width: 70px;
        flex-shrink: 0;
    }

    #radarChart {
        height: 280px;
        margin-top: 10px;
    }

    /* 头像装饰框 */
    #detail-content .avatar-frame {
        position: relative;
        width: 148px;
        height: 148px;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 10px auto;
    }

    #detail-content .avatar-frame::before {
        content: '';
        position: absolute;
        inset: -4px;
        border-radius: 50%;
        background: conic-gradient(from 0deg,
                var(--avatar-color, #8dbbff) 0%,
                transparent 25%,
                var(--avatar-color, #8dbbff) 50%,
                transparent 75%,
                var(--avatar-color, #8dbbff) 100%);
        animation: avatar-spin 4s linear infinite;
        opacity: 0.8;
        -webkit-mask: radial-gradient(circle, transparent 69%, black 70%);
        mask: radial-gradient(circle, transparent 69%, black 70%);
    }

    #detail-content .avatar-frame img {
        position: relative;
        z-index: 1;
        width: 140px;
        height: 140px;
        border-radius: 50%;
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.3),
            0 0 15px var(--avatar-color, rgba(71, 68, 150, 0.3));
        object-fit: cover;
        object-position: top;
        margin-top: 0;
        animation: avatar-fadeIn 0.6s ease-out;
    }


    #modal .close {
        width: 40px;
        margin-top: 16px;
    }

    #modal .dialog::before,
    #modal .dialog::after {
        width: 80px;
        height: 80px;
    }

    /* 分页移动端 */
    .pagination-wrapper {
        margin: 40px 0 0;
        gap: 8px;
    }

    .pg-btn {
        min-width: 32px;
        height: 32px;
        font-size: 14px;
    }
}

@keyframes avatar-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes avatar-fadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@media (max-width: 480px) {
    #card-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .card .name {
        font-size: 13px;
        padding: 8px 6px;
    }

    #typing {
        font-size: 26px;
    }

    span#ex-mark {
        font-size: 26px;
    }

    span#typing-mark {
        font-size: 22px;
    }
}

/* 生日提醒卡片 */
.birthday-reminder {
    position: fixed;
    right: -360px;
    width: 320px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(17, 24, 39, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px 0 0 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 0 20px rgba(255, 116, 184, 0.1);
    z-index: 999;
    transition: right 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: default;
}

.birthday-reminder.show {
    right: 0;
}

.birthday-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    object-position: top;
    flex-shrink: 0;
}

.birthday-info {
    flex: 1;
    min-width: 0;
    user-select: text;
}

.birthday-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 6px;
}

.birthday-msg {
    font-size: 14px;
    color: var(--text-main);
}

@media (max-width: 808px) {
    .birthday-reminder {
        width: 260px;
        right: -280px;
        padding: 12px;
    }

    .birthday-avatar {
        width: 44px;
        height: 44px;
    }

    .birthday-name {
        font-size: 14px;
    }

    .birthday-msg {
        font-size: 12px;
    }
}