* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f5f5f5;
}

.container {
    padding: 20px;
    padding-bottom: 60px; /* 为底部导航留出空间 */
}

h1 {
    text-align: center;
    margin: 20px 0;
    font-size: 24px;
    color: #333;
}

.lottery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.prize-item {
    background-color: #ff4d4f;
    color: white;
    padding: 30px;
    text-align: center;
    border-radius: 8px;
    font-size: 16px;
}

.start-btn {
    width: 100%;
    padding: 12px;
    background-color: #1890ff;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    margin-bottom: 20px;
}

.nav-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: white;
    display: flex;
    justify-content: space-around;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.08);
    z-index: 999;
    height: 49px;  /* 固定导航栏高度 */
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 10px;
    text-align: center;
    position: relative;
    transition: color 0.3s ease;
    height: 100%;  /* 让按钮占满导航栏高度 */
}

/* 导航项图标 */
.nav-item i {
    font-size: 18px;
    margin-bottom: 1px;
    transition: color 0.3s ease;
}

/* 激活状态 */
.nav-item.active {
    color: #1890ff;
    background-color: rgba(24, 144, 255, 0.1);
}

.nav-item.active i {
    color: #1890ff;
}

/* 当子菜单激活时的导航栏样 */
.submenu.active + .nav-bar {
    box-shadow: none;
}

.submenu.active + .nav-bar .nav-item {
    opacity: 0.5;
}

.submenu.active + .nav-bar #lotteryNav {
    opacity: 1;
    color: #1890ff;
}

/* 移除之前的滑动背景相关代码 */
.nav-bar::before {
    content: none;
}

body[data-page="index"] .nav-bar::before,
body[data-page="lottery"] .nav-bar::before,
body[data-page="history"] .nav-bar::before {
    content: none;
}

/* 修改图标 */
.nav-item:nth-child(1) i {
    font-size: 16px;
}

.nav-item:nth-child(2) i {
    font-size: 18px;
}

.nav-item:nth-child(3) i {
    font-size: 17px;
}

#lotteryNav {
    color: #666;
    font-weight: normal;
}

.history-container {
    background-color: white;
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
}

.history-container h2 {
    font-size: 16px;
    margin-bottom: 10px;
    color: #333;
}

.history-list {
    max-height: 200px;
    overflow-y: auto;
}

.wheel-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

.wheel {
    position: relative;
    width: 300px;
    height: 300px;
    margin-bottom: 30px;
}

.wheel .prize-list {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    position: relative;
    overflow: hidden;
}

.prize-text {
    position: absolute;
    transform-origin: center;
    z-index: 1;
}

.pointer-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    transform-origin: center;
    transition: transform 4s cubic-bezier(0.25, 0.1, 0.25, 1);
    z-index: 2;
}

.pointer {
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: white;
    border-radius: 50%;
}

.pointer::after {
    content: '';
    position: absolute;
    top: -35px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 40px solid white;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.draw-btn {
    background-color: #1890ff;
    color: white;
    border: none;
    border-radius: 25px;
    padding: 12px 40px;
    font-size: 16px;
    cursor: pointer;
}

.history-item {
    padding: 10px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #666;
}

.history-item:last-child {
    border-bottom: none;
}

/* 添加结果弹窗样式 */
.result-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.result-content {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    width: 80%;
    max-width: 300px;
}

.result-content h3 {
    color: #333;
    margin-bottom: 10px;
}

.result-content p {
    color: #1890ff;
    font-size: 18px;
    margin-bottom: 20px;
}

.close-btn {
    background-color: #1890ff;
    color: white;
    border: none;
    padding: 8px 30px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
}

/* 在转盘页面的历史记录样式 */
.wheel-container .history-container {
    width: 100%;
    max-width: 300px;
    margin-top: 20px;
    background-color: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.wheel-container .history-container h2 {
    font-size: 16px;
    margin-bottom: 10px;
    color: #333;
    text-align: center;
}

.wheel-container .history-list {
    max-height: 150px;
    overflow-y: auto;
}

.wheel-container .history-item {
    padding: 8px 12px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #666;
}

.wheel-container .history-item:last-child {
    border-bottom: none;
}

/* 上次抽结果样式 */
.last-result {
    margin-top: 20px;
    padding: 12px 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
    color: #666;
    font-size: 14px;
}

.last-result #lastPrize {
    color: #1890ff;
    font-weight: bold;
    margin-left: 5px;
}

/* 首页功能区域样式 */
.function-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding: 20px;
}

.function-item {
    aspect-ratio: 1;  /* 保持正方形 */
    background-color: #1890ff;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
}

/* 试试手气按钮样式 */
.lucky-btn {
    width: calc(100% - 40px);
    margin: 20px;
    padding: 15px;
    background-color: #1890ff;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
}

/* 猜谜语页面样式 */
.riddle-container {
    padding: 20px;
    background-color: white;
    border-radius: 8px;
    margin: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.riddle-content {
    margin-bottom: 20px;
}

.riddle-content h3,
.riddle-answer h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 16px;
}

.riddle-content p,
.riddle-answer p {
    color: #666;
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 20px;
}

.riddle-btn {
    width: 100%;
    padding: 12px;
    background-color: #1890ff;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    margin-bottom: 10px;
    cursor: pointer;
}

.riddle-btn:last-child {
    margin-bottom: 0;
}

/* 修改子菜单样式 */
.submenu {
    position: fixed;
    bottom: -200px;
    left: 0;
    right: 0;
    background-color: white;
    padding: 15px 15px 75px; /* 增加底部内边距，覆盖导航栏区域 */
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
}

.submenu.active {
    bottom: 0; /* 直接到底部 */
}

.submenu-item {
    width: 100%;
    padding: 16px;
    margin-bottom: 12px;
    background-color: #1890ff;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
    opacity: 0.95;
}

.submenu-item:last-child {
    margin-bottom: 0;
}

.submenu-item:active {
    transform: scale(0.98);
    opacity: 1;
}

/* 修改遮罩层和模糊效果的样式 */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 998;
    backdrop-filter: blur(0);  /* 添加模糊效果 */
}

.overlay.active {
    opacity: 1;
    visibility: visible;
    backdrop-filter: blur(3px);  /* 激活时应用模糊效果 */
}

/* 移除之前的模糊相关代码 */
.submenu.active ~ .container {
    filter: none;
}

/* 子菜单和导航栏样式 */
.submenu {
    position: fixed;
    bottom: -200px;
    left: 0;
    right: 0;
    background-color: white;
    padding: 15px 15px 75px;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
}

.submenu.active {
    bottom: 0;
}

/* 奖池选择弹窗样式 */
.pool-select-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.pool-select-content {
    background-color: white;
    padding: 20px;
    border-radius: 12px;
    width: 80%;
    max-width: 300px;
}

.pool-select-content h3 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
}

.pool-btn {
    width: 100%;
    padding: 12px;
    margin-bottom: 10px;
    border: none;
    border-radius: 8px;
    background-color: #1890ff;
    color: white;
    font-size: 16px;
    cursor: pointer;
}

/* 自定义奖池弹窗样式 */
.custom-pool-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.custom-pool-content {
    background-color: white;
    padding: 20px;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    max-height: 80vh;
    overflow-y: auto;
}

.prize-input-group {
    margin-bottom: 10px;
}

.prize-input-group input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.add-prize-btn {
    width: 100%;
    padding: 8px;
    margin: 10px 0;
    border: 1px dashed #1890ff;
    border-radius: 4px;
    background-color: white;
    color: #1890ff;
    cursor: pointer;
}

.custom-pool-btns {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.save-btn, .cancel-btn {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
}

.save-btn {
    background-color: #1890ff;
    color: white;
}

.cancel-btn {
    background-color: #f5f5f5;
    color: #666;
}

/* 添加自定义奖池按钮样式 */
.custom-pool-btn {
    flex: 1;
    padding: 12px;
    background-color: white;
    color: #1890ff;
    border: 1px solid #1890ff;
    border-radius: 25px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.custom-pool-btn:hover {
    background-color: rgba(24, 144, 255, 0.1);
}

/* 添加奖池按钮容器样式 */
.pool-buttons {
    width: 100%;
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

/* 添加默认奖池按钮样式 */
.default-pool-btn {
    flex: 1;
    padding: 12px;
    background-color: white;
    color: #1890ff;
    border: 1px solid #1890ff;
    border-radius: 25px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.custom-pool-btn:hover,
.default-pool-btn:hover {
    background-color: rgba(24, 144, 255, 0.1);
}
 