/* 全局变量定义 */
:root {
    --primary: #3b82f6;
    --error: #ef4444;
    --success: #10b981;
    --bg-glass-light: rgba(255, 255, 255, 0.6); /* 稍微降低透明度，增加通透感 */
    --card-radius: 20px;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    /* 二次元渐变色 */
    --anime-gradient: linear-gradient(135deg, #7adbe1 0%, #b18fff 100%);
}

body {
    margin: 0;
    font-family: "PingFang SC", "Segoe UI", system-ui, sans-serif;
    /* 背景图片与主页保持一致 */
    background-image: url("https://app.rainyun.com/img/bg1.218d4721.webp");
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #1e293b;
}

/* 主卡片：毛玻璃核心 */
.main-card {
    background: var(--bg-glass-light) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    border-radius: var(--card-radius);
    box-shadow: var(--shadow);
    padding: 40px;
    width: 90%;
    max-width: 600px;
    text-align: center;
    transition: all 0.3s ease;
}

/* UID 输入框优化 */
.uid-input {
    width: 100%;
    box-sizing: border-box;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    font-size: 20px;
    text-align: center;
    margin-bottom: 25px;
    background: rgba(255, 255, 255, 0.5); /* 输入框也透明 */
    outline: none;
    font-weight: bold;
    color: #1e293b;
    transition: 0.3s;
}

.uid-input:focus {
    background: rgba(255, 255, 255, 0.8);
    border-color: #b18fff;
    box-shadow: 0 0 15px rgba(177, 143, 255, 0.3);
}

/* 优惠券网格 */
.coupon-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* 内部小卡片：半透明通透感 */
.coupon-item {
    background: rgba(255, 255, 255, 0.3) !important;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 18px;
    padding: 25px;
    transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.coupon-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.5) !important;
    border-color: rgba(255, 255, 255, 0.6);
}

.discount-val {
    font-size: 32px;
    font-weight: 800;
    color: #ff5722;
    margin-bottom: 5px;
}

.discount-val.blue {
    color: #3b82f6;
}

/* 按钮：二次元和谐渐变 */
.btn {
    border: 2px solid rgba(255, 255, 255, 0.5);
    padding: 12px 0;
    border-radius: 50px; /* 胶囊型更萌一点 */
    color: white;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    font-size: 16px;
    transition: all 0.3s ease;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* 7折券按钮 - 使用之前调配的星空渐变 */
.btn-orange {
    background: var(--anime-gradient) !important;
    box-shadow: 0 4px 15px rgba(177, 143, 255, 0.4);
}

/* 9折券按钮 - 使用和谐的蓝青渐变 */
.btn-blue {
    background: linear-gradient(135deg, #6ab0ff, #3d7eff) !important;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

/* 消息框：也做成毛玻璃感 */
.msg-box {
    text-align: left;
    padding: 15px 20px;
    margin-bottom: 25px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.6;
    backdrop-filter: blur(5px);
}

.error {
    background: rgba(255, 245, 245, 0.8);
    border: 1px solid #feb2b2;
    color: #9b2c2c;
}

.success {
    background: rgba(240, 255, 244, 0.8);
    border: 1px solid #9ae6b4;
    color: #22543d;
    text-align: center;
}

/* 极验/验证码加载层也要毛玻璃化 */
#loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(15px);
    z-index: 9999;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* 其他小组件保持简洁 */
.copy-code {
    background: rgba(0,0,0,0.05);
    padding: 2px 8px;
    border-radius: 6px;
    cursor: pointer;
    color: #1e40af;
    font-family: monospace;
    border: 1px solid rgba(0,0,0,0.1);
}

#toast {
    visibility: hidden;
    background: var(--anime-gradient);
    color: white;
    padding: 10px 25px;
    border-radius: 50px;
    position: fixed;
    top: 30px;
    right: 30px;
    z-index: 10000;
}

#toast.show { visibility: visible; animation: slideIn 0.5s forwards, slideOut 0.5s 2.5s forwards; }

@keyframes slideIn { from { transform: translateY(-100px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes slideOut { from { transform: translateY(0); opacity: 1; } to { transform: translateY(-100px); opacity: 0; } }

@media (max-width: 600px) {
    .coupon-grid { grid-template-columns: 1fr; }
    .main-card { padding: 25px 20px; }
}

/* --- 增强版切换链接样式（优化辨识度） --- */

.alt-link {
    /* 初始状态：使用与引导文字一致的深灰蓝色 */
    color: #475569 !important; 
    text-decoration: none;
    cursor: pointer;
    font-weight: bold;
    padding: 4px 12px;
    margin: 0 4px;
    border-radius: 8px;
    display: inline-block;
    /* 稍微加深一点点背景透明度，增加对比度 */
    background: rgba(0, 0, 0, 0.05); 
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    font-size: 13px;
}

/* 悬停状态：爆发二次元渐变色 */
.alt-link:hover {
    color: #ffffff !important; /* 悬停时变白，配合深色渐变背景 */
    transform: translateY(-3px) scale(1.05);
    background: var(--anime-gradient) !important; 
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 5px 15px rgba(177, 143, 255, 0.4);
}

/* 呼吸灯小原点：初始颜色也稍微调暗一点点，悬停变亮 */
.alt-link::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #64748b; /* 初始暗色 */
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
    transition: all 0.3s;
    animation: blink 1.5s infinite;
}

.alt-link:hover::before {
    background: #ffffff; /* 悬停变白 */
    box-shadow: 0 0 8px #ffffff;
}

@keyframes blink {
    0% { opacity: 0.4; }
    50% { opacity: 1; }
    100% { opacity: 0.4; }
}

/* 容器微调 */
#loading-overlay div[style*="margin-top:25px"] {
    background: rgba(255, 255, 255, 0.3); /* 容器底色浅一点，衬托按钮 */
    padding: 12px 20px;
    border-radius: 50px;
    color: #475569 !important;
    font-size: 13px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(5px);
}