:root {
    --primary: #ff6b9d;
    --secondary: #764ba2;
    --accent: #ffd700;
    --bg-gradient: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
    --glass: rgba(255, 255, 255, 0.8);
    --ios-blue: #0071e3;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg-gradient);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px;
    overflow-x: hidden;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.container {
    background: var(--glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 40px;
    padding: 35px 20px;
    max-width: 450px;
    width: 100%;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.4);
    position: relative;
    overflow: hidden;
    animation: containerAppear 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes containerAppear {
    from { opacity: 0; transform: translateY(40px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* 顶部装饰 */
.header {
    text-align: center;
    margin-bottom: 30px;
}

.header h1 {
    font-size: 36px;
    font-weight: 800;
    background: linear-gradient(135deg, #ff6b9d 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
    letter-spacing: -1px;
}

.subtitle {
    font-size: 14px;
    color: #666;
    font-weight: 500;
    opacity: 0.8;
}

/* 激活码卡片 - 3D 悬浮感 */
.activation-card {
    background: white;
    border-radius: 24px;
    padding: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
    border: 1px solid rgba(0, 0, 0, 0.03);
    transition: transform 0.3s ease;
}

.activation-card:focus-within {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
}

.input-group {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.input-group input {
    flex: 1;
    padding: 14px 18px;
    border: 2px solid #f0f0f0;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 600;
    outline: none;
    transition: all 0.3s ease;
    background: #f9f9f9;
}

.input-group input:focus {
    border-color: var(--primary);
    background: white;
}

.verify-btn {
    padding: 0 25px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.code-meta {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
    font-size: 12px;
    color: #666;
}

.code-meta .code-type {
    background: rgba(255, 107, 157, 0.15);
    color: #ff6b9d;
    padding: 4px 10px;
    border-radius: 999px;
    font-weight: 700;
}

.code-meta .code-remaining {
    background: rgba(0, 113, 227, 0.12);
    color: #0071e3;
    padding: 4px 10px;
    border-radius: 999px;
    font-weight: 700;
}

.ten-live {
    margin-top: 12px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 16px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.ten-live-title {
    font-size: 12px;
    color: #666;
    font-weight: 700;
    margin-bottom: 8px;
    text-align: center;
}

.ten-live-total {
    font-size: 13px;
    font-weight: 800;
    color: #ff6b9d;
    text-align: center;
    margin-bottom: 8px;
}

.ten-live-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    max-height: 140px;
    overflow-y: auto;
}

.ten-live-item {
    background: #fff;
    border-radius: 10px;
    padding: 6px 8px;
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 700;
    color: #444;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
}

.verify-btn:active {
    transform: scale(0.92);
}

/* 转盘区域 - 呼吸灯效果 */
.wheel-section {
    position: relative;
    margin-bottom: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.wheel-outer-glow {
    position: relative;
    padding: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 30px rgba(255, 107, 157, 0.2);
    animation: pulseGlow 3s infinite ease-in-out;
}

.wheel-pointer {
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-bottom: 20px solid #ffd700;
    filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.2));
    z-index: 12;
}

.wheel-pointer::after {
    content: '';
    position: absolute;
    left: -6px;
    top: 4px;
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    border: 2px solid #ff6b9d;
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 20px rgba(255, 107, 157, 0.2); }
    50% { box-shadow: 0 0 50px rgba(255, 107, 157, 0.5); }
}

.spin-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: clamp(60px, 18vw, 78px);
    height: clamp(60px, 18vw, 78px);
    border-radius: 50%;
    background: white;
    border: none;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    z-index: 10;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 800;
    color: var(--primary);
    font-size: 14px;
    transition: all 0.2s ease;
}

.spin-btn::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 4px solid var(--accent);
    animation: spinBtnRing 2s infinite;
}

@keyframes spinBtnRing {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.4); opacity: 0; }
}

.spin-btn:active {
    transform: translate(-50%, -50%) scale(0.9);
}

/* 奖品列表 - 玻璃拟态卡片 */
.prizes-section {
    background: rgba(255, 255, 255, 0.4);
    border-radius: 28px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.prizes-section h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #333;
    text-align: center;
}

.prizes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.prize-item {
    background: white;
    border-radius: 18px;
    padding: 12px 5px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.prize-item:hover {
    transform: translateY(-3px);
    border-color: var(--primary);
}

.prize-amount {
    display: block;
    font-weight: 800;
    color: var(--primary);
    font-size: 15px;
}

.prize-rate {
    font-size: 11px;
    color: #999;
    font-weight: 600;
}

/* iOS 风格毛玻璃弹窗 - 终极版 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.pwa-prompt {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 2500;
}

.pwa-prompt-content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.7);
}

.pwa-prompt-text {
    font-size: 13px;
    font-weight: 700;
    color: #333;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pwa-prompt-sub {
    font-size: 12px;
    font-weight: 600;
    color: #666;
}

.pwa-prompt-btn {
    background: #0071e3;
    color: white;
    border: none;
    border-radius: 12px;
    padding: 8px 12px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.modal-content {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-radius: 40px;
    padding: 50px 30px;
    max-width: 350px;
    width: 88%;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.5);
    text-align: center;
    transform: scale(0.8);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal.show .modal-content {
    transform: scale(1);
}

@keyframes iosSpring {
    0% { transform: scale(0.5); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.prize-amount-large {
    font-size: 64px;
    font-weight: 900;
    background: linear-gradient(135deg, #ff6b9d 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 20px 0;
    filter: drop-shadow(0 10px 20px rgba(255, 107, 157, 0.3));
}

.ten-display {
    margin-top: 10px;
}

.ten-total {
    font-size: 28px;
    font-weight: 800;
    color: #ff6b9d;
    margin: 10px 0 18px;
}

.ten-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    max-height: 260px;
    overflow-y: auto;
    padding-right: 4px;
}

.ten-item {
    background: rgba(255, 255, 255, 0.85);
    border-radius: 14px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.6);
    font-weight: 700;
    color: #333;
}

.ten-index {
    font-size: 12px;
    color: #999;
    font-weight: 600;
}

.ten-amount {
    color: #764ba2;
    font-weight: 800;
}

.screenshot-btn {
    background: var(--ios-blue);
    color: white;
    padding: 18px;
    border-radius: 20px;
    font-size: 18px;
    font-weight: 700;
    border: none;
    width: 100%;
    box-shadow: 0 10px 25px rgba(0, 113, 227, 0.4);
    margin-top: 20px;
}

.close-modal-btn {
    margin-top: 15px;
    background: transparent;
    color: var(--ios-blue);
    font-weight: 600;
    border: none;
    font-size: 16px;
}

/* 响应式微调 */
@media (max-width: 480px) {
    .container {
        padding: 24px 16px;
        border-radius: 28px;
    }
    .input-group {
        flex-direction: column;
    }
    .verify-btn {
        height: 44px;
    }
    .code-meta {
        flex-direction: column;
        gap: 6px;
    }
    .ten-live-list {
        grid-template-columns: 1fr;
        max-height: 160px;
    }
    .wheel-pointer {
        border-left-width: 10px;
        border-right-width: 10px;
        border-bottom-width: 16px;
        top: -4px;
    }
    .wheel-pointer::after {
        left: -5px;
        top: 3px;
        width: 10px;
        height: 10px;
    }
    .header h1 {
        font-size: 30px;
    }
    .activation-card {
        padding: 16px;
        border-radius: 20px;
    }
    .input-group input {
        padding: 12px 14px;
        font-size: 15px;
    }
    .verify-btn {
        padding: 0 18px;
        font-size: 14px;
    }
    .prizes-section {
        padding: 16px;
        border-radius: 22px;
    }
    .prizes-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .modal-content {
        padding: 36px 22px;
        border-radius: 28px;
    }
    .prize-amount-large {
        font-size: 48px;
    }
    .screenshot-btn {
        padding: 14px;
        font-size: 16px;
        border-radius: 16px;
    }
    .ten-total {
        font-size: 22px;
    }
}

@media (max-width: 380px) {
    .prizes-grid { grid-template-columns: repeat(2, 1fr); }
    .header h1 { font-size: 28px; }
}
