:root {
    --primary-color: #007bff;
    --success-color: #28a745;
    --light-bg: #f4f7f9;
    --white-bg: #fff;
    --text-color: #333;
    --text-muted: #6c757d;
    --border-color: #e9ecef;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    overflow-x: hidden;
}

.page-header {
    display: flex;
    align-items: center;
    background: var(--white-bg);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
    border-bottom: 1px solid var(--border-color);
    height: 56px;
    font-size: 1.45rem;
    font-weight: 600;
    padding-left: 8px;
    letter-spacing: 0.4px;
}

.back-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px 12px 8px 0;
    display: flex;
    align-items: center;
}

.back-btn svg {
    width: 28px;
    height: 28px;
    stroke: #333;
}

.header-title {
    margin-left: 4px;
    font-size: 1.07em;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    min-height: 100vh;
}

/* ========== 头部样式 ========== */
header.page-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

header.page-header a.back-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    transition: background 0.3s;
    display: inline-block;
}

header.page-header a.back-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

header.page-header h1 {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

/* ========== 主内容区 ========== */
/* ========== 主内容区 ========== */
.content {
    padding: 0 20px 20px 20px;
    /* 去掉顶部padding */
}

.achievement-showcase {
    margin-bottom: 20px;
    margin-top: 0;
    padding: 15px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.achievement-showcase h2 {
    font-size: 28px;
    /* 从22px增加到28px */
    margin-bottom: 10px;
    margin-top: 0;
    /* 去掉顶部margin */
    color: #333;
    text-align: center;
    white-space: nowrap;
    font-weight: 700;
}

.stats-container {
    display: flex;
    justify-content: space-around;
    gap: 8px;
    /* 进一步减小间距 */
    margin: 10px 0;
    /* 减小上下边距 */
}

.stat-item {
    flex: 1;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 12px 8px;
    /* 进一步减小内边距 */
    color: white;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.stat-icon {
    font-size: 28px;
    /* 稍微减小图标 */
    margin-bottom: 5px;
}

.stat-value {
    font-size: 24px;
    font-weight: bold;
    color: white;
    /* 确保文字是白色 */
    margin: 5px 0;
}

.stat-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.9);
    /* 稍微透明的白色 */
    margin-top: 3px;
}

.daily-quote {
    margin-top: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    font-style: italic;
    color: #666;
    text-align: center;
    font-size: 15px;
    /* 从13px增加到15px */
    line-height: 1.5;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .achievement-showcase h2 {
        font-size: 18px;
        /* 移动端稍小 */
    }

    .daily-quote {
        font-size: 13px;
        /* 移动端稍小 */
    }
}

.lottery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    background: var(--white-bg);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.prize-item,
.center-control {
    aspect-ratio: 1 / 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    border-radius: 10px;
    border: 2px solid var(--border-color);
    transition: all 0.2s ease;
    cursor: default;
}

.prize-item.active {
    border-color: var(--primary-color);
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(0, 123, 255, 0.5);
}

.prize-icon {
    font-size: 32px;
    /* 从更大的值改为32px */
    margin-bottom: 5px;
}

.prize-name {
    font-size: 14px;
    /* 从12px增加到14px */
    font-weight: 500;
    color: #333;
    margin-top: 5px;
    line-height: 1.2;
    white-space: nowrap;
    /* 不折行 */
    overflow: hidden;
    text-overflow: ellipsis;
    /* 超出显示省略号 */
    max-width: 100%;
}

.center-control {
    background-color: var(--primary-color);
    color: white;
    cursor: pointer;
    transition: background-color 0.2s;
}

#lottery-btn {
    font-size: 2.5rem;
    font-weight: bold;
    border: none;
    background: none;
    color: white;
    padding: 0;
    margin: 0;
}

#chances-text {
    font-size: 1rem;
    margin-top: 8px;
}

.flying-prize-icon {
    position: fixed;
    font-size: 2.5rem;
    z-index: 1001;
    transform: translate(-50%, -50%);
}

#fireworks-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1002;
}

@media (max-width: 900px) {
    .page-header {
        font-size: 1.16rem;
    }

    .container {
        padding: 7px;
    }
}

/* 登录模态样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    display: none;
}

.modal-overlay.show {
    display: flex;
}

.modal-content {
    background: white;
    padding: 20px;
    border-radius: 8px;
    max-width: 400px;
    width: 100%;
}

.parent-login-modal {
    position: relative;
    max-width: 360px;
    min-height: 320px;
    padding: 0;
    background-color: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #666;
}

.parent-login-modal .tabs {
    display: flex;
    justify-content: space-around;
    background: #f8f8f8;
    padding: 10px 0;
    border-radius: 16px 16px 0 0;
    margin-bottom: 20px;
}

.parent-login-modal .tab {
    flex: 1;
    text-align: center;
    padding: 10px;
    font-size: 16px;
    font-weight: 500;
    color: #333;
    background: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.parent-login-modal .tab[aria-selected="true"] {
    background: #007bff;
    color: white;
    border-radius: 12px;
}

.forms-container {
    padding: 0 20px 20px;
}

.form {
    display: none;
}

.form.active {
    display: block;
}

.form input {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
}

.forgot-pwd {
    display: block;
    text-align: right;
    color: #007bff;
    text-decoration: none;
    font-size: 12px;
    margin-bottom: 15px;
}

.btn-login-confirm {
    width: 100%;
    padding: 12px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
}

.btn-login-confirm:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Toast 样式 */
.toast-notification {
    position: fixed;
    top: 50%;
    /* 垂直居中 */
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #28a745, #20c997);
    /* 渐变绿 */
    color: white;
    padding: 16px 32px;
    border-radius: 30px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    font-size: 1.1rem;
    font-weight: 500;
    z-index: 9999;
    max-width: 80%;
    text-align: center;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
    bottom: auto !important;
    right: auto !important;
}

.toast-notification.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    /* 保持居中并缩放 */
}

.toast-notification.error {
    background: rgba(220, 53, 69, 0.9);
}

/* 无奖品提示模态框 */
.no-prizes-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.no-prizes-modal {
    background: white;
    border-radius: 20px;
    padding: 40px 30px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

.no-prizes-modal .modal-icon {
    font-size: 64px;
    margin-bottom: 20px;
    animation: bounce 0.6s ease;
}

.no-prizes-modal h3 {
    font-size: 24px;
    color: #333;
    margin-bottom: 15px;
    font-weight: 600;
}

.no-prizes-modal p {
    font-size: 16px;
    color: #666;
    margin-bottom: 30px;
    line-height: 1.6;
}

.modal-confirm-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.modal-confirm-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.modal-confirm-btn:active {
    transform: translateY(0);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes bounce {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}


.flying-prize-icon .icon-wrapper {
    position: relative;
    display: inline-block;
    text-align: center;
}

.flying-prize-icon .icon-main {
    display: flex !important;
    /* 🔧 启用 Flexbox */
    align-items: center;
    /* 🔧 垂直居中 */
    gap: 8px;
    /* 🔧 图标与文字间距 */
    font-size: 28px;
    font-weight: bold;
}

.flying-prize-icon .prize-text {
    display: block;
    margin-top: 8px;
    font-size: 18px;
    font-weight: bold;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.flying-prize-icon .double-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #ff4757;
    color: white;
    font-weight: bold;
    font-size: 24px;
    width: 40px;
    height: 40px;
    line-height: 40px;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.15);
    }

    100% {
        transform: scale(1);
    }
}