/** * 幸运大转盘 - 全新设计版 * 简洁、美观、响应式 */ @charset "utf-8"; :root { --primary: #c41e3a; --primary-dark: #9a1830; --gold: #f4d03f; --white: #ffffff; --text-dark: #2c3e50; --text-muted: #7f8c8d; } * { margin: 0; padding: 0; box-sizing: border-box; } html { font-size: 16px; } body { font-family: "PingFang SC", "Microsoft YaHei", sans-serif; min-height: 100vh; overflow-x: hidden; color: var(--text-dark); } /* 响应式根字体 */ @media (max-width: 480px) { html { font-size: 14px; } } @media (min-width: 768px) { html { font-size: 15px; } } @media (min-width: 1024px) { html { font-size: 16px; } } /* ========== 主容器 ========== */ .main { width: 100%; max-width: 6.4rem; margin: 0 auto; padding: 0.4rem 0.2rem 0.8rem; } @media (min-width: 768px) { .main { max-width: 24rem; padding: 1rem; } } @media (min-width: 1024px) { .main { max-width: 26rem; padding: 1.5rem; } } /* ========== 页面标题 ========== */ .page-header { text-align: center; padding: 0.6rem 0 0.5rem; margin-bottom: 0.4rem; } .page-title { font-size: 1.4rem; font-weight: 700; color: var(--gold); text-shadow: 0 0 10px rgba(244,208,63,0.8), 0 2px 10px rgba(0,0,0,0.3); margin-bottom: 0.3rem; } .page-subtitle { font-size: 0.75rem; color: rgba(255,255,255,0.9); text-shadow: 0 1px 3px rgba(0,0,0,0.3); } @media (min-width: 768px) { .page-title { font-size: 1.6rem; } .page-subtitle { font-size: 0.85rem; } } @media (min-width: 1024px) { .page-title { font-size: 1.8rem; } .page-subtitle { font-size: 0.9rem; } } /* ========== 转盘区域 ========== */ .core-w { position: relative; width: 100%; max-width: 3.8rem; margin: 0.6rem auto 0.8rem; padding: 0.6rem; background: rgba(255,255,255,0.15); border-radius: 50%; box-shadow: 0 0 0 8px rgba(255,255,255,0.2), 0 0 0 16px rgba(244,208,63,0.15), 0 0 0 24px rgba(255,255,255,0.1), 0 8px 30px rgba(0,0,0,0.2); } .core { position: relative; width: 3.8rem; height: 3.8rem; margin: 0 auto; } /* 转盘外圈 */ .rotary { position: absolute; inset: 0; background: conic-gradient( from 0deg, #ff6b6b 0deg 30deg, #ff8e53 30deg 60deg, #4ecdc4 60deg 90deg, #45b7aa 90deg 120deg, #ffe66d 120deg 150deg, #ffd93d 150deg 180deg, #ff6b6b 180deg 210deg, #ff8e53 210deg 240deg, #4ecdc4 240deg 270deg, #45b7aa 270deg 300deg, #ffe66d 300deg 330deg, #ffd93d 330deg 360deg ); border-radius: 50%; box-shadow: inset 0 0 40px rgba(0,0,0,0.1), 0 0 0 4px rgba(255,255,255,0.8), 0 0 0 8px rgba(196,30,58,0.3), 0 6px 25px rgba(0,0,0,0.25); overflow: hidden; } /* 转盘内圈 - 奖品展示区 */ .rotary ul { position: absolute; inset: 0.25rem; border-radius: 50%; background: radial-gradient(circle at center, #fff 0%, #fef9e7 60%, #fff8e1 100%); box-shadow: inset 0 0 30px rgba(0,0,0,0.08), 0 0 0 3px rgba(255,255,255,1), 0 0 0 6px rgba(244,208,63,0.3); list-style: none; padding: 0; margin: 0; overflow: visible; } .rotary ul li { position: absolute; left: 50%; top: 50%; width: 50%; height: 50%; transform-origin: 50% 100%; } /* 奖品内容 */ .rotary ul li span { position: absolute; left: 50%; bottom: 8%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; text-align: center; pointer-events: none; width: 1.6rem; } .rotary ul li span img { width: 0.7rem; height: 0.7rem; border-radius: 8px; object-fit: cover; margin-bottom: 0.05rem; box-shadow: 0 2px 8px rgba(0,0,0,0.2); background: #fff; border: 2px solid rgba(255,255,255,0.9); } .rotary ul li span strong { font-size: 0.14rem; font-weight: 700; color: var(--primary); text-shadow: 0 1px 2px rgba(255,255,255,0.9); line-height: 1.2; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .rotary ul li span i { font-size: 0.1rem; font-style: normal; color: var(--text-muted); margin-top: 0.02rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } /* 动态奖品数量调整 */ .rotary ul.prize-count-5 li span, .rotary ul.prize-count-6 li span { bottom: 10%; width: 1.8rem; } .rotary ul.prize-count-5 li span img, .rotary ul.prize-count-6 li span img { width: 0.85rem; height: 0.85rem; } .rotary ul.prize-count-5 li span strong, .rotary ul.prize-count-6 li span strong { font-size: 0.16rem; } .rotary ul.prize-count-9 li span, .rotary ul.prize-count-10 li span { bottom: 6%; width: 1.4rem; } .rotary ul.prize-count-9 li span img, .rotary ul.prize-count-10 li span img { width: 0.6rem; height: 0.6rem; } .rotary ul.prize-count-9 li span strong, .rotary ul.prize-count-10 li span strong { font-size: 0.12rem; } .rotary ul.prize-count-11 li span, .rotary ul.prize-count-12 li span { bottom: 5%; width: 1.2rem; } .rotary ul.prize-count-11 li span img, .rotary ul.prize-count-12 li span img { width: 0.55rem; height: 0.55rem; } .rotary ul.prize-count-11 li span strong, .rotary ul.prize-count-12 li span strong { font-size: 0.11rem; } /* 转盘中心 */ .rotary p { position: absolute; left: 50%; top: 50%; width: 1.2rem; height: 1.2rem; margin-left: -0.6rem; margin-top: -0.6rem; background: radial-gradient(circle at 30% 30%, #fff 0%, rgba(244,208,63,0.6) 100%); border-radius: 50%; box-shadow: 0 0 0 3px var(--gold), 0 0 0 6px rgba(244,208,63,0.4), inset 0 2px 15px rgba(255,255,255,0.9), 0 6px 20px rgba(0,0,0,0.25); border: 2px solid rgba(255,255,255,0.9); z-index: 5; } /* 抽奖按钮 */ .hand { position: absolute; left: 50%; top: 50%; width: 1.1rem; height: 1.35rem; margin-left: -0.55rem; margin-top: -0.675rem; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); background-size: 100%; z-index: 100; cursor: pointer; border-radius: 50%; box-shadow: 0 0 0 4px rgba(255,255,255,0.5), 0 0 0 8px rgba(244,208,63,0.3), inset 0 2px 10px rgba(255,255,255,0.4), 0 5px 20px rgba(0,0,0,0.4); transition: transform 0.2s; animation: pulse 2s ease-in-out infinite; } @keyframes pulse { 0%, 100% { transform: translate(-50%, -50%) scale(1); } 50% { transform: translate(-50%, -50%) scale(1.1); } } .hand:hover { animation: none; transform: translate(-50%, -50%) scale(1.15); } .hand:active { transform: translate(-50%, -50%) scale(0.95); } .hand a { display: block; width: 100%; height: 100%; border-radius: 50%; } /* ========== 信息栏 ========== */ .lot-num { background: rgba(255,255,255,0.95); border-radius: 12px; padding: 0.6rem 0.8rem; margin: 0 0 0.6rem; text-align: center; box-shadow: 0 2px 10px rgba(0,0,0,0.1); font-size: 0.85rem; color: var(--text-dark); } .lot-num.logged-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.4rem 0.8rem; } .lot-num .user-phone { font-weight: 600; color: var(--primary); font-size: 0.9rem; } .lot-num .remain-count { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: var(--white); padding: 0.2rem 0.6rem; border-radius: 20px; font-size: 0.8rem; font-weight: 600; box-shadow: 0 2px 6px rgba(196,30,58,0.3); } .lot-num .logout-btn { color: var(--text-muted); font-size: 0.75rem; text-decoration: none; padding: 0.15rem 0.5rem; border-radius: 6px; transition: all 0.3s; } .lot-num .logout-btn:hover { color: var(--primary); background: rgba(196,30,58,0.1); } .lot-num strong { color: var(--primary); font-size: 0.95rem; } /* ========== 标签页 ========== */ .tab { margin: 0 0 0.8rem; background: rgba(255,255,255,0.95); border-radius: 16px; overflow: hidden; box-shadow: 0 4px 20px rgba(0,0,0,0.1); } .tab-nav { display: flex; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); } .tab-nav span { flex: 1; padding: 0.7rem 0.4rem; text-align: center; color: rgba(255,255,255,0.9); font-size: 0.85rem; font-weight: 500; cursor: pointer; transition: all 0.3s; border-bottom: 3px solid transparent; } .tab-nav span:hover { color: var(--white); background: rgba(255,255,255,0.1); } .tab-nav span.on { color: var(--white); background: rgba(255,255,255,0.15); border-bottom-color: var(--gold); font-weight: 600; } .tab-ct { display: none; padding: 1rem; min-height: 200px; background: var(--white); } .tab-ct.selected { display: block; } /* ========== 奖品网格 ========== */ .prize { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.6rem; } @media (min-width: 480px) { .prize { grid-template-columns: repeat(3, 1fr); gap: 0.7rem; } } .prize dl { background: linear-gradient(145deg, #fff 0%, #f8f9fa 100%); border-radius: 10px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.05); transition: all 0.3s; border: 1px solid rgba(0,0,0,0.04); } .prize dl:hover { transform: translateY(-2px); box-shadow: 0 4px 15px rgba(0,0,0,0.1); } .prize dl dt { aspect-ratio: 1; overflow: hidden; background: var(--white); } .prize dl dt img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; } .prize dl:hover dt img { transform: scale(1.05); } .prize dl dd { padding: 0.5rem; text-align: center; } .prize dl dd b { display: block; font-size: 0.8rem; color: var(--primary); margin-bottom: 0.2rem; font-weight: 600; line-height: 1.3; } .prize dl dd span { font-size: 0.7rem; color: var(--text-muted); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; } /* ========== 规则与查询 ========== */ .tab-ct .rule-content { line-height: 1.8; font-size: 0.85rem; color: var(--text-dark); } .tab-ct .search-form { display: flex; flex-direction: column; gap: 0.7rem; } .tab-ct .search-form input[type="text"] { padding: 0.7rem 0.9rem; border: 2px solid #e8ecf1; border-radius: 12px; font-size: 0.9rem; outline: none; transition: all 0.3s; background: #f8f9fa; } .tab-ct .search-form input[type="text"]:focus { border-color: var(--primary); background: var(--white); box-shadow: 0 0 0 3px rgba(196,30,58,0.1); } .tab-ct .search-form .btn-search { padding: 0.7rem; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: var(--white); border: none; border-radius: 12px; font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: all 0.3s; box-shadow: 0 3px 10px rgba(196,30,58,0.3); } .tab-ct .search-form .btn-search:hover { opacity: 0.95; transform: translateY(-2px); box-shadow: 0 5px 15px rgba(196,30,58,0.4); } #result { margin-top: 1rem; } .result-list { display: flex; flex-direction: column; gap: 0.7rem; } .result-list dl { display: flex; gap: 0.8rem; padding: 0.8rem; background: linear-gradient(145deg, #f8f9fa 0%, #ffffff 100%); border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); } .result-list dt { flex-shrink: 0; width: 60px; height: 60px; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 6px rgba(0,0,0,0.08); } .result-list dt img { width: 100%; height: 100%; object-fit: cover; } .result-list dd p { margin-bottom: 0.3rem; font-size: 0.85rem; line-height: 1.5; } .result-list dd p strong { color: var(--primary); font-size: 0.9rem; } .no-result { text-align: center; color: var(--text-muted); padding: 1.2rem 1rem; font-size: 0.85rem; } /* ========== 遮罩与弹窗 ========== */ .mask { position: fixed; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(3px); z-index: 998; display: none; animation: fadeIn 0.3s; } @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } } .opwin { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 85%; max-width: 380px; background: var(--white); border-radius: 16px; box-shadow: 0 10px 40px rgba(0,0,0,0.3); z-index: 999; display: none; overflow: hidden; animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1); } @keyframes slideUp { from { opacity: 0; transform: translate(-50%, -40%); } to { opacity: 1; transform: translate(-50%, -50%); } } .opwin > div { padding: 1.5rem 1.2rem; } .opwin h1 { font-size: 1.1rem; font-weight: 700; color: var(--text-dark); text-align: center; margin-bottom: 0.3rem; position: relative; padding-bottom: 0.8rem; } .opwin h1::after { content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 40px; height: 3px; background: linear-gradient(90deg, transparent, var(--primary), transparent); border-radius: 2px; } .opwin h3 { font-size: 0.9rem; font-weight: 400; color: var(--text-muted); text-align: center; margin: 0.7rem 0 1rem; line-height: 1.6; } /* ========== 登录弹窗 ========== */ .opwin.login .form { display: flex; flex-direction: row; gap: 0.6rem; align-items: flex-end; margin-top: 0.8rem; } .opwin.login .form li { margin-bottom: 0; flex: 1; } .opwin.login .form li:first-child { flex: 2; } .opwin.login .form li.c3 { flex: 1; min-width: 90px; } .opwin input.txt { width: 100%; padding: 0.75rem 0.9rem; border: 2px solid #e8ecf1; border-radius: 12px; font-size: 0.9rem; outline: none; transition: all 0.3s; background: #f8f9fa; } .opwin input.txt:focus { border-color: var(--primary); background: var(--white); box-shadow: 0 0 0 3px rgba(196,30,58,0.1); } .opwin input.btn, .opwin .a-btn { width: 100%; padding: 0.75rem 1rem; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: var(--white); border: none; border-radius: 12px; font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: all 0.3s; box-shadow: 0 3px 10px rgba(196,30,58,0.3); white-space: nowrap; } .opwin input.btn:hover, .opwin .a-btn:hover { opacity: 0.95; transform: translateY(-2px); box-shadow: 0 5px 15px rgba(196,30,58,0.4); } .opwin .a-btn { display: block; text-align: center; text-decoration: none; margin-top: 1rem; } .btn-close.w-btn { position: absolute; right: 0.8rem; top: 0.8rem; font-size: 1.5rem; color: var(--text-muted); cursor: pointer; line-height: 1; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; border-radius: 50%; transition: all 0.3s; } .btn-close.w-btn:hover { color: var(--primary); background: rgba(196,30,58,0.1); transform: rotate(90deg); } .result ul { text-align: center; padding: 0.8rem 0; } .result ul img { max-width: 130px; margin: 0 auto; display: block; border-radius: 12px; box-shadow: 0 3px 12px rgba(0,0,0,0.15); } input.f-btn { width: 100%; padding: 0.7rem; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: var(--white); border: none; border-radius: 12px; font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: all 0.3s; box-shadow: 0 3px 10px rgba(196,30,58,0.3); } input.f-btn:hover { opacity: 0.95; transform: translateY(-2px); box-shadow: 0 5px 15px rgba(196,30,58,0.4); } /* ========== 响应式优化 ========== */ @media (max-width: 480px) { .core-w { max-width: 3.2rem; padding: 0.5rem; } .core { width: 3.2rem; height: 3.2rem; } .rotary ul { inset: 0.2rem; } .rotary ul li span { width: 1.4rem; bottom: 7%; } .rotary ul li span img { width: 0.6rem; height: 0.6rem; } .rotary ul li span strong { font-size: 0.12rem; } .rotary ul li span i { font-size: 0.09rem; } .rotary p { width: 1rem; height: 1rem; margin-left: -0.5rem; margin-top: -0.5rem; } .hand { width: 0.95rem; height: 1.15rem; margin-left: -0.475rem; margin-top: -0.575rem; } .prize { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; } .prize dl dd { padding: 0.4rem; } .prize dl dd b { font-size: 0.75rem; } .prize dl dd span { font-size: 0.65rem; } .opwin.login .form { flex-direction: column; gap: 0.7rem; } .opwin.login .form li { flex: 1; width: 100%; } .page-title { font-size: 1.2rem; } .page-subtitle { font-size: 0.7rem; } } @media (min-width: 768px) { .main { padding: 1.2rem; } .tab-ct { padding: 1.2rem; } .prize { grid-template-columns: repeat(3, 1fr); gap: 0.8rem; } .core-w { max-width: 4.2rem; padding: 0.8rem; } .core { width: 4.2rem; height: 4.2rem; } .rotary ul li span { width: 1.8rem; } .rotary ul li span img { width: 0.8rem; height: 0.8rem; } .rotary ul li span strong { font-size: 0.16rem; } .rotary p { width: 1.3rem; height: 1.3rem; margin-left: -0.65rem; margin-top: -0.65rem; } .hand { width: 1.2rem; height: 1.45rem; margin-left: -0.6rem; margin-top: -0.725rem; } } @media (min-width: 1024px) { .main { padding: 1.8rem; } .core-w { max-width: 4.5rem; padding: 1rem; } .core { width: 4.5rem; height: 4.5rem; } .rotary ul li span { width: 2rem; } .rotary ul li span img { width: 0.85rem; height: 0.85rem; } .rotary ul li span strong { font-size: 0.17rem; } .rotary p { width: 1.4rem; height: 1.4rem; margin-left: -0.7rem; margin-top: -0.7rem; } .hand { width: 1.25rem; height: 1.5rem; margin-left: -0.625rem; margin-top: -0.75rem; } .page-title { font-size: 1.9rem; } .page-subtitle { font-size: 0.95rem; } }