/* 中国移动品牌色 */
:root {
    --cmcc-blue: #0099FF;
    --cmcc-dark-blue: #0066CC;
    --cmcc-light-blue: #66B2FF;
    --cmcc-green: #00CC66;
    --cmcc-orange: #FF6600;
    --cmcc-red: #FF3333;
    --cmcc-yellow: #FFCC00;
    --cmcc-purple: #9933FF;
    --cmcc-pink: #FF6699;
    --cmcc-cyan: #00CCCC;
    
    --gradient-primary: linear-gradient(135deg, #0099FF 0%, #0066CC 100%);
    --gradient-gold: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    --gradient-silver: linear-gradient(135deg, #C0C0C0 0%, #808080 100%);
    
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.15);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.2);
    
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 20px;
    --border-radius-xl: 30px;
}

/* 应用容器 */
.app-container {
    min-height: 100vh;
    background: linear-gradient(180deg, #E8F4FD 0%, #F0F8FF 50%, #E8F4FD 100%);
    position: relative;
    overflow-x: hidden;
    padding-bottom: 40px;
}

/* 背景装饰 */
.bg-decoration {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bg-circle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
}

.circle-1 {
    width: 300px;
    height: 300px;
    background: var(--cmcc-blue);
    top: -100px;
    right: -100px;
    animation: float 8s ease-in-out infinite;
}

.circle-2 {
    width: 200px;
    height: 200px;
    background: var(--cmcc-green);
    bottom: 20%;
    left: -50px;
    animation: float 10s ease-in-out infinite reverse;
}

.circle-3 {
    width: 150px;
    height: 150px;
    background: var(--cmcc-orange);
    top: 40%;
    right: -30px;
    animation: float 12s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

/* 头部 */
.app-header {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 20px 16px;
    background: var(--gradient-primary);
    border-radius: 0 0 var(--border-radius-xl) var(--border-radius-xl);
    box-shadow: var(--shadow-md);
}

.logo {
    margin-bottom: 12px;
}

.logo-img {
    height: 40px;
    margin: 0 auto;
    filter: brightness(0) invert(1);
}

.app-title {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    margin-bottom: 8px;
}

.app-subtitle {
    font-size: 14px;
    color: rgba(255,255,255,0.9);
}

/* 用户信息区 */
.user-info-section {
    position: relative;
    z-index: 1;
    padding: 16px;
    margin-top: -20px;
}

.user-card {
    background: #fff;
    border-radius: var(--border-radius-lg);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-md);
}

.user-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--cmcc-light-blue);
    flex-shrink: 0;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-details {
    flex: 1;
}

.user-phone {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.user-status {
    font-size: 14px;
    color: #666;
}

.chance-count {
    color: var(--cmcc-orange);
    font-weight: 700;
    font-size: 18px;
}

/* 转盘区域 */
.wheel-section {
    position: relative;
    z-index: 1;
    padding: 20px 16px;
}

/* 奖品展示 */
.prizes-section {
    position: relative;
    z-index: 1;
    padding: 16px;
}

.section-title {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    text-align: center;
    margin-bottom: 16px;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::before,
.section-title::after {
    content: '✨';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.section-title::before {
    right: calc(100% + 8px);
}

.section-title::after {
    left: calc(100% + 8px);
}

.prizes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.prize-card {
    background: #fff;
    border-radius: var(--border-radius-md);
    padding: 16px 8px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s, box-shadow 0.3s;
}

.prize-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.prize-icon-small {
    font-size: 36px;
    margin-bottom: 8px;
}

.prize-name-small {
    font-size: 13px;
    color: #333;
    font-weight: 500;
    margin-bottom: 4px;
}

.prize-probability {
    font-size: 11px;
    color: var(--cmcc-orange);
    background: rgba(255, 102, 0, 0.1);
    padding: 2px 8px;
    border-radius: 10px;
    display: inline-block;
}

/* 活动规则 */
.rules-section {
    position: relative;
    z-index: 1;
    padding: 16px;
}

.rules-content {
    background: #fff;
    border-radius: var(--border-radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.rules-list {
    counter-reset: rule-counter;
}

.rules-list li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 12px;
    font-size: 14px;
    color: #555;
    line-height: 1.6;
}

.rules-list li::before {
    counter-increment: rule-counter;
    content: counter(rule-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 20px;
    height: 20px;
    background: var(--gradient-primary);
    color: #fff;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rules-list li:last-child {
    margin-bottom: 0;
}

/* 中奖记录 */
.history-section {
    position: relative;
    z-index: 1;
    padding: 16px;
}

.history-list {
    background: #fff;
    border-radius: var(--border-radius-lg);
    padding: 16px;
    box-shadow: var(--shadow-sm);
    max-height: 300px;
    overflow-y: auto;
}

.history-empty {
    text-align: center;
    color: #999;
    padding: 40px 20px;
    font-size: 14px;
}

.history-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.history-item:last-child {
    border-bottom: none;
}

.history-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #FFE5CC 0%, #FFD9B3 100%);
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-right: 12px;
    flex-shrink: 0;
}

.history-info {
    flex: 1;
}

.history-prize-name {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.history-time {
    font-size: 12px;
    color: #999;
}

.history-status {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 10px;
    font-weight: 500;
}

.status-pending {
    background: #FFF3E0;
    color: var(--cmcc-orange);
}

.status-received {
    background: #E8F5E9;
    color: var(--cmcc-green);
}

/* 底部 */
.app-footer {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 24px 16px;
    margin-top: 20px;
}

.app-footer p {
    font-size: 12px;
    color: #999;
    margin-bottom: 4px;
}

/* 弹窗样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: #fff;
    border-radius: var(--border-radius-xl);
    width: 100%;
    max-width: 320px;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s;
    box-shadow: var(--shadow-lg);
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-header {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--gradient-primary);
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    color: #fff;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.modal-close:hover {
    background: rgba(255,255,255,0.3);
}

.modal-body {
    padding: 24px 20px;
    text-align: center;
}

.modal-footer {
    padding: 0 20px 20px;
    display: flex;
    gap: 12px;
}

/* 中奖弹窗 */
.win-modal .modal-body {
    background: linear-gradient(180deg, #FFF9E6 0%, #fff 100%);
}

.prize-icon {
    font-size: 80px;
    margin-bottom: 16px;
    animation: bounce 1s ease infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.win-text {
    font-size: 16px;
    color: #666;
    margin-bottom: 8px;
}

.win-prize-name {
    font-size: 24px;
    font-weight: 700;
    color: var(--cmcc-orange);
    margin-bottom: 8px;
}

.win-desc {
    font-size: 14px;
    color: #999;
}

/* 未中奖弹窗 */
.lose-modal .modal-body {
    background: linear-gradient(180deg, #F5F5F5 0%, #fff 100%);
}

.lose-text {
    font-size: 20px;
    font-weight: 600;
    color: #666;
    margin-bottom: 8px;
}

.lose-desc {
    font-size: 14px;
    color: #999;
}

/* 验证弹窗 */
.verify-modal .modal-body {
    padding: 40px 20px;
}

.verify-icon {
    font-size: 60px;
    margin-bottom: 16px;
}

.verify-text {
    font-size: 16px;
    color: #666;
    margin-bottom: 20px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f0f0f0;
    border-top-color: var(--cmcc-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 按钮样式 */
.btn {
    flex: 1;
    padding: 14px 24px;
    border-radius: var(--border-radius-xl);
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s;
    text-align: center;
}

.btn-primary {
    background: var(--gradient-primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 153, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 153, 255, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: #f0f0f0;
    color: #666;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

/* Toast提示 */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.8);
    color: #fff;
    padding: 12px 24px;
    border-radius: var(--border-radius-xl);
    font-size: 14px;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    white-space: nowrap;
}

.toast.show {
    opacity: 1;
    visibility: visible;
}

/* 后台管理入口 */
.admin-link {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: rgba(0,0,0,0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    z-index: 100;
    opacity: 0.5;
    transition: opacity 0.3s;
}

.admin-link:hover {
    opacity: 1;
}

/* 响应式适配 */
@media (max-width: 375px) {
    .app-title {
        font-size: 24px;
    }
    
    .prizes-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .wheel-container {
        width: 280px;
        height: 280px;
    }
}

@media (min-width: 414px) {
    .prizes-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 768px) {
    .app-container {
        max-width: 480px;
        margin: 0 auto;
        box-shadow: 0 0 40px rgba(0,0,0,0.1);
    }
    
    .prizes-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
