* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', 'Helvetica', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.main-container {
    width: 100%;
    max-width: 500px;
}

.main-content {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.title {
    text-align: center;
    color: #667eea;
    font-size: 28px;
    margin-bottom: 30px;
    animation: fadeIn 0.8s ease-in;
}

/* 老虎机区域 */
.slot-machine {
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 20px;
    margin: 40px 0;
}

.slot-item {
    flex: 1;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 15px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 3px solid transparent;
    position: relative;
    overflow: hidden;
}

.slot-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.slot-item:hover::before {
    opacity: 1;
}

.slot-icon {
    font-size: 48px;
    margin-bottom: 10px;
    animation: bounce 2s infinite;
}

.slot-name {
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

.slot-divider {
    font-size: 24px;
    font-weight: bold;
    color: #667eea;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

/* 高亮动画 */
.slot-item.highlight {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    border-color: #FF6B6B;
    transform: scale(1.1);
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.5);
    animation: pulse 0.5s ease-in-out;
}

.slot-item.highlight .slot-name {
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.slot-item.winner {
    background: linear-gradient(135deg, #FF6B9D 0%, #FF3366 100%);
    border-color: #FFD700;
    transform: scale(1.15);
    box-shadow: 0 15px 40px rgba(255, 51, 102, 0.6);
    animation: winnerPulse 0.8s ease-in-out infinite;
}

.slot-item.winner .slot-name {
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.slot-item.loser {
    opacity: 0.5;
    filter: grayscale(100%);
}

/* 输入区域 */
.input-area {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 30px 0;
}

#nameInput {
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    outline: none;
}

#nameInput:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.spin-btn {
    padding: 15px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.spin-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.4);
}

.spin-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.spin-btn:active:not(:disabled) {
    transform: translateY(0);
}

.btn-text {
    font-size: 18px;
}

.btn-icon {
    font-size: 24px;
}

/* 结果区域 */
.result-area {
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-radius: 15px;
    color: white;
    position: relative;
    overflow: hidden;
}


.result-card {
    position: relative;
    z-index: 1;
}

.result-label {
    font-size: 20px;
    margin-bottom: 15px;
    font-weight: bold;
}

.result-text {
    font-size: 16px;
    margin-bottom: 10px;
    opacity: 0.9;
}

.result-banquet {
    font-size: 28px;
    font-weight: bold;
    margin: 15px 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.result-message {
    font-size: 14px;
    margin-top: 20px;
    opacity: 0.8;
}

/* 彩蛋样式 */
.easter-egg {
    background: linear-gradient(135deg, #FFD700 0%, #FF6B9D 50%, #667EEA 100%) !important;
    animation: easterEggPulse 1s ease-in-out infinite;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.8), 0 0 60px rgba(255, 107, 157, 0.6);
}

.easter-egg-message {
    background: rgba(255, 255, 255, 0.95);
    color: #FF3366;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    animation: easterEggBounce 0.6s ease-in-out;
    box-shadow: 0 8px 16px rgba(255, 215, 0, 0.4);
    border: 3px solid #FFD700;
}

@keyframes easterEggPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 30px rgba(255, 215, 0, 0.8), 0 0 60px rgba(255, 107, 157, 0.6);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 0 40px rgba(255, 215, 0, 1), 0 0 80px rgba(255, 107, 157, 0.8);
    }
}

@keyframes easterEggBounce {
    0% {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.1) rotate(10deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

/* 记录区域 */
.records-section {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 15px;
}

.records-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.records-header h3 {
    color: #333;
    font-size: 20px;
}

.refresh-btn {
    background: transparent;
    color: #667eea;
    border: none;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    line-height: 1;
}

.refresh-btn:hover {
    color: #764ba2;
    transform: rotate(180deg);
}

.refresh-btn:active {
    transform: rotate(180deg) scale(0.9);
}

.records-list {
    max-height: 400px;
    overflow-y: auto;
}

.record-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: white;
    border-radius: 10px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
    animation: slideIn 0.5s ease-out;
}

.record-item:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.record-icon {
    font-size: 30px;
}

.record-info {
    flex: 1;
}

.record-name {
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.record-banquet {
    font-size: 14px;
    font-weight: 600;
}

.record-banquet.banquet-a {
    color: #FF6B9D;
}

.record-banquet.banquet-b {
    color: #667EEA;
}

.record-time {
    font-size: 12px;
    color: #999;
}

.loading-records,
.no-records,
.error-records {
    text-align: center;
    padding: 20px;
    color: #999;
}

/* Toast 提示 */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 15px 25px;
    border-radius: 10px;
    font-size: 14px;
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* 动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1.1);
    }
    50% {
        transform: scale(1.15);
    }
}

@keyframes winnerPulse {
    0%, 100% {
        transform: scale(1.15);
        box-shadow: 0 15px 40px rgba(255, 51, 102, 0.6);
    }
    50% {
        transform: scale(1.2);
        box-shadow: 0 20px 50px rgba(255, 215, 0, 0.8);
    }
}

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


/* 响应式设计 */
@media (max-width: 480px) {
    .main-content {
        padding: 20px;
    }
    
    .title {
        font-size: 24px;
    }
    
    .slot-machine {
        gap: 10px;
    }
    
    .slot-item {
        padding: 20px 10px;
    }
    
    .slot-icon {
        font-size: 36px;
    }
    
    .slot-name {
        font-size: 14px;
    }
    
    .slot-divider {
        font-size: 18px;
    }
}
