* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); min-height: 100vh; padding: 12px; }
.container { max-width: 100%; margin: 0 auto; }

/* 用户信息栏 */
.user-bar { background: white; padding: 12px 16px; border-radius: 16px; margin-bottom: 12px; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.user-info { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.username { font-size: 14px; font-weight: bold; color: #333; }
.balance { font-size: 16px; color: #ff6b6b; font-weight: bold; }
.balance span { color: #666; font-size: 11px; font-weight: normal; }
.logout-btn { background: #dc3545; color: white; border: none; padding: 6px 12px; border-radius: 20px; cursor: pointer; font-size: 12px; }

/* 最近开奖号码卡片 */
.recent-draw-card { background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%); border-radius: 16px; padding: 14px 16px; margin-bottom: 16px; box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
.recent-draw-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; flex-wrap: wrap; gap: 8px; }
.recent-draw-title { font-size: 14px; font-weight: bold; color: #ffd700; }
.recent-draw-period { font-size: 11px; color: #aaa; }
.recent-draw-numbers { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 8px; }
.draw-number { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; background: #2d2d5e; border-radius: 8px; font-size: 16px; font-weight: bold; color: #fff; padding: 0 6px; }
.draw-number.special { background: #dc3545; position: relative; }
.draw-number.special::after { content: "特"; position: absolute; top: -8px; right: -8px; background: #ffd700; color: #333; font-size: 8px; padding: 1px 4px; border-radius: 10px; font-weight: bold; }
.draw-number.normal { background: #28a745; }
.draw-plus { color: #ffd700; font-size: 16px; font-weight: bold; }
.draw-placeholder { color: #888; font-size: 12px; }
.recent-draw-time { font-size: 10px; color: #888; text-align: right; }

/* 玩法切换标签 */
.game-tabs { display: flex; gap: 8px; margin-bottom: 16px; background: white; padding: 8px 12px; border-radius: 50px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.game-tabs::-webkit-scrollbar { height: 3px; }
.game-tabs::-webkit-scrollbar-track { background: #e0e0e0; border-radius: 3px; }
.game-tabs::-webkit-scrollbar-thumb { background: #667eea; border-radius: 3px; }
.tab-btn { flex-shrink: 0; padding: 8px 16px; background: #f0f2f5; border: none; border-radius: 40px; font-size: 13px; cursor: pointer; }
.tab-btn.active { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; }

/* 数字玩法 */
.numbers-header { margin-bottom: 10px; }
.odds-info-header { display: flex; justify-content: center; gap: 12px; padding: 6px; background: #f8f9fa; border-radius: 25px; }
.odds-label { font-size: 10px; font-weight: bold; padding: 3px 10px; border-radius: 15px; }
.odds-label.special { background: #dc3545; color: white; }
.odds-label.normal { background: #28a745; color: white; }
.numbers-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; margin-bottom: 15px; }
.number-item { display: flex; flex-direction: column; gap: 3px; background: #f8f9fa; border-radius: 8px; padding: 4px; }
.number-main { font-size: 11px; font-weight: bold; text-align: center; background: #667eea; color: white; padding: 5px 2px; border-radius: 6px; }
.number-buttons { display: flex; gap: 3px; }
.btn-special, .btn-normal { flex: 1; font-size: 8px; padding: 4px 2px; border-radius: 4px; font-weight: bold; border: none; cursor: pointer; }
.btn-special { background: #dc3545; color: white; }
.btn-normal { background: #28a745; color: white; }

/* 大小单双/红绿蓝 */
.options-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 12px; }
.options-grid.three-colors { grid-template-columns: repeat(3, 1fr); }
.option-btn { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; border: none; padding: 10px 5px; font-size: 14px; font-weight: bold; border-radius: 10px; cursor: pointer; }
.option-btn.color-red { background: #dc3545; }
.option-btn.color-green { background: #28a745; }
.option-btn.color-blue { background: #17a2b8; }
.odds-info { text-align: center; padding: 8px; background: #f8f9fa; border-radius: 8px; font-size: 11px; color: #666; }

/* 生肖玩法 */
.zodiac-section { background: #f8f9fa; border-radius: 12px; padding: 12px; margin-bottom: 12px; }
.zodiac-section h3 { font-size: 14px; margin-bottom: 10px; text-align: center; }
.odds-badge-special, .odds-badge-normal { font-size: 10px; padding: 2px 6px; border-radius: 15px; margin-left: 6px; }
.odds-badge-special { background: #dc3545; color: white; }
.odds-badge-normal { background: #28a745; color: white; }
#specialZodiacGrid, #normalZodiacGrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 12px; }
.special-zodiac-btn, .normal-zodiac-btn { display: flex; flex-direction: column; align-items: center; padding: 8px 4px; border-radius: 10px; font-size: 18px; border: none; cursor: pointer; }
.special-zodiac-btn { background: #dc3545; color: white; }
.normal-zodiac-btn { background: #28a745; color: white; }
.special-zodiac-btn.selected { background: #f093fb; }
.normal-zodiac-btn.selected { background: #ffc107; color: #333; }
.count-buttons { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.count-btn { flex: 1; padding: 6px 4px; background: #e9ecef; border: none; border-radius: 20px; font-size: 11px; cursor: pointer; }
.count-btn.active { background: #667eea; color: white; }
.selected-info { padding: 8px; background: #e9ecef; border-radius: 8px; margin: 8px 0; text-align: center; font-size: 11px; }

/* 另类数字 */
.numbers-grid-small { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin: 15px 0; max-height: 200px; overflow-y: auto; }
.number-small-btn { background: #667eea; color: white; border: none; padding: 8px 4px; border-radius: 6px; font-size: 12px; cursor: pointer; }
.number-small-btn.selected { background: #28a745; }
.guess-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.guess-group { background: white; border-radius: 12px; padding: 12px; text-align: center; }
.guess-group h4 { font-size: 14px; margin-bottom: 10px; }
.guess-btn { background: #667eea; color: white; border: none; padding: 10px; border-radius: 30px; width: 100%; cursor: pointer; }
.guess-btn.selected { background: #28a745; }
.alternative-section { background: #f8f9fa; border-radius: 16px; padding: 16px; margin-bottom: 16px; }
.alternative-section h3 { font-size: 16px; margin-bottom: 12px; text-align: center; }

/* 下注面板 */
.bet-panel { background: white; padding: 16px; border-radius: 16px; margin-bottom: 16px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.bet-panel .selected-info { background: #f0f2f5; padding: 10px; border-radius: 10px; margin-bottom: 12px; font-size: 13px; text-align: center; }
.bet-input-group { margin-bottom: 12px; }
.bet-input-group input { width: 100%; padding: 12px; font-size: 16px; border: 2px solid #e0e0e0; border-radius: 10px; text-align: center; }
.potential-win { background: #d4edda; padding: 10px; border-radius: 10px; margin-bottom: 12px; text-align: center; font-size: 12px; }
.potential-win span { font-size: 18px; font-weight: bold; }
.btn-submit { background: #28a745; color: white; border: none; padding: 12px; font-size: 16px; font-weight: bold; border-radius: 40px; width: 100%; cursor: pointer; }

/* 下注历史 */
.bet-history { background: white; border-radius: 16px; padding: 12px; margin-top: 16px; }
.bet-history h3 { font-size: 14px; margin-bottom: 10px; }
.history-list { max-height: 300px; overflow-y: auto; }
.history-item { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #eee; font-size: 10px; flex-wrap: wrap; gap: 6px; }
.history-badge { padding: 2px 6px; border-radius: 10px; font-size: 8px; margin-right: 5px; }
.badge-number { background: #667eea; color: white; }
.badge-size { background: #17a2b8; color: white; }
.badge-color { background: #ffc107; color: #333; }
.badge-zodiac { background: #6f42c1; color: white; }
.badge-alternative { background: #6f42c1; color: white; }

/* Toast和Loading */
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,0.8); color: white; padding: 8px 16px; border-radius: 40px; font-size: 12px; z-index: 1000; animation: fadeInOut 2.5s ease; }
@keyframes fadeInOut { 0% { opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { opacity: 0; } }
.loading { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); background: rgba(0,0,0,0.8); color: white; padding: 10px 20px; border-radius: 30px; font-size: 12px; z-index: 1000; }

/* 响应式 */
@media (max-width: 480px) {
    .draw-number { min-width: 30px; height: 30px; font-size: 13px; }
    .draw-number.special::after { font-size: 7px; top: -6px; right: -6px; }
    .numbers-grid-small { grid-template-columns: repeat(5, 1fr); }
    .guess-options { grid-template-columns: 1fr; }
    #specialZodiacGrid, #normalZodiacGrid { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 481px) and (max-width: 768px) {
    #specialZodiacGrid, #normalZodiacGrid { grid-template-columns: repeat(6, 1fr); }
}
/* 猜数字单选样式 */
.guess-row {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.guess-btn-simple {
    flex: 1;
    background: #667eea;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.guess-btn-simple.selected {
    background: #28a745;
}

.single-select-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 10px 0;
}

.single-select-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 30px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.single-select-btn.selected {
    background: #28a745;
}

.odds-hint {
    font-size: 11px;
    color: #888;
    margin-top: 8px;
    text-align: center;
}
/* 封盘状态样式 */
.btn-submit:disabled {
    background: #999;
    cursor: not-allowed;
}

.btn-submit:disabled:hover {
    transform: none;
    box-shadow: none;
}

.toast.warning {
    background: #ff9800;
    color: #333;
}
/* ========== 帮助按钮 ========== */
.help-btn {
    background: #17a2b8;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
    margin-right: 8px;
}

/* ========== 提示框样式 ========== */
.help-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(3px);
}

.help-modal-content {
    background: white;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.help-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px 20px 0 0;
    font-weight: bold;
    font-size: 18px;
}

.help-modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
}

.help-modal-body {
    padding: 20px;
}

.help-section {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.help-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.help-title {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 10px;
    padding: 4px 10px;
    border-radius: 20px;
    display: inline-block;
}

.help-title.red { background: #dc3545; color: white; }
.help-title.blue { background: #17a2b8; color: white; }
.help-title.green { background: #28a745; color: white; }
.help-title.zodiac { background: #6f42c1; color: white; }

.help-numbers {
    font-size: 11px;
    color: #555;
    line-height: 1.6;
    background: #f8f9fa;
    padding: 10px;
    border-radius: 10px;
}

.help-zodiac-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.help-zodiac-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
}

.help-zodiac-name {
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 4px;
}

.help-zodiac-numbers {
    font-size: 10px;
    color: #888;
}

.help-modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    text-align: center;
}

.help-confirm-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 30px;
    border-radius: 30px;
    font-size: 14px;
    cursor: pointer;
}

.help-confirm-btn:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

@media (max-width: 480px) {
    .help-zodiac-grid {
        grid-template-columns: 1fr;
    }
    .help-numbers {
        font-size: 10px;
    }
}