* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --accent-color: #f093fb;
    --success-color: #4CAF50;
    --warning-color: #ff9800;
    --text-color: #2d3748;
    --text-light: #718096;
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --card-bg: #ffffff;
    --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 10px 30px rgba(0,0,0,0.2);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    color: var(--text-color);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* 星空背景 */
.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.stars::before,
.stars::after {
    content: '';
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    box-shadow: 
        100px 100px white,
        200px 200px white,
        300px 150px white,
        400px 250px white,
        500px 180px white,
        600px 280px white,
        700px 120px white,
        800px 220px white,
        900px 160px white,
        1000px 260px white,
        1100px 140px white,
        1200px 240px white,
        150px 350px white,
        250px 450px white,
        350px 400px white,
        450px 500px white,
        550px 380px white,
        650px 480px white,
        750px 320px white,
        850px 420px white;
    animation: twinkle 3s infinite;
}

.stars::after {
    animation-delay: 1.5s;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

.menu-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
    z-index: 1;
}

/* ===== 头部样式 ===== */
.menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 50px;
    background: rgba(255, 255, 255, 0.95);
    padding: 30px 40px;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
    animation: slideDown 0.6s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo-icon {
    font-size: 64px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.logo-text h1 {
    font-size: 42px;
    background: var(--bg-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 5px;
}

.subtitle {
    color: var(--text-light);
    font-size: 16px;
}

.header-stats {
    display: flex;
    gap: 15px;
}

.stat-badge {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: bold;
    box-shadow: var(--shadow-md);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.badge-icon {
    font-size: 20px;
}

/* ===== 游戏卡片网格 ===== */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.game-card {
    background: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    position: relative;
    animation: fadeInUp 0.6s ease-out backwards;
}

.game-card:nth-child(1) { animation-delay: 0.1s; }
.game-card:nth-child(2) { animation-delay: 0.2s; }
.game-card:nth-child(3) { animation-delay: 0.3s; }
.game-card:nth-child(4) { animation-delay: 0.4s; }

@keyframes fadeInUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.game-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.game-card.available {
    border: 2px solid transparent;
    background: linear-gradient(white, white) padding-box,
                linear-gradient(135deg, #667eea, #764ba2) border-box;
}

.game-card.available:hover .card-glow {
    opacity: 1;
}

.card-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.3), transparent 70%);
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
    animation: rotate 10s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.game-card.coming-soon {
    opacity: 0.9;
}

.card-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: bold;
    z-index: 2;
    box-shadow: var(--shadow-sm);
}

.available-badge {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    animation: tada 2s infinite;
}

@keyframes tada {
    0%, 100% { transform: scale(1) rotate(0deg); }
    10%, 20% { transform: scale(0.9) rotate(-3deg); }
    30%, 50%, 70%, 90% { transform: scale(1.1) rotate(3deg); }
    40%, 60%, 80% { transform: scale(1.1) rotate(-3deg); }
}

.soon-badge {
    background: linear-gradient(135deg, #ff9800, #f57c00);
    color: white;
}

.card-header {
    padding: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.game-icon {
    font-size: 72px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
}

.game-status {
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    padding: 8px 16px;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.status-dot.active {
    background: #4CAF50;
    box-shadow: 0 0 10px #4CAF50;
    animation: blink 2s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.status-dot.pending {
    background: #ff9800;
}

.status-text {
    font-size: 13px;
    font-weight: bold;
    color: var(--text-color);
}

.card-body {
    padding: 30px;
}

.game-title {
    font-size: 28px;
    color: var(--text-color);
    margin-bottom: 15px;
    background: var(--bg-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.game-description {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 15px;
}

.game-features {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.feature-tag {
    background: linear-gradient(135deg, #e0e7ff, #f3e8ff);
    color: var(--text-color);
    padding: 6px 14px;
    border-radius: 15px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.game-stats {
    display: flex;
    gap: 20px;
    padding: 15px;
    background: #f8fafc;
    border-radius: 12px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.stat-item .stat-icon {
    font-size: 20px;
}

.stat-item .stat-value {
    font-weight: bold;
    color: var(--text-color);
    font-size: 14px;
}

/* 进度信息 */
.progress-info {
    margin-top: 20px;
    padding: 15px;
    background: #f8fafc;
    border-radius: 12px;
}

.progress-label {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 8px;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 6px;
    transition: width 1s ease-out;
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { background-position: -100px; }
    100% { background-position: 100px; }
}

.progress-text {
    font-size: 13px;
    font-weight: bold;
    color: var(--text-color);
    text-align: right;
}

.card-footer {
    padding: 0 30px 30px;
}

.play-btn {
    width: 100%;
    padding: 18px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.play-btn:not(.disabled) {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: var(--shadow-md);
}

.play-btn:not(.disabled):hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.play-btn:not(.disabled):hover .btn-arrow {
    transform: translateX(5px);
}

.play-btn.disabled {
    background: #e2e8f0;
    color: #a0aec0;
    cursor: not-allowed;
}

.btn-icon {
    font-size: 20px;
}

.btn-arrow {
    transition: transform 0.3s;
    font-size: 18px;
}

/* ===== 底部信息 ===== */
.menu-footer {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
    animation: fadeIn 1s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h3 {
    color: var(--text-color);
    margin-bottom: 15px;
    font-size: 18px;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    color: var(--text-light);
    padding: 8px 0;
    font-size: 14px;
    line-height: 1.6;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 2px solid #e2e8f0;
}

.footer-bottom p {
    color: var(--text-light);
    font-size: 14px;
}

/* ===== 通知系统 ===== */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    max-width: 350px;
}

.notification {
    background: white;
    padding: 18px 24px;
    margin-bottom: 12px;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    animation: slideInRight 0.4s ease-out;
    border-left: 5px solid #667eea;
    font-size: 14px;
}

.notification.success {
    border-left-color: #4CAF50;
}

.notification.warning {
    border-left-color: #ff9800;
}

.notification.error {
    border-left-color: #f44336;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ===== 响应式设计 ===== */
@media (max-width: 1024px) {
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .menu-container {
        padding: 20px 10px;
    }
    
    .menu-header {
        flex-direction: column;
        gap: 20px;
        padding: 20px;
    }
    
    .logo-text h1 {
        font-size: 32px;
    }
    
    .logo-icon {
        font-size: 48px;
    }
    
    .header-stats {
        width: 100%;
        justify-content: center;
    }
    
    .games-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 480px) {
    .game-icon {
        font-size: 56px;
    }
    
    .game-title {
        font-size: 24px;
    }
    
    .card-header {
        padding: 20px;
    }
    
    .card-body {
        padding: 20px;
    }
    
    .card-footer {
        padding: 0 20px 20px;
    }
}

/* ===== 滚动条美化 ===== */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2, #667eea);
}