@charset "UTF-8";

/* Auth Buttons V7 Ultimate - compact neon navigation */
:root {
    /* Login / Register 按钮高度 */
    --tg-btn-height: 33px;

    /* Login / Register 按钮最小宽度 */
    --tg-btn-min-width: 100px;

    /* 按钮文字左右内边距 */
    --tg-btn-padding: 10px;

    /* 按钮圆角，999px 表示胶囊形状 */
    --tg-btn-radius: 999px;

    /* 按钮文字大小 */
    --tg-btn-font-size: 12px;

    /* 按钮文字粗细：
       400 = 正常
       600 = 半粗
       700 = 粗体
       800 = 很粗 */
    --tg-btn-font-weight: 800;

    /* Login 和 Register 两个按钮之间的距离 */
    --tg-gap: 10px;

    /* 整个按钮区域上下外边距 */
    --tg-margin: 1px;

    /* 整个按钮容器上下内边距 */
    --tg-padding-y: 6px;

    /* 整个按钮容器左右内边距 */
    --tg-padding-x: 10px;

    /* 电脑版浮动按钮距离屏幕底部的位置 */
    --tg-float-bottom: 10px;

    /* Login 按钮渐变色：第一个颜色 */
    --tg-login-1: #1e8a58;

    /* Login 按钮渐变色：第二个颜色 */
    --tg-login-2: #0072ff;

    /* Register 按钮渐变色：第一个颜色 */
    --tg-register-1: #ff4e50;

    /* Register 按钮渐变色：第二个颜色 */
    --tg-register-2: #f9d423;

    /* Login 按钮阴影 */
    --tg-login-shadow:
        0 8px 22px rgba(30, 138, 88, .28);

    /* Register 按钮阴影 */
    --tg-register-shadow:
        0 8px 22px rgba(249, 212, 35, .28);

    /* 默认金色备用颜色 */
    --tg-gold: #ffd56b;

    /* 手机版底部导航普通文字和图标的默认颜色
       JS 会优先读取网站颜色并自动覆盖 */
    --tg-site-text-color: #f5f5f5;

    /* Home 和 Promos 的默认强调颜色
       JS 会优先读取网站主题颜色并自动覆盖 */
    --tg-site-accent-color: #ffd56b;

    /* Promos 外层旋转圆环的默认颜色
       JS 会尝试读取网站默认按钮背景色并覆盖 */
    --tg-site-button-color: #d6a62e;

    /* 手机版底部导航背景色
       最后的 .78 是透明度：
       0 = 完全透明
       1 = 完全不透明 */
    --tg-nav-bg: rgba(20, 16, 10, .78);
}

#tg-auth-buttons,
#tg-auth-buttons * ,
#tg-mobile-nav,
#tg-mobile-nav * {
    box-sizing: border-box;
}

/* 电脑版登录/注册按钮的初始位置 */
#tg-auth-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--tg-gap);
    width: auto;
    max-width: 100%;
    margin: var(--tg-margin) auto;
    padding: var(--tg-padding-y) var(--tg-padding-x);
    z-index: 2147483646;
}

/* 左对齐 */
#tg-auth-buttons.tg-auth-left {
    justify-content: flex-start;
    margin-left: 0;
    margin-right: auto;
}

/* 居中对齐（默认） */
#tg-auth-buttons.tg-auth-center {
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
}

/* 右对齐 */
#tg-auth-buttons.tg-auth-right {
    justify-content: flex-end;
    margin-left: auto;
    margin-right: 0;
}

/* 占位元素，用于保持页面布局不抖动 */
.tg-auth-placeholder {
    box-sizing: border-box;
    visibility: hidden;
    pointer-events: none;
}

/* 登录/注册按钮通用样式 */
#tg-auth-buttons .tg-auth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: var(--tg-btn-min-width);
    height: var(--tg-btn-height);
    padding: 0 var(--tg-btn-padding);
    border: 0;
    border-radius: var(--tg-btn-radius);
    color: #fff;
    text-decoration: none;
    text-align: center;
    line-height: 1;
    white-space: nowrap;
    font-family: inherit;
    font-size: var(--tg-btn-font-size);
    font-weight: var(--tg-btn-font-weight);
    letter-spacing: .2px;
    cursor: pointer;
    background-size: 300% 300%;
    /* 渐变背景动画 + 上下浮动动画 */
    animation: tgAuthGradient 5s ease infinite, tgAuthFloat 1.8s ease-in-out infinite;
    transition: transform .25s ease, opacity .25s ease, box-shadow .25s ease;
}

/* Login 按钮渐变和阴影 */
#tg-auth-buttons .tg-login {
    background-image: linear-gradient(270deg, var(--tg-login-1), var(--tg-login-2), var(--tg-login-1));
    box-shadow: var(--tg-login-shadow);
}

/* Register 按钮渐变和阴影 */
#tg-auth-buttons .tg-register {
    background-image: linear-gradient(270deg, var(--tg-register-1), var(--tg-register-2), var(--tg-register-1));
    box-shadow: var(--tg-register-shadow);
}

/* 按钮悬停/聚焦效果 */
#tg-auth-buttons .tg-auth-btn:hover,
#tg-auth-buttons .tg-auth-btn:focus-visible {
    color: #fff;
    text-decoration: none;
    opacity: .95;
    transform: translateY(-2px) scale(1.04);
}

/* 浮动状态（滚动后固定在底部） */
#tg-auth-buttons.tg-auth-floating {
    position: fixed;
    left: 50%;
    bottom: var(--tg-float-bottom);
    width: auto;
    margin: 0;
    padding: 0;
    transform: translate(-50%, 120px);
    opacity: 0;
    pointer-events: none;
    background: transparent;
    border: 0;
    box-shadow: none;
    transition: transform .35s ease, opacity .35s ease;
}

/* 浮动按钮显示状态 */
#tg-auth-buttons.tg-auth-floating.tg-auth-show {
    transform: translate(-50%, 0);
    opacity: 1;
    pointer-events: auto;
}

/* 手机版底部导航默认隐藏（由JS控制显示） */
#tg-mobile-nav {
    display: none;
}

/* ========== 手机版响应式 ========== */
@media (max-width: 767px) {
    /* 手机版按钮间距和边距调整 */
    #tg-auth-buttons {
        gap: 12px;
        margin: 10px auto;
        padding: 4px 12px;
    }

    #tg-auth-buttons .tg-auth-btn {
        min-width: 100px;
        height: 30px;
        padding: 0 10px;
        font-size: 14px;
    }

    /* 手机版隐藏桌面浮动按钮（用底部导航栏代替） */
    #tg-auth-buttons.tg-auth-floating {
        display: none !important;
    }

    /* ===== 手机底部五键导航栏 ===== */
    #tg-mobile-nav {
        position: fixed;
        right: auto;
        bottom: max(8px, env(safe-area-inset-bottom));
        left: 50%;
        z-index: 2147483647;
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        align-items: stretch;
        width: calc(100vw - 16px);
        max-width: calc(100vw - 16px);
        height: 50px;
        margin: 0 !important;
        padding: 0 4px;
        overflow: visible;
        border: 1px solid transparent;
        border-radius: 15px;
        background:
            linear-gradient(var(--tg-nav-bg), var(--tg-nav-bg)) padding-box,
            linear-gradient(90deg, #14d9ff, #8b5cff 28%, #ff3fd8 52%, #ff8a2b 76%, #ffe25c) border-box;
        box-shadow:
            0 8px 24px rgba(0, 0, 0, .48),
            0 0 16px rgba(99, 76, 255, .20),
            inset 0 1px rgba(255, 255, 255, .08);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        transform: translate(-50%, 110px);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: transform .35s ease, opacity .35s ease, visibility .35s ease;
    }

    /* 导航栏显示状态 */
    #tg-mobile-nav.tg-mobile-nav-show {
        transform: translate(-50%, 0);
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    /* 每个导航项 */
    #tg-mobile-nav .tg-nav-item {
        position: relative;
        display: block;
        min-width: 0;
        height: 48px;
        padding: 0 1px;
        color: var(--tg-site-text-color);
        text-decoration: none;
        -webkit-tap-highlight-color: transparent;
    }

    /* 导航项悬停/聚焦/首页高亮 */
    #tg-mobile-nav .tg-nav-item:hover,
    #tg-mobile-nav .tg-nav-item:focus-visible,
    #tg-mobile-nav .tg-nav-home {
        color: var(--tg-site-accent-color);
    }

    /* 导航图标 */
    #tg-mobile-nav .tg-nav-icon {
        position: absolute;
        top: 6px;
        left: 50%;
        display: block;
        width: 20px;
        height: 20px;
        transform: translateX(-50%);
        fill: currentColor;
        filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .35));
    }

    /* 导航文字标签 */
    #tg-mobile-nav .tg-nav-label {
        position: absolute;
        right: 0;
        bottom: 5px;
        left: 0;
        display: block;
        max-width: 100%;
        min-height: 11px;
        overflow: hidden;
        font-size: 10.5px;
        font-weight: 700;
        line-height: 1;
        text-align: center;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    /* 五个导航图标使用不同霓虹色，文字保持清晰 */
    #tg-mobile-nav .tg-nav-home { color: #50dcff; }
    #tg-mobile-nav .tg-nav-games { color: #c76dff; }
    #tg-mobile-nav .tg-nav-vip { color: #55d7ff; }
    #tg-mobile-nav .tg-nav-login { color: #ff5ca8; }

    #tg-mobile-nav .tg-nav-item .tg-nav-icon {
        filter: drop-shadow(0 0 5px currentColor) drop-shadow(0 2px 3px rgba(0, 0, 0, .35));
    }

    #tg-mobile-nav .tg-nav-label {
        color: #ffffff;
        text-shadow: 0 1px 3px rgba(0, 0, 0, .75);
    }

    #tg-mobile-nav .tg-nav-promo .tg-nav-label {
        color: #ffe86b;
        text-shadow: 0 0 7px rgba(255, 209, 64, .55);
    }

    /* ===== 中间 Promo 按钮（大圆环） ===== */
    #tg-mobile-nav .tg-nav-promo {
        padding: 0 1px;
        color: var(--tg-site-accent-color);
    }

    /* Promo 图标外圈容器 */
    #tg-mobile-nav .tg-nav-promo .tg-nav-icon-wrap {
        position: absolute;
        top: -12px;
        left: 50%;
        transform: translateX(-50%);
        isolation: isolate;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        flex: 0 0 40px;
        margin: 0;
        border: 0;
        border-radius: 50%;
        background: transparent;
        box-shadow:
            0 0 0 3px rgba(153, 92, 255, .14),
            0 4px 12px rgba(0, 0, 0, .52),
            0 0 13px rgba(255, 70, 210, .34),
            0 0 18px rgba(255, 170, 40, .24);
    }

    /* Promo 圆环的伪元素（旋转外圈 + 内圈背景） */
    #tg-mobile-nav .tg-nav-promo .tg-nav-icon-wrap::before,
    #tg-mobile-nav .tg-nav-promo .tg-nav-icon-wrap::after {
        content: "";
        position: absolute;
        border-radius: 50%;
    }

    /* 旋转渐变色外圈 */
    #tg-mobile-nav .tg-nav-promo .tg-nav-icon-wrap::before {
        inset: 0;
        z-index: -2;
        background: conic-gradient(from 0deg, #18d9ff, #775cff 24%, #ff3fd8 49%, #ff7a2f 72%, #ffe45c 88%, #18d9ff);
        box-shadow: 0 0 12px rgba(255, 70, 210, .38), 0 0 18px rgba(24, 217, 255, .22);
        animation: tgPromoRingSpin 3s linear infinite;
    }

    /* 内圈深色背景 */
    #tg-mobile-nav .tg-nav-promo .tg-nav-icon-wrap::after {
        inset: 3px;
        z-index: -1;
        background: radial-gradient(circle at 35% 28%, rgba(70, 48, 122, .98) 0, rgba(31, 24, 63, .98) 48%, rgba(12, 12, 23, .99) 100%);
    }

    /* Promo 图标 */
    #tg-mobile-nav .tg-nav-promo .tg-nav-icon {
        position: relative;
        top: auto;
        left: auto;
        z-index: 1;
        width: 20px;
        height: 20px;
        transform: none;
    }

    /* V7：五个文字使用相同底线，Promos 不再压住文字 */
    #tg-mobile-nav .tg-nav-item .tg-nav-label {
        bottom: 5px;
        height: 11px;
        min-height: 11px;
        line-height: 11px;
    }

    #tg-mobile-nav .tg-nav-promo .tg-nav-label {
        z-index: 3;
    }
}

/* 超小屏手机（宽度 ≤ 360px）微调 */
@media (max-width: 360px) {
    #tg-mobile-nav {
        width: calc(100vw - 10px);
        max-width: calc(100vw - 10px);
    }
    #tg-mobile-nav .tg-nav-label {
        font-size: 10px;
    }
}

/* 用户开启了"减少动画"系统偏好时，关闭所有动画 */
@media (prefers-reduced-motion: reduce) {
    #tg-auth-buttons .tg-auth-btn {
        animation: none;
    }
    #tg-auth-buttons.tg-auth-floating,
    #tg-mobile-nav {
        transition: none;
    }
    #tg-mobile-nav .tg-nav-promo .tg-nav-icon-wrap::before {
        animation: none;
    }
}

/* ========== 动画关键帧 ========== */

/* 按钮渐变背景流动动画 */
@keyframes tgAuthGradient {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* 按钮上下浮动动画 */
@keyframes tgAuthFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-3px);
    }
}

/* Promo 圆环旋转动画 */
@keyframes tgPromoRingSpin {
    to {
        transform: rotate(1turn);
    }
}