/**
 * 对话框样式文件 - 对话框和弹窗
 * 从 index.html 中提取的对话框样式
 */

/* 对话框基础样式 */
.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: 2000;
}

.dialog-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 30px;
    border-radius: 15px;
    border: 2px solid rgba(255,255,255,0.3);
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    min-width: 300px;
    text-align: center;
}

.dialog-content h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    font-size: 32px;
}

.dialog-body {
    margin-bottom: 20px;
}

.dialog-body label {
    display: block;
    margin-bottom: 10px;
    color: white;
    font-weight: bold;
}

.dialog-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.dialog-buttons .control-btn {
    min-width: 80px;
}

/* 胜利庆祝画面样式 */
.victory-content {
    min-width: 400px;
    text-align: center;
}

.victory-header {
    margin-bottom: 30px;
}

.victory-header h2 {
    font-size: 3.1em;
    margin: 0 0 15px 0;
    color: #ffd700;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.7);
    animation: victoryPulse 2s ease-in-out infinite;
}

.victory-header p {
    font-size: 1.6em;
    margin: 0;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.victory-stats {
    background: rgba(255,255,255,0.1);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 8px;
    background: rgba(255,255,255,0.1);
    border-radius: 5px;
}

.stat-label {
    font-weight: bold;
    color: white;
}

.stat-value {
    color: #ffd700;
    font-weight: bold;
}

.victory-btn {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    color: #333;
    font-weight: bold;
    font-size: 24px;
    padding: 12px 24px;
    border: none;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.victory-btn:hover {
    background: linear-gradient(45deg, #ffed4e, #ffd700);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.4);
}

@keyframes victoryPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* 信息对话框样式 */
.info-dialog {
    max-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.info-dialog .dialog-body {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 20px;
}

.info-dialog .dialog-buttons {
    flex-shrink: 0;
}

.tutorial-content,
.about-content,
.credits-content,
.license-content {
    line-height: 1.6;
    text-align: left !important;
}

.tutorial-content h4,
.about-content h4,
.credits-content h4,
.license-content h4 {
    color: #ffd700;
    margin: 20px 0 10px 0;
    font-size: 20px;
}

.tutorial-content ul,
.about-content ul,
.credits-content ul,
.license-content ul {
    margin: 10px 0;
    padding-left: 20px;
}

.tutorial-content li,
.about-content li,
.credits-content li,
.license-content li {
    margin: 5px 0;
}

/* 文档区域样式 */
.documentation-section {
    margin-top: 30px;
    background: rgba(255,255,255,0.1);
    border-radius: 15px;
    padding: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.documentation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(255,255,255,0.2);
}

.documentation-header h2 {
    margin: 0;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    font-size: 32px;
}

.documentation-content {
    background: rgba(255,255,255,0.95);
    border-radius: 10px;
    padding: 30px;
    color: #333;
    line-height: 1.6;
    max-height: 70vh;
    overflow-y: auto;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.1);
    text-align: left;
}

/* Markdown 内容样式 */
.documentation-content h1,
.documentation-content h2,
.documentation-content h3,
.documentation-content h4 {
    color: #667eea;
    margin-top: 25px;
    margin-bottom: 15px;
    text-shadow: none;
}

.documentation-content h1 {
    font-size: 32px;
    border-bottom: 3px solid #667eea;
    padding-bottom: 10px;
}

.documentation-content h2 {
    font-size: 32px;
    border-bottom: 2px solid #764ba2;
    padding-bottom: 8px;
}

.documentation-content h3 {
    font-size: 24px;
}

.documentation-content h4 {
    font-size: 22px;
    color: #764ba2;
}

.documentation-content p {
    margin-bottom: 15px;
    text-align: left;
}

.documentation-content ul,
.documentation-content ol {
    margin: 15px 0;
    padding-left: 25px;
}

.documentation-content li {
    margin: 8px 0;
}

.documentation-content strong {
    color: #667eea;
    font-weight: bold;
}

.documentation-content code {
    background: rgba(102, 126, 234, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: #667eea;
}

.documentation-content pre {
    background: rgba(0,0,0,0.1);
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 15px 0;
}

.documentation-content pre code {
    background: none;
    padding: 0;
    color: #333;
}

.documentation-content blockquote {
    border-left: 4px solid #667eea;
    margin: 20px 0;
    padding-left: 20px;
    color: #666;
    font-style: italic;
}

.documentation-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.documentation-content th,
.documentation-content td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
}

.documentation-content th {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    font-weight: bold;
}

.documentation-content hr {
    border: none;
    height: 2px;
    background: linear-gradient(90deg, transparent, #667eea, transparent);
    margin: 30px 0;
}

/* 滚动条样式 */
.documentation-content::-webkit-scrollbar {
    width: 8px;
}

.documentation-content::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.1);
    border-radius: 4px;
}

.documentation-content::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.6);
    border-radius: 4px;
}

.documentation-content::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 126, 234, 0.8);
}
