/* 科技感抽奖活动响应式样式 */
/* 设计理念：移动优先，渐进增强 */

/* 全局重置和基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #64ffda;
    --secondary-color: #00bfff;
    --bg-primary: #0a192f;
    --bg-secondary: #172a45;
    --text-primary: #e6f1ff;
    --text-secondary: #a8b2d1;
    --border-color: rgba(255, 255, 255, 0.1);
    --card-bg: rgba(255, 255, 255, 0.05);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --gradient: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    --button-gradient: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
}

/* 基础样式 */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--gradient);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 容器样式 */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px;
}

/* 头部样式 */
.header {
    text-align: center;
    padding: 24px 16px;
    background: var(--card-bg);
    border-radius: 20px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
}

.header h1 {
    font-size: clamp(1.8rem, 5vw, 3rem);
    margin-bottom: 8px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.header p {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--text-secondary);
    margin-bottom: 16px;
}

/* 导航栏样式 */
.nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: var(--card-bg);
    border-radius: 16px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
}

.nav-brand {
    font-size: 1.2rem;
    font-weight: 700;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    gap: 16px;
}

.nav-item {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 8px 12px;
    border-radius: 8px;
}

.nav-item:hover {
    color: var(--primary-color);
    background: rgba(100, 255, 218, 0.1);
}

/* 移动导航菜单 */
.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

.mobile-nav-menu {
    display: none;
    position: absolute;
    top: 70px;
    left: 16px;
    right: 16px;
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 16px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    z-index: 1000;
}

.mobile-nav-menu.active {
    display: block;
}

.mobile-nav-menu .nav-item {
    display: block;
    margin-bottom: 12px;
    text-align: center;
}

/* 主内容区域 */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* 卡片样式 */
.card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 24px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(100, 255, 218, 0.2);
    border-color: var(--primary-color);
}

.card-title {
    font-size: clamp(1.2rem, 3vw, 1.6rem);
    margin-bottom: 16px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 12px rgba(100, 255, 218, 0.3);
}

/* 按钮样式 */
.btn {
    width: 100%;
    padding: 14px 20px;
    background: var(--button-gradient);
    border: none;
    border-radius: 12px;
    color: var(--bg-primary);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 16px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(100, 255, 218, 0.4);
}

.btn:active {
    transform: translateY(0);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary-color);
}

/* 网格布局 */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

/* 奖品卡片 */
.prize-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.prize-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(100, 255, 218, 0.2);
    border-color: var(--primary-color);
}

.prize-image {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.prize-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.prize-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
    flex: 1;
}

.prize-probability {
    font-size: 0.8rem;
    color: var(--primary-color);
    font-weight: 600;
    background: rgba(100, 255, 218, 0.1);
    padding: 6px 12px;
    border-radius: 20px;
}

/* 结果容器 */
.result-container {
    text-align: center;
    padding: 32px 20px;
    background: var(--card-bg);
    border-radius: 20px;
    margin: 24px 0;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
}

.result-title {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    margin-bottom: 24px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.result-prize-image {
    width: clamp(120px, 30vw, 200px);
    height: clamp(120px, 30vw, 200px);
    object-fit: cover;
    border-radius: 16px;
    margin: 24px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.result-prize-name {
    font-size: clamp(1.2rem, 3vw, 2rem);
    margin: 16px 0;
    color: var(--text-primary);
    font-weight: 600;
}

.result-prize-description {
    font-size: clamp(0.9rem, 2vw, 1.2rem);
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* 拉霸机样式 */
.slot-machine {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 24px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    text-align: center;
    margin-bottom: 24px;
}

.slot-reels {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin: 24px 0;
}

.slot-reel {
    width: 100px;
    height: 140px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    border: 2px solid rgba(100, 255, 218, 0.3);
}

.slot-reel::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    transform: translateY(-50%);
    z-index: 10;
}

.slot-reel-inner {
    position: relative;
    transition: transform 5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.slot-item {
    height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 10px;
    box-sizing: border-box;
}

.slot-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 8px;
}

.slot-item span {
    font-size: 11px;
    color: var(--text-primary);
    text-align: center;
}

.spin-btn {
    padding: 14px 32px;
    background: var(--button-gradient);
    border: none;
    border-radius: 50px;
    color: var(--bg-primary);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 24px 0;
    box-shadow: 0 4px 15px rgba(100, 255, 218, 0.3);
}

.spin-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(100, 255, 218, 0.4);
}

.spin-btn:disabled {
    background: rgba(100, 255, 218, 0.3);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 用户信息 */
.user-info {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 16px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.user-details {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--button-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg-primary);
    font-weight: bold;
    font-size: 1.2rem;
}

.user-info-text h3 {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.user-info-text p {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin: 0;
}

.user-stats {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.stat-item {
    background: rgba(100, 255, 218, 0.1);
    padding: 8px 12px;
    border-radius: 20px;
    color: var(--primary-color);
    font-size: 0.8rem;
    font-weight: 600;
}

/* 幻灯片样式 */
.slideshow-container {
    position: relative;
    margin: 0 auto 24px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    max-height: 300px;
}

.slide {
    position: relative;
    height: 100%;
}

.slide-content {
    position: relative;
    height: 100%;
}

.slide-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.slide-text {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
    padding: 24px;
}

.slide-text h3 {
    margin: 0 0 8px 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.slide-text p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

/* 导航按钮 */
.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 12px;
    margin-top: -22px;
    color: white;
    font-weight: bold;
    font-size: 16px;
    transition: 0.6s ease;
    border-radius: 0 8px 8px 0;
    user-select: none;
    background: rgba(0,0,0,0.5);
}

.next {
    right: 0;
    border-radius: 8px 0 0 8px;
}

.prev:hover, .next:hover {
    background: rgba(0,0,0,0.8);
}

/* 指示器 */
.slide-indicators {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.dot {
    cursor: pointer;
    height: 10px;
    width: 10px;
    margin: 0 2px;
    background-color: rgba(255,255,255,0.5);
    border-radius: 50%;
    display: inline-block;
    transition: background-color 0.6s ease;
}

.active, .dot:hover {
    background-color: var(--primary-color);
}

/* 淡入动画 */
.fade {
    animation-name: fade;
    animation-duration: 1.5s;
}

@keyframes fade {
    from {opacity: .4}
    to {opacity: 1}
}

/* 登录弹窗 */
.login-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.login-popup-content {
    background: var(--bg-secondary);
    border-radius: 20px;
    padding: 32px;
    max-width: 90%;
    width: 400px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    text-align: center;
}

.login-popup-content h3 {
    font-size: 1.5rem;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.login-popup-content p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.login-popup-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.login-popup-buttons .btn {
    flex: 1;
    margin-top: 0;
}

/* 漂浮客服按钮 */
.floating-service-btn {
    position: fixed;
    right: 16px;
    bottom: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--button-gradient);
    color: var(--bg-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    box-shadow: 0 4px 15px rgba(100, 255, 218, 0.4);
    cursor: pointer;
    z-index: 999;
    transition: all 0.3s ease;
}

.floating-service-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(100, 255, 218, 0.6);
}

/* 响应式设计 */
@media (max-width: 768px) {
    /* 导航栏 */
    .nav-menu {
        display: none;
    }
    
    .mobile-nav-toggle {
        display: block;
    }
    
    /* 容器 */
    .container {
        padding: 12px;
    }
    
    /* 头部 */
    .header {
        padding: 20px 16px;
        margin-bottom: 20px;
    }
    
    /* 卡片 */
    .card {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    /* 网格布局 */
    .grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    /* 拉霸机 */
    .slot-reels {
        gap: 12px;
    }
    
    .slot-reel {
        width: 80px;
        height: 120px;
    }
    
    .slot-item {
        height: 120px;
    }
    
    .slot-item img {
        width: 40px;
        height: 40px;
    }
    
    /* 用户信息 */
    .user-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .user-stats {
        width: 100%;
        justify-content: space-between;
    }
    
    /* 幻灯片 */
    .slideshow-container {
        max-height: 200px;
    }
    
    .slide-image {
        height: 200px;
    }
    
    .slide-text {
        padding: 16px;
    }
    
    /* 结果容器 */
    .result-container {
        padding: 24px 16px;
    }
    
    /* 按钮 */
    .btn {
        padding: 12px 16px;
        font-size: 0.9rem;
    }
    
    .spin-btn {
        padding: 12px 24px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    /* 容器 */
    .container {
        padding: 8px;
    }
    
    /* 头部 */
    .header {
        padding: 16px 12px;
        margin-bottom: 16px;
    }
    
    /* 卡片 */
    .card {
        padding: 16px;
        margin-bottom: 16px;
    }
    
    /* 拉霸机 */
    .slot-reels {
        gap: 8px;
    }
    
    .slot-reel {
        width: 70px;
        height: 100px;
    }
    
    .slot-item {
        height: 100px;
    }
    
    /* 登录弹窗 */
    .login-popup-content {
        padding: 24px;
        max-width: 95%;
    }
    
    /* 漂浮客服按钮 */
    .floating-service-btn {
        width: 48px;
        height: 48px;
        font-size: 18px;
        right: 12px;
        bottom: 20px;
    }
}

/* 动画效果 */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes slideIn {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.slide-in {
    animation: slideIn 0.5s ease-out;
}

/* 加载动画 */
.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.loading-spinner::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 3px solid rgba(100, 255, 218, 0.3);
    border-radius: 50%;
    border-top: 3px solid var(--primary-color);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 工具类 */
.text-center {
    text-align: center;
}

.mb-1 {
    margin-bottom: 8px;
}

.mb-2 {
    margin-bottom: 16px;
}

.mb-3 {
    margin-bottom: 24px;
}

.mt-1 {
    margin-top: 8px;
}

.mt-2 {
    margin-top: 16px;
}

.mt-3 {
    margin-top: 24px;
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-1 {
    gap: 8px;
}

.gap-2 {
    gap: 16px;
}

.gap-3 {
    gap: 24px;
}

.w-full {
    width: 100%;
}

.hidden {
    display: none;
}

.visible {
    display: block;
}

/* 深色模式优化 */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #0a192f;
        --bg-secondary: #172a45;
    }
}

/* 触摸反馈 */
@media (hover: none) and (pointer: coarse) {
    .btn {
        touch-action: manipulation;
    }
    
    .prize-card {
        touch-action: manipulation;
    }
    
    .slot-reel {
        touch-action: manipulation;
    }
}