/* 共享样式合并：通用、首页与 Ciallo 页面样式 */
:root {
    --bg-gradient: linear-gradient(135deg, rgba(142, 197, 252, 0.7), rgba(224, 195, 252, 0.7), rgba(251, 194, 235, 0.7));
    --primary-gradient: linear-gradient(90deg, #ff6ec7, #6a5af9);
    --purple-shadow: rgba(106, 90, 249, 0.5);
    --mobile-glass-bg: rgba(255, 255, 255, 0.08);
    --mobile-glass-hover: rgba(255, 255, 255, 0.15);
}

html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
}

*,
*::before,
*::after {
    box-sizing: inherit;
}

body {
    font-family: "Segoe UI", "PingFang SC", sans-serif;
    background: var(--bg-gradient), url('../img/bg.jpg') center/cover no-repeat fixed;
    background-attachment: fixed;
    width: 100%;
    height: 100%;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 顶层容器（首页） */
.container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.container>.card {
    text-align: center;
    backdrop-filter: blur(14px);
    background: rgba(255, 255, 255, 0.12);
    border-radius: 26px;
    padding: 36px 28px;
    width: 90%;
    max-width: 460px;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.5), 0 0 8px rgba(160, 120, 255, 0.28);
    animation: fadeIn 1s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

h1 {
    font-size: 2.2rem;
    margin: 0 0 22px 0;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 18px var(--purple-shadow);
}

.qq {
    font-size: 1.1rem;
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 12px 20px;
    display: inline-block;
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.18);
    margin: 8px 0;
}

.ciallo-btn {
    margin-top: 24px;
    padding: 14px 32px;
    font-size: 1.2rem;
    background: linear-gradient(135deg, #ff6ec7, #6a5af9);
    color: white;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(106, 90, 249, 0.4);
    transition: all 0.3s ease;
    font-weight: bold;
    text-decoration: none;
    display: inline-block;
}

.ciallo-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(106, 90, 249, 0.6);
}

.ciallo-btn:active {
    transform: translateY(-1px);
}

/* Ciallo 页面特定样式 */
.ciallo {
    position: absolute;
    font-size: 2rem;
    font-weight: bold;
    pointer-events: none;
    animation: float 3s ease-out forwards;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    user-select: none;
    /* 新增：强制不换行 */
    white-space: nowrap;
    /* 新增：溢出内容隐藏 */
    overflow: hidden;
    text-overflow: clip;
    max-width: calc(100vw - 20px);
}

@keyframes float {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    100% {
        opacity: 0;
        transform: translateY(-200px) scale(1.5);
    }
}

.instruction {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 1.2rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    animation: pulse 2s infinite;
    pointer-events: none;
    text-align: center;
    padding: 0 10px;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }
}

/* 返回按钮 */
.back-button {
    position: fixed;
    top: 20px;
    left: 20px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all .3s ease;
    z-index: 1000;
}

.back-button:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: translateY(-2px);
}

/* 社交按钮样式 - 电脑端完全保留原始渐变矩形+文字 */
.social-buttons {
    position: fixed;
    top: 12px;
    right: 12px;
    display: flex;
    gap: 8px;
    z-index: 9999;
    align-items: center;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 10px;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
    transition: transform .12s, box-shadow .12s, background .12s;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
}

.social-btn.tg {
    background: linear-gradient(90deg, #00A6D6, #0088cc);
}

.social-btn.discord {
    background: linear-gradient(90deg, #5865F2, #4752C4);
}

.social-btn img {
    width: 20px;
    height: 20px;
    display: block;
}

.social-btn .label {
    color: #fff;
    line-height: 1;
}

.social-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
    opacity: 0.98;
}

.social-btn:focus {
    outline: none;
}

.social-btn:active {
    transform: translateY(0);
}

/* 自定义右键菜单 */
.custom-context-menu {
    position: fixed;
    z-index: 20000;
    background: rgba(20, 20, 20, 0.98);
    color: #fff;
    border-radius: 8px;
    padding: 6px 6px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    min-width: 160px;
    font-size: 14px;
}

.custom-context-menu .item {
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 6px;
}

.custom-context-menu .item:hover {
    background: rgba(255, 255, 255, 0.06);
}

/* 响应式 - 768px以下移动端：圆形+玻璃透明质感 */
@media (max-width: 768px) {
    .container>.card {
        padding: 28px 24px;
        max-width: 100%;
    }

    h1 {
        font-size: 1.8rem;
        margin-bottom: 16px;
    }

    .qq {
        font-size: 1rem;
        padding: 10px 16px;
    }

    .ciallo-btn {
        padding: 12px 28px;
        font-size: 1rem;
    }

    .back-button {
        top: 15px;
        left: 15px;
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    /* 移动端核心修改：圆形+玻璃透明+隐藏文字 */
    .social-btn {
        width: 44px;
        height: 44px;
        padding: 0 !important;
        gap: 0 !important;
        border-radius: 50% !important;
        -webkit-border-radius: 50% !important;
        -moz-border-radius: 50% !important;
        justify-content: center;
        /* 玻璃透明核心样式 */
        background: var(--mobile-glass-bg) !important;
        backdrop-filter: blur(8px) !important;
        -webkit-backdrop-filter: blur(8px) !important;
        border: none;
    }

    /* 移动端hover：玻璃质感增强 */
    .social-btn:hover {
        background: var(--mobile-glass-hover) !important;
    }

    .social-btn .label {
        display: none !important;
    }

    .social-btn img {
        width: 20px;
        height: 20px;
    }
}

/* 480px以下小屏移动端：按钮轻微缩小 */
@media (max-width: 480px) {
    body {
        background-attachment: scroll;
    }

    .container>.card {
        padding: 20px 16px;
        border-radius: 16px;
        box-shadow: 0 0 15px rgba(255, 255, 255, 0.4), 0 0 6px rgba(160, 120, 255, 0.3);
    }

    h1 {
        font-size: 1.5rem;
        margin-bottom: 12px;
    }

    .qq {
        font-size: 0.9rem;
        padding: 8px 12px;
    }

    .ciallo-btn {
        margin-top: 16px;
        padding: 10px 24px;
        font-size: 0.95rem;
        width: calc(100% - 48px);
        max-width: 280px;
    }

    .social-buttons {
        gap: 8px;
        padding: 2px;
    }

    /* 小屏移动端按钮缩小 */
    .social-btn {
        width: 40px;
        height: 40px;
    }

    .social-btn img {
        width: 18px;
        height: 18px;
    }

    .back-button {
        top: 10px;
        left: 10px;
        padding: 8px 16px;
        font-size: 0.8rem;
    }

    .ciallo {
        font-size: 1.2rem;
        max-width: calc(100vw - 10px);
    }

    @keyframes float {
        0% {
            opacity: 1;
            transform: translateY(0) scale(1);
        }

        100% {
            opacity: 0;
            transform: translateY(-150px) scale(1.3);
        }
    }

    .custom-context-menu {
        min-width: 140px;
        font-size: 13px;
    }
}

/* 小提示：如果背景仍未显示，确保文件存在： assets/img/bg.jpg */