/* ==================== Dashboard 样式 ==================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: white;
}

.dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* ==================== 顶部导航栏 ==================== */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    margin-bottom: 30px;
}

.logo-section .world-logo,
.logo h1 {
    font-size: 2rem;
    margin-bottom: 5px;
}

.logo-section .world-tagline,
.logo .subtitle {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Header actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* 语言切换按钮 */
.lang-switch-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.95rem;
}

.lang-switch-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.server-switch-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
}

.server-switch-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* 用户区域 */
.user-area {
    display: flex;
    align-items: center;
    gap: 15px;
}

.guest-actions {
    display: flex;
    gap: 10px;
}

.btn-login,
.btn-register,
.auth-btn {
    padding: 10px 25px;
    border: none;
    border-radius: 20px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-login,
.login-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.btn-login:hover,
.login-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.btn-register,
.register-btn {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(245, 87, 108, 0.4);
}

.btn-register:hover,
.register-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 87, 108, 0.6);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    font-size: 2rem;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: bold;
    font-size: 1.1rem;
}

.user-meta {
    display: flex;
    gap: 10px;
    margin-top: 3px;
}

.user-level {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: bold;
}

.user-coins {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #333;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: bold;
}

.btn-logout {
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    color: white;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.3s;
}

.btn-logout:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* ==================== 主要内容区 ==================== */
.dashboard-main {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* 欢迎区 */
.welcome-section,
.welcome-banner {
    text-align: center;
    padding: 40px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.welcome-section h2,
.welcome-banner h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.welcome-section p,
.welcome-banner p,
.welcome-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* 游戏区 */
.games-section h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    padding-left: 10px;
}

.game-cards,
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
}

.game-card {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 30px;
    backdrop-filter: blur(10px);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.game-card.featured {
    border: 2px solid rgba(255, 215, 0, 0.5);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.2);
}

.game-card.coming-soon {
    opacity: 0.7;
}

.game-card-disabled {
    opacity: 0.6;
}

.game-card-disabled:hover {
    transform: none;
}

.game-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8e53 100%);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
    box-shadow: 0 2px 10px rgba(255, 107, 107, 0.4);
}

.game-badge.coming-soon-badge {
    background: linear-gradient(135deg, #95e1d3 0%, #38ada9 100%);
}

.game-icon {
    font-size: 4rem;
    text-align: center;
    margin: 10px 0;
}

.game-title {
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 10px;
    font-weight: bold;
}

.game-description {
    text-align: center;
    opacity: 0.9;
    line-height: 1.6;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.game-stats {
    display: flex;
    justify-content: space-around;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    font-size: 0.9rem;
}

.game-stats span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.game-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: auto;
}

.play-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.play-btn.primary {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.play-btn.secondary {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: white;
}

.play-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.play-btn:disabled,
.play-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: rgba(255, 255, 255, 0.2);
    box-shadow: none;
}

.game-info {
    text-align: center;
}

.game-info h4 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.game-desc {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 10px;
}

.game-status {
    font-size: 0.9rem;
    font-weight: bold;
}

/* 功能区 */
.features-section h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    padding-left: 10px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.feature-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s;
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-3px);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.feature-item h4 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.feature-item p {
    font-size: 0.95rem;
    opacity: 0.9;
}

/* 提示区 */
.tips-section {
    margin-bottom: 20px;
}

.tip-box {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px 25px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 15px;
    border-left: 5px solid #ffd700;
}

.tip-icon {
    font-size: 2rem;
}

.tip-content {
    flex: 1;
    font-size: 1rem;
}

.tip-content a {
    color: #ffd700;
    text-decoration: none;
    font-weight: bold;
}

.tip-content a:hover {
    text-decoration: underline;
}

/* 用户统计面板 */
.user-stats-section {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 30px;
    backdrop-filter: blur(10px);
}

.user-stats-section h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    text-align: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 15px;
    transition: all 0.3s;
}

.stat-card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.stat-icon {
    font-size: 2.5rem;
}

.stat-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
}

/* 用户统计样式（兼容旧HTML） */
.user-stats {
    display: flex;
    gap: 10px;
}

/* 页脚 */
.dashboard-footer {
    text-align: center;
    padding: 30px 20px;
    margin-top: 30px;
    opacity: 0.8;
    font-size: 0.9rem;
}

.footer-links {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-links a {
    color: white;
    text-decoration: none;
    transition: all 0.3s;
}

.footer-links a:hover {
    text-decoration: underline;
    opacity: 1;
}

/* ==================== 认证对话框 ==================== */
/* 复用之前的认证对话框样式 */
.auth-dialog-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;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.auth-dialog {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    animation: authDialogSlideIn 0.3s ease-out;
}

@keyframes authDialogSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.auth-dialog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background: rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.auth-dialog-header h2 {
    font-size: 1.5rem;
    color: white;
    margin: 0;
}

.auth-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.8rem;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s;
    line-height: 1;
}

.auth-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.auth-dialog-body {
    padding: 30px 25px;
    background: white;
}

.auth-form {
    color: #333;
}

.auth-branding {
    text-align: center;
    margin-bottom: 25px;
}

.auth-logo {
    font-size: 3rem;
    display: block;
    margin-bottom: 10px;
}

.auth-welcome {
    font-size: 1.1rem;
    color: #667eea;
    font-weight: bold;
}

.auth-input-group {
    margin-bottom: 20px;
}

.auth-input-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
    font-size: 0.95rem;
}

.auth-input-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s;
    background: #f9f9f9;
}

.auth-input-group input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.auth-input-group small {
    display: block;
    margin-top: 5px;
    color: #999;
    font-size: 0.85rem;
}

.auth-remember {
    margin-bottom: 20px;
}

.auth-remember label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: #666;
    font-size: 0.9rem;
}

.auth-remember input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.auth-submit-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.auth-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.auth-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.auth-switch {
    text-align: center;
    margin-top: 20px;
    color: #666;
    font-size: 0.95rem;
}

.auth-switch a {
    color: #667eea;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s;
}

.auth-switch a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.auth-error {
    margin-top: 15px;
    padding: 12px 15px;
    background: #fee;
    border: 1px solid #fcc;
    border-radius: 8px;
    color: #c33;
    font-size: 0.9rem;
    text-align: center;
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .welcome-section h2 {
        font-size: 2rem;
    }
    
    .game-cards {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
}
