@import url('https://fonts.googleapis.com/css2?family=Roboto+Condensed:wght@700&family=Noto+Sans+SC:wght@400;700&display=swap');

:root {
    --bg-color: #f1f384;
    --machine-bg: linear-gradient(145deg, #f8e4a2, #e9c77e);
    --machine-border: #b8860b;
    --reel-bg: #fff;
    --text-color: #333;
    --gold-color: #ffc107;
    --shadow: 0 10px 20px rgba(0,0,0,0.3);
}

body {
    margin: 0;
    font-family: 'Noto Sans SC', sans-serif;
    /* 新的渐变配色 */
    background: #70e1f5;  /* fallback for old browsers */
    background: -webkit-linear-gradient(to right, #ffd194, #70e1f5);  /* Chrome 10-25, Safari 5.1-6 */
    background: linear-gradient(to right, #ffd194, #70e1f5); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
    background-size: 400% 400%;
    animation: gradientShift 8s ease infinite;
    
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: white;
    padding: 20px 0;
    position: relative;
    overflow-x: hidden;
}

/* 背景渐变动画 */
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 添加动态气泡背景 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 0% 100%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 100%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 0% 0%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    animation: float 6s ease-in-out infinite;
    pointer-events: none;
    z-index: -2;
}

/* 气泡浮动动画 */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-10px) rotate(1deg); }
    66% { transform: translateY(5px) rotate(-1deg); }
}

/* 添加星星背景 */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, rgba(255, 255, 255, 0.8), transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255, 255, 255, 0.6), transparent),
        radial-gradient(1px 1px at 90px 40px, rgba(255, 255, 255, 0.8), transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(255, 255, 255, 0.6), transparent),
        radial-gradient(2px 2px at 160px 30px, rgba(255, 255, 255, 0.8), transparent);
    background-repeat: repeat;
    background-size: 200px 100px;
    animation: sparkle 3s linear infinite;
    pointer-events: none;
    z-index: -1;
}

/* 星星闪烁动画 */
@keyframes sparkle {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 0.4; }
}

.container {
    text-align: center;
    position: relative;
    z-index: 1;
}

h1 {
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 2.5em; /* 从2.5em增加到3em */
    color: var(--gold-color);
    text-shadow: 2px 2px 5px rgba(0,0,0,0.5);
    margin-bottom: 20px;
    /* 添加发光效果 */
    filter: drop-shadow(0 0 10px rgba(255, 193, 7, 0.5));
    animation: glow 2s ease-in-out infinite alternate;
}

/* 标题发光动画 */
@keyframes glow {
    from { filter: drop-shadow(0 0 10px rgba(255, 193, 7, 0.5)); }
    to { filter: drop-shadow(0 0 20px rgba(255, 193, 7, 0.8)); }
}

/* 老虎机主体 - 添加更强的立体效果 */
.slot-machine {
    background: var(--machine-bg);
    border: 12px solid var(--machine-border); /* 从10px增加到12px */
    border-radius: 25px; /* 从20px增加到25px */
    padding: 40px; /* 从30px增加到40px */
    box-shadow: 
        var(--shadow), 
        inset 0 0 20px rgba(255,255,255,0.3),
        0 0 30px rgba(255, 193, 7, 0.3);
    display: inline-block;
    position: relative;
    animation: machineFloat 4s ease-in-out infinite;
}

/* 老虎机浮动动画 */
@keyframes machineFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
}

.reels {
    display: flex;
    background: #222;
    border: 6px solid #444; /* 从5px增加到6px */
    border-radius: 12px; /* 从10px增加到12px */
    padding: 25px 12px; /* 从20px 10px增加到25px 12px */
}

.reel {
    width: 130px; /* 从100px增加到130px */
    height: 130px; /* 从100px增加到130px */
    background-color: var(--reel-bg);
    margin: 0 12px; /* 从10px增加到12px */
    border-radius: 12px; /* 从10px增加到12px */
    overflow: hidden;
    border: 3px solid #000; /* 从2px增加到3px */
}

.reel-inner {
    transition: transform 3s cubic-bezier(0.32, 0.95, 0.45, 1);
}

.reel-inner.spinning {
    transition: transform 0.5s linear;
}

.icon {
    font-size: 104px; /* 从80px增加到104px (80 * 1.3) */
    line-height: 130px; /* 从100px增加到130px */
    text-align: center;
}

/* 控制区域 */
.controls {
    margin-top: 30px;
}

.coin-balance {
    font-size: 1.5em;
    font-weight: bold;
    margin-bottom: 20px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
}

.spin-button {
    font-family: 'Roboto Condensed', sans-serif;
    background: linear-gradient(180deg, #d6c333, #c9cc23);
    color: white;
    border: 3px solid #f8f9fa;
    border-radius: 15px;
    padding: 15px 50px;
    font-size: 2em;
    cursor: pointer;
    box-shadow: 0 5px 0 #61570b, 0 10px 20px rgba(0,0,0,0.3);
    transition: all 0.1s ease-in-out;
    animation: buttonPulse 2s ease-in-out infinite;
}

/* 按钮脉冲动画 */
@keyframes buttonPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.spin-button:active {
    transform: translateY(5px);
    box-shadow: none;
}

.spin-button:disabled {
    background: #888;
    cursor: not-allowed;
    box-shadow: 0 5px 0 #444;
    animation: none;
}

/* 弹窗样式保持不变... */
.modal-overlay {
    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;
    opacity: 0; 
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal-overlay.visible { 
    opacity: 1; 
    visibility: visible; 
}

.modal-card {
    background: #fff; 
    color: var(--text-color);
    padding: 30px; 
    border-radius: 15px;
    width: 90%; 
    max-width: 450px;
    text-align: center; 
    box-shadow: var(--shadow), 0 0 30px rgba(255, 255, 255, 0.2);
    transform: scale(0.9); 
    transition: transform 0.4s ease;
}

.modal-overlay.visible .modal-card { 
    transform: scale(1); 
}

.modal-card h2 { 
    color: #d6336c; 
    margin-top: 0; 
}

.modal-card p { 
    font-size: 1.2em; 
}

.modal-button {
    background: #d6336c; 
    color: white;
    border: none; 
    border-radius: 8px;
    padding: 12px 25px; 
    font-size: 1em;
    cursor: pointer; 
    margin-top: 20px;
    transition: background 0.3s;
}

.modal-button:hover { 
    background: #a61e4d; 
}

/* 图片弹窗样式 */
.image-modal {
    max-width: 600px !important;
}

.image-container {
    margin: 20px 0;
    text-align: center;
}

.image-container img {
    max-width: 100%;
    max-height: 400px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.prize-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

.secondary-button {
    background: #28a745;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 25px;
    font-size: 1em;
    cursor: pointer;
    transition: background 0.3s;
}

.secondary-button:hover {
    background: #218838;
}

.recharge-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.recharge-option {
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.recharge-option:hover {
    background: #e9ecef;
    border-color: #d6336c;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.recharge-task {
    font-weight: bold;
    color: #d6336c;
    margin-bottom: 8px;
}

.recharge-reward {
    color: #28a745;
    font-size: 0.9em;
}

.recharge-difficulty {
    color: #6c757d;
    font-size: 0.8em;
    font-style: italic;
}

/* 奖品图标容器样式 */
.prize-icon-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
    padding: 20px;
    background: linear-gradient(145deg, #f0f0f0, #e0e0e0);
    border-radius: 15px;
    box-shadow: 
        inset 5px 5px 10px rgba(0,0,0,0.1),
        inset -5px -5px 10px rgba(255,255,255,0.8);
}

.prize-small-icon {
    width: 120px !important;
    height: 120px !important;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
}

.prize-small-icon:hover {
    transform: scale(1.05);
}

/* 增强奖品弹窗的样式 */
.modal-card {
    background: #fff; 
    color: var(--text-color);
    padding: 30px; 
    border-radius: 15px;
    width: 90%; 
    max-width: 500px; /* 稍微增大一点 */
    text-align: center; 
    box-shadow: var(--shadow), 0 0 30px rgba(255, 255, 255, 0.2);
    transform: scale(0.9); 
    transition: transform 0.4s ease;
}