/* ============================================
   生日祝福 H5 - 深色主题样式
   Theme Color: 黑色 + 暖黄点缀
   ============================================ */

/* ---- 基础重置 ---- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: #0a0a0a;
    color: #fff;
    color-scheme: dark;
}

/* ---- 容器 ---- */
.container {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        linear-gradient(135deg, rgba(10, 10, 10, 0.92) 0%, rgba(20, 15, 10, 0.88) 100%),
        url('https://images.unsplash.com/photo-1545569341-9eb8b30979d9?q=80&w=2070&auto=format&fit=crop') center/cover no-repeat fixed;
    overflow: hidden;
}

/* ---- 背景遮罩层 ---- */
.bg-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: brightness(0.8);
    -webkit-backdrop-filter: brightness(0.8);
    z-index: 1;
}

/* ---- 粒子背景 ---- */
.particles {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
}

.particle {
    position: absolute;
    border-radius: 50%;
    background: #ffd700;
    animation: particleFloat 8s ease-in-out infinite;
    box-shadow: 0 0 6px rgba(255, 215, 0, 0.3);
}

@keyframes particleFloat {

    0%,
    100% {
        transform: translateY(0) scale(1);
        opacity: 0.2;
    }

    50% {
        transform: translateY(-60px) scale(1.3);
        opacity: 0.6;
    }
}

/* ---- 内容区域 ---- */
.content {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 24px;
    max-width: 420px;
    width: 100%;
}

/* 内容初始隐藏，遮盖层上滑后逐个淡入 */
.content>* {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.content-visible>*:nth-child(1) {
    transition-delay: 0.1s;
}

.content-visible>*:nth-child(2) {
    transition-delay: 0.2s;
}

.content-visible>*:nth-child(3) {
    transition-delay: 0.3s;
}

.content-visible>*:nth-child(4) {
    transition-delay: 0.4s;
}

.content-visible>*:nth-child(5) {
    transition-delay: 0.5s;
}

.content-visible>*:nth-child(6) {
    transition-delay: 0.6s;
}

.content-visible>*:nth-child(7) {
    transition-delay: 0.7s;
}

.content-visible>*:nth-child(8) {
    transition-delay: 0.8s;
}

.content-visible>*:nth-child(9) {
    transition-delay: 0.9s;
}

.content-visible>* {
    opacity: 1;
    transform: translateY(0);
}

/* ---- 头像 ---- */
.avatar-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    cursor: pointer;
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

.avatar-link:hover {
    transform: scale(1.05);
}

.avatar-link:active {
    transform: scale(0.98);
}

.avatar-wrapper {
    position: relative;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    padding: 4px;
    background: linear-gradient(135deg, #ffd700, #ff8c00, #ffd700);
    background-size: 200% 200%;
    animation: ringGlow 3s ease-in-out infinite;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.25);
}

.avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #0a0a0a;
    display: block;
    transition: transform 0.2s ease;
    background: #1a1a1a;
}

.avatar-ring {
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px solid rgba(255, 215, 0, 0.15);
    animation: ringPulse 3s ease-in-out infinite;
}

@keyframes ringGlow {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

@keyframes ringPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.3;
    }

    50% {
        transform: scale(1.08);
        opacity: 0.6;
    }
}

.avatar-label {
    margin-top: 8px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    -webkit-text-fill-color: rgba(255, 255, 255, 0.5);
    letter-spacing: 2px;
    transition: color 0.3s ease;
}

.avatar-link:hover .avatar-label {
    color: #ffd700;
}

/* ---- 祝福文案 ---- */
.greeting-text {
    margin-bottom: 8px;
}

.line-1 {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.5);
    -webkit-text-fill-color: rgba(255, 255, 255, 0.5);
    letter-spacing: 4px;
    font-weight: 300;
}

/* ---- 主标题 ---- */
.main-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.3;
    letter-spacing: 2px;
}

.title-white {
    color: #fff;
    -webkit-text-fill-color: #fff;
}

.title-gold {
    color: #ffd700;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
    position: relative;
    display: inline-block;
}

.title-gold::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #ffd700, transparent);
    animation: shimmer 2s ease-in-out infinite;
}

@keyframes shimmer {

    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 1;
    }
}

/* ---- 副文案 ---- */
.sub-text {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.65);
    -webkit-text-fill-color: rgba(255, 255, 255, 0.65);
    line-height: 1.8;
    margin-bottom: 24px;
    font-weight: 300;
    letter-spacing: 1px;
}

/* ---- 装饰分隔线 ---- */
.divider {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 28px;
    position: relative;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    max-width: 80px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.3), transparent);
}

.divider-star {
    color: #ffd700;
    font-size: 14px;
    margin: 0 16px;
    animation: spinStar 4s linear infinite;
}

@keyframes spinStar {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* ---- 按钮组（Flexbox gap 控制间距）---- */
.btn-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    width: 100%;
    margin-bottom: 32px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 14px 28px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    min-width: 130px;
}

.btn-icon {
    font-size: 18px;
}

/* 左侧按钮 - 纯白背景 + 暖黄文字 */
.btn-primary {
    background: #ffffff;
    color: #ffd700;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.25);
}

.btn-primary:hover {
    background: #fffbf0;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.35);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(255, 215, 0, 0.15);
}

/* 右侧按钮 - 透明/带边框 + 白色文字 */
.btn-secondary {
    background: transparent;
    color: #ffffff;
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-2px);
}

.btn-secondary:active {
    transform: translateY(0);
}

/* 按钮点击动画 */
.btn-clicked {
    animation: btnPop 0.3s ease;
}

@keyframes btnPop {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(0.95);
    }

    100% {
        transform: scale(1);
    }
}

/* ---- 底部签名 ---- */
.footer-sign {
    margin-top: 4px;
}

.sign-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.25);
    -webkit-text-fill-color: rgba(255, 255, 255, 0.25);
    letter-spacing: 3px;
    font-weight: 300;
}

/* ---- Toast 提示 ---- */
.toast {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 14px;
    letter-spacing: 1px;
    z-index: 1000;
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 215, 0, 0.15);
    max-width: calc(100vw - 48px);
    text-align: center;
    line-height: 1.5;
    word-break: break-word;
}

.toast-show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ============================================
   浅白遮盖层 - 点击后向上滑出
   ============================================ */
.splash-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: rgba(245, 242, 237, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: transform 0.8s cubic-bezier(0.65, 0, 0.35, 1), opacity 0.8s ease;
}

/* 拉开后的状态：整体向上滑出 */
.splash-overlay.open {
    transform: translateY(-100%);
    opacity: 0;
}

.splash-overlay.open .splash-inner {
    opacity: 0;
    transform: translateY(20px);
}

.splash-overlay.open .splash-icon {
    opacity: 0;
    transform: scale(0.8) translateY(10px);
}

.splash-overlay.open .splash-title {
    opacity: 0;
    transform: translateY(15px);
}

.splash-overlay.open .splash-hint {
    opacity: 0;
    transform: translateY(20px);
}

.splash-inner {
    text-align: center;
    padding: 40px 32px;
    transition: all 0.5s ease;
}

.splash-icon {
    font-size: 72px;
    display: block;
    margin-bottom: 24px;
    animation: splashBounce 2s ease-in-out infinite;
    transition: all 0.45s ease 0.05s;
}

.splash-title {
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a;
    letter-spacing: 4px;
    margin-bottom: 12px;
    transition: all 0.45s ease 0.15s;
}

.splash-hint {
    font-size: 14px;
    color: rgba(26, 26, 26, 0.5);
    letter-spacing: 2px;
    font-weight: 300;
    transition: all 0.45s ease 0.25s;
}

.splash-hint .arrow {
    display: inline-block;
    animation: arrowUp 1.5s ease-in-out infinite;
}

@keyframes arrowUp {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-6px);
    }
}

/* ---- 响应式 ---- */
@media (max-width: 360px) {
    .main-title {
        font-size: 28px;
    }

    .btn {
        padding: 12px 20px;
        font-size: 13px;
        min-width: 100px;
    }

    .btn-group {
        gap: 12px;
    }

    .avatar-wrapper {
        width: 72px;
        height: 72px;
    }
}

@media (min-width: 768px) {
    .main-title {
        font-size: 44px;
    }

    .content {
        padding: 60px 32px;
    }
}

/* ---- 滚动条美化 ---- */
::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: #0a0a0a;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 215, 0, 0.2);
    border-radius: 2px;
}