/**
 * 主样式文件 - 基础布局和颜色主题
 * 从 index.html 中提取的基础样式
 */

/* 基础布局和颜色主题 */
body {
    margin: 0;
    padding: 20px;
    font-family: Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    text-align: center;
}

h1 {
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.subtitle {
    margin-bottom: 30px;
    opacity: 0.9;
    font-size: 22px;
}

/* 游戏区域布局 */
.game-area {
    display: flex;
    justify-content: center;
    align-items: flex-start; /* 添加垂直对齐，防止元素被拉伸 */
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: nowrap; /* 允许在空间不足时换行 */
    min-height: 0; /* 防止flex子元素溢出 */
}

.canvas-container {
    position: relative;
    display: block; /* 改为block，避免inline-block的布局问题 */
    flex-shrink: 0; /* 防止被flex压缩 */
    flex-grow: 0; /* 防止被flex拉伸 */
}

.game-canvas {
    border: 3px solid #fff;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    background: #f0f8ff;
}

/* 信息面板基础样式 */
.info-panel {
    background: rgba(255,255,255,0.1);
    padding: 20px;
    border-radius: 10px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    min-width: 350px;
}

.info-panel h3 {
    color: white;
    font-size: 22px;
    font-weight: bold;
    margin: 0 0 15px 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

/* 状态显示样式 */
.status-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 8px;
    background: rgba(255,255,255,0.1);
    border-radius: 5px;
}

.status-label {
    font-weight: normal;
}

.status-value {
    color: #ffd700;
}

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

/* 版权信息 */
.copyright-info {
    margin-top: 20px;
    text-align: center;
    padding-top: 15px;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.copyright-info p {
    color: rgba(255,255,255,0.7);
    font-size: 18px;
    font-weight: normal;
    margin: 0;
    text-align: center;
}

/* 加载覆盖层 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    flex-direction: column;
}

.loading-spinner {
    border: 6px solid rgba(255,255,255,0.3);
    border-top: 6px solid #ffd700;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

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

/* 进度条容器 */
.loading-progress-container {
    width: 300px;
    margin: 20px 0;
    text-align: center;
}

.loading-progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255,255,255,0.2);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
}

.loading-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ffd700, #ffed4e, #ffd700);
    border-radius: 4px;
    width: 0%;
    transition: width 0.3s ease-in-out;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    animation: progressGlow 2s ease-in-out infinite;
}

@keyframes progressGlow {
    0%, 100% { box-shadow: 0 0 10px rgba(255, 215, 0, 0.5); }
    50% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.8); }
}

.loading-percentage {
    font-size: 18px;
    font-weight: bold;
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    margin-bottom: 15px;
}

/* 详细状态信息 */
.loading-details {
    text-align: center;
    max-width: 400px;
}

.loading-status {
    font-size: 20px;
    color: white;
    margin-bottom: 8px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.loading-details-text {
    font-size: 16px;
    color: rgba(255,255,255,0.8);
    margin-bottom: 8px;
    line-height: 1.4;
}

.loading-step {
    font-size: 14px;
    color: rgba(255,255,255,0.6);
    font-style: italic;
}
