/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'Segoe UI', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 头部样式 */
.header {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #667eea;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.user-nav {
    display: flex;
    align-items: center;
    gap: 15px;
}
.results-panel{
    
background: #fff;    
}
.welcome, .points {
    font-size: 14px;
    color: #666;
}

.btn-login, .btn-register, .btn-history, .btn-logout {
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-login {
    background: #f8f9fa;
    color: #667eea;
    border: 1px solid #667eea;
}

.btn-register {
    background: #667eea;
    color: white;
    border: 1px solid #667eea;
}

.btn-history {
    background: #28a745;
    color: white;
    border: 1px solid #28a745;
}

.btn-logout {
    background: #dc3545;
    color: white;
    border: 1px solid #dc3545;
}

/* 主内容区 */
.main-content {
    padding: 30px 0;
    min-height: calc(100vh - 80px);
}

.lottery-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .lottery-container {
        grid-template-columns: 1fr;
    }
}

/* 转盘容器 */
/* 转盘容器 */
.wheel-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    aspect-ratio: 1/1;
    overflow: visible;
}

/* 简化指针 - 只保留一个简洁的三角形箭头 */
.wheel-pointer {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;           /* 减少宽度 */
    height: 35px;          /* 减少高度 */
    z-index: 20;
    pointer-events: none;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

/* 三角形箭头 - 缩小 */
.wheel-pointer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;    /* 减小宽度 */
    border-right: 6px solid transparent;  /* 减小宽度 */
    border-top: 12px solid #ff4757;        /* 减小高度 */
    z-index: 2;
}

/* 指针杆 - 缩短并变细 */
.wheel-pointer::after {
    content: '';
    position: absolute;
    top: 12px;             /* 调整位置，与三角形连接 */
    left: 50%;
    transform: translateX(-50%);
    width: 2px;           /* 变细 */
    height: 15px;         /* 缩短 */
    background: linear-gradient(to bottom, #ff4757, #ff6b6b);
    z-index: 1;
    border-radius: 0 0 1px 1px;
}

/* Canvas元素占满容器 */
#wheelCanvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
    border-radius: 50%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    background: white;
}

/* 中心按钮 - 相应缩小以匹配指针比例 */
.wheel-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;           /* 缩小中心圆 */
    height: 50px;         /* 缩小中心圆 */
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border: 2px solid #667eea; /* 变细边框 */
}

/* 开始按钮 - 相应缩小 */
.start-btn {
    width: 40px;          /* 缩小 */
    height: 40px;         /* 缩小 */
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    font-size: 9px;       /* 减小字体 */
    font-weight: bold;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;             /* 减小间距 */
    transition: all 0.3s ease;
    box-shadow: 0 3px 8px rgba(102, 126, 234, 0.4);
    z-index: 11;
    text-align: center;
    line-height: 1.2;
}

.start-btn:hover:not(:disabled) {
    transform: scale(1.1);
    box-shadow: 0 5px 12px rgba(102, 126, 234, 0.6);
}

.start-btn:disabled {
    background: #cccccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 响应式设计 - 手机端进一步缩小 */
@media (max-width: 768px) {
    .wheel-container {
        max-width: 300px;
    }
    
    .wheel-pointer {
        width: 15px;      /* 手机端更小 */
        height: 25px;     /* 手机端更小 */
    }
    
    .wheel-pointer::before {
        border-left: 4px solid transparent;
        border-right: 4px solid transparent;
        border-top: 8px solid #ff4757;
    }
    
    .wheel-pointer::after {
        top: 8px;
        width: 1.5px;
        height: 10px;
    }
    
    .wheel-center {
        width: 40px;
        height: 40px;
    }
    
    .start-btn {
        width: 32px;
        height: 32px;
        font-size: 7px;
    }
}

@media (max-width: 480px) {
    .wheel-container {
        max-width: 280px;
    }
    
    .wheel-pointer {
        width: 12px;      /* 小手机端最小 */
        height: 20px;     /* 小手机端最小 */
    }
    
    .wheel-pointer::before {
        border-left: 3px solid transparent;
        border-right: 3px solid transparent;
        border-top: 6px solid #ff4757;
    }
    
    .wheel-pointer::after {
        top: 6px;
        width: 1px;
        height: 8px;
    }
    
    .wheel-center {
        width: 35px;
        height: 35px;
    }
    
    .start-btn {
        width: 28px;
        height: 28px;
        font-size: 6px;
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 中奖效果 */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.prize-item.winning {
    animation: pulse 1s infinite;
    box-shadow: 0 0 20px #ffd700;
}

/* 奖品列表 */
.prizes-list, .rules-panel {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.prizes-list h3, .rules-panel h3 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.prizes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.prize-item {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    color: white;
    transition: transform 0.3s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.prize-item:hover {
    transform: translateY(-5px);
}

.prize-name {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 5px;
}

.prize-probability {
    font-size: 12px;
    opacity: 0.9;
}

/* 规则面板 */
.rules-panel ul {
    list-style: none;
}

.rules-panel li {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    color: #666;
}

.rules-panel li:last-child {
    border-bottom: none;
}

.rules-panel span {
    color: #667eea;
    font-weight: bold;
}

/* 历史记录 */
.history-panel {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.history-panel h3 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.history-item.win {
    border-left-color: #28a745;
}

.history-item.lose {
    border-left-color: #dc3545;
}

.history-time {
    font-size: 12px;
    color: #999;
}

/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 15px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    position: relative;
    animation: modalShow 0.3s ease;
}

@keyframes modalShow {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

.result-icon, .message-icon {
    text-align: center;
    font-size: 60px;
    margin-bottom: 20px;
}

.result-icon i {
    color: #ffd700;
}

.message-icon i {
    color: #667eea;
}

#resultTitle, #messageTitle {
    text-align: center;
    color: #667eea;
    margin-bottom: 20px;
}

.result-details {
    text-align: center;
    margin-bottom: 25px;
}

.result-details p {
    margin: 10px 0;
    font-size: 18px;
}

.result-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.btn-confirm, .btn-share, .btn-ok {
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-confirm, .btn-ok {
    background: #667eea;
    color: white;
}

.btn-share {
    background: #28a745;
    color: white;
}

.btn-confirm:hover, .btn-share:hover, .btn-ok:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* 登录注册页面 */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.auth-box {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.auth-box h2 {
    text-align: center;
    color: #667eea;
    margin-bottom: 30px;
    font-size: 28px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #666;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    border-color: #667eea;
    outline: none;
}

.btn-submit {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.auth-links {
    text-align: center;
    margin-top: 20px;
    color: #666;
}

.auth-links a {
    color: #667eea;
    text-decoration: none;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 10px;
    }
    
    .user-nav {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .wheel-container {
        max-width: 300px;
    }
    
    .wheel-pointer {
        width: 20px;
        height: 35px;
    }
    
    .wheel-pointer::before {
        border-left: 6px solid transparent;
        border-right: 6px solid transparent;
        border-top: 15px solid #ff4757;
    }
    
    .wheel-pointer::after {
        top: 15px;
        height: 18px;
    }
    
    .wheel-center {
        width: 50px;
        height: 50px;
    }
    
    .start-btn {
        width: 40px;
        height: 40px;
        font-size: 8px;
    }
    
    .prizes-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .wheel-container {
        max-width: 280px;
    }
    
    .wheel-pointer {
        width: 18px;
        height: 30px;
    }
    
    .wheel-pointer::before {
        border-left: 5px solid transparent;
        border-right: 5px solid transparent;
        border-top: 12px solid #ff4757;
    }
    
    .wheel-pointer::after {
        top: 12px;
        height: 15px;
    }
    
    .wheel-center {
        width: 45px;
        height: 45px;
    }
    
    .start-btn {
        width: 35px;
        height: 35px;
        font-size: 7px;
    }
    
    .prizes-grid {
        grid-template-columns: 1fr;
    }
}
/* 抽奖记录轮播样式 */
.history-carousel {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.carousel-container {
    position: relative;
    height: 400px; /* 10条记录的高度 */
    overflow: hidden;
}

.carousel-page {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.carousel-page.active {
    opacity: 1;
    position: relative;
}

.carousel-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
    padding: 10px 0;
}

.carousel-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.carousel-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.carousel-btn i {
    font-size: 18px;
}

.carousel-indicators {
    display: flex;
    gap: 8px;
}

.carousel-indicators .indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #ddd;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
}

.carousel-indicators .indicator.active {
    background-color: #667eea;
    transform: scale(1.2);
}

.carousel-indicators .indicator:hover {
    background-color: #764ba2;
}

/* 历史记录向上滚动样式 */
.history-scroll-container {
    width: 100%;
    height: 400px; /* 固定高度，显示大约6条记录 */
    overflow-y: hidden;
    position: relative;
    background: #f8f9fa;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.scroll-wrapper {
    animation: scrollUp 30s linear infinite;
}

/* 滚动动画 */
@keyframes scrollUp {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-50%);
    }
}

/* 悬停时暂停滚动 */
.history-scroll-container:hover .scroll-wrapper {
    animation-play-state: paused;
}

.scroll-indicator {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    text-align: center;
    color: #667eea;
    font-size: 14px;
    opacity: 0.7;
    animation: pulse 2s infinite;
}

.scroll-indicator i {
    margin-right: 5px;
    animation: bounce 1s infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.7;
    }
    50% {
        opacity: 1;
    }
}

/* 历史记录项样式调整 */
.history-item {
    background: white;
    border-radius: 8px;
    padding: 12px 15px;
    margin: 8px 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    animation: fadeIn 0.5s ease-out;
}

.history-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.history-item.win {
    border-left: 4px solid #4CAF50;
    background: linear-gradient(135deg, #ffffff 0%, #f1f8e9 100%);
}

.history-item.lose {
    border-left: 4px solid #FF6B6B;
    background: linear-gradient(135deg, #ffffff 0%, #fce4ec 100%);
}

.history-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-prize {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.history-prize strong {
    font-size: 15px;
    color: #333;
    font-family: "Microsoft YaHei", sans-serif;
}

.history-time {
    color: #888;
    font-size: 12px;
    white-space: nowrap;
    min-width: 120px;
    text-align: right;
}

.win-badge, .lose-badge {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    white-space: nowrap;
}

.win-badge {
    background-color: #4CAF50;
    color: white;
}

.lose-badge {
    background-color: #FF6B6B;
    color: white;
}