.mapart-container { max-width: 1200px; width: 100%; margin: 10px auto 20px auto; padding: 20px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 20px; align-items: stretch; overflow: hidden; box-sizing: border-box; min-height: 600px; }
.tips-container { max-width: 1200px; width: 100%; margin: 0 auto 40px auto; padding: 0 20px; }
.tips-card { padding: 25px 30px; }
.tips-card h3 { font-size: 1.2rem; margin: 0 0 15px 0; color: #2d1f0f; font-family: "JetBrains Mono", monospace; text-align: left; }
.tips-card h3 i { margin-right: 8px; color: #8b6a3e; }
.tips-card p { margin: 0 0 10px 0; color: #2d1f0f; line-height: 1.6; text-align: left; }
.tips-card p:last-child { margin-bottom: 0; }
.tips-card strong { color: #6b4423; font-weight: 700; }
.left-column { display: flex; flex-direction: column; gap: 20px; min-width: 0; max-width: 100%; width: 100%; height: 100%; }
.intro-card { padding: 30px; text-align: center; }
.intro-card h2 { font-size: 1.5rem; margin: 0; color: #2d1f0f; font-family: "JetBrains Mono", monospace; }
.controls-card { padding: 30px; min-width: 0; max-width: 100%; display: flex; flex-direction: column; height: 100%; overflow-y: auto; overflow-x: hidden; }
.form-group { margin-bottom: 20px; min-width: 0; max-width: 100%; overflow: hidden; }
.form-group:last-child { margin-bottom: 0; }
.tm-input-tan { width: 100%; min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm-file-wrapper { min-width: 0; max-width: 100%; overflow: hidden; }
.tm-file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }
.form-group label { display: block; margin-bottom: 8px; color: #2d1f0f; font-weight: 600; font-size: 0.9rem; text-align: left; }
.form-group label small { display: block; color: #8b6a3e; font-weight: normal; font-size: 0.8rem; margin-top: 3px; }
.map-width-control { display: flex; align-items: center; gap: 10px; }
.map-width-btn { width: 45px; height: 45px; background: linear-gradient(180deg, #c4ac84 0%, #a89968 100%); border: 2px solid #8b6a3e; border-bottom-width: 3px; border-radius: 4px; color: #2d1f0f; font-size: 1.3rem; font-weight: bold; cursor: pointer; transition: all 0.15s ease; box-shadow: 0 3px 0 #6b4423; image-rendering: pixelated; }
.map-width-btn:hover:not(:disabled) { background: linear-gradient(180deg, #d4bc94 0%, #b8a978 100%); transform: translateY(-1px); }
.map-width-btn:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 #6b4423; }
.map-width-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.map-width-display { flex: 1; text-align: center; font-size: 1.2rem; font-weight: 700; color: #2d1f0f; background: #f5ebd3; padding: 10px; border-radius: 4px; border: 2px solid #8b6a3e; font-family: "JetBrains Mono", monospace; }
.map-width-info { color: #8b6a3e; font-size: 0.85rem; margin-top: 8px; }
.player-info-box { display: flex; align-items: center; gap: 12px; padding: 12px 15px; background: #f5ebd3; border: 2px solid #8b6a3e; border-radius: 4px; }
.player-avatar { width: 48px; height: 48px; image-rendering: pixelated; border-radius: 2px; flex-shrink: 0; }
.player-details { flex: 1; min-width: 0; }
.player-username { font-size: 1rem; font-weight: 700; color: #2d1f0f; margin: 0 0 4px 0; font-family: "JetBrains Mono", monospace; }
.player-source { font-size: 0.75rem; color: #8b6a3e; margin: 0; }
.no-player-warning { padding: 15px; background: rgba(138, 58, 58, 0.15); border: 2px solid #8a3a3a; border-radius: 4px; color: #5a1a1a; font-size: 0.9rem; }
.no-player-warning i { margin-right: 8px; }
.no-player-warning a { color: #5a1a1a; text-decoration: underline; font-weight: 600; }
.tm-button-submit { width: 100%; padding: 15px; background: linear-gradient(180deg, #5fb878 0%, #4a9960 100%); border: 2px solid #2a6a3a; border-bottom-width: 3px; border-radius: 4px; color: #fff; font-size: 1rem; font-weight: 700; cursor: pointer; transition: all 0.15s ease; box-shadow: 0 3px 0 #1a5a2a; image-rendering: pixelated; font-family: "JetBrains Mono", monospace; margin-top: 20px; }
.tm-button-submit:hover:not(:disabled) { background: linear-gradient(180deg, #6fc888 0%, #5aa970 100%); transform: translateY(-1px); }
.tm-button-submit:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 #1a5a2a; }
.tm-button-submit:disabled { opacity: 0.6; cursor: not-allowed; }
.preview-card { padding: 20px; display: flex; flex-direction: column; justify-content: center; align-items: center; min-width: 0; max-width: 100%; height: 100%; overflow: hidden; }
#imagePreviewWrapper { width: 100%; flex: 1; display: flex; justify-content: center; align-items: center; overflow: hidden; min-height: 0; }
.preview-placeholder { text-align: center; color: #2d1f0f; opacity: 0.5; font-size: 1.2rem; }
.preview-placeholder i { font-size: 4rem; display: block; margin-bottom: 20px; opacity: 0.3; }
.image-preview { width: 100%; max-width: 100%; max-height: 100%; display: flex; justify-content: center; align-items: center; padding: 0; margin: 0; }
.image-preview canvas { width: 80% !important; height: auto !important; max-width: 100%; display: block; margin: 0 auto; border-radius: 4px; image-rendering: pixelated; image-rendering: -moz-crisp-edges; image-rendering: crisp-edges; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); }
.image-preview img { max-width: 100%; max-height: 100%; width: auto; height: auto; border-radius: 4px; image-rendering: pixelated; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); object-fit: contain; }
.preview-info { margin-top: 10px; font-size: 0.85rem; color: #2d1f0f; opacity: 0.7; }
.loading { display: none !important; text-align: center; padding: 20px; color: #2d1f0f; }
.loading i { font-size: 2rem; animation: spin 1s linear infinite; display: block; margin-bottom: 10px; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.result-box { margin-top: 20px; padding: 15px; border-radius: 4px; display: none; font-size: 0.95rem; }
.result-box.success { background: rgba(26, 90, 42, 0.15); border: 2px solid #2a6a3a; color: #1a5a2a; }
.result-box.error { background: rgba(138, 58, 58, 0.15); border: 2px solid #8a3a3a; color: #5a1a1a; }
.file-size-warning { color: #8a3a3a; padding: 10px; background: rgba(138, 58, 58, 0.1); border: 1px solid #8a3a3a; border-radius: 4px; margin-top: 10px; font-size: 0.85rem; }
#messageContainer { max-width: 1200px; width: 100%; margin: 0 auto; padding: 0 20px; box-sizing: border-box; }
.message { width: 100%; margin: 20px 0 10px 0; padding: 15px 20px; border-radius: 4px; display: flex; justify-content: space-between; align-items: center; font-size: 1rem; animation: slideDown 0.3s ease-out; box-sizing: border-box; }
.message.success { background: rgba(95, 184, 120, 0.8); border: 2px solid #2a6a3a; color: #1a5a2a; }
.message.error { background: rgba(184, 95, 95, 0.8); border: 2px solid #8a3a3a; color: #5a1a1a; }
.message .close-btn { background: none; border: none; color: inherit; cursor: pointer; font-size: 1.2rem; padding: 0; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; opacity: 0.7; transition: opacity 0.2s; }
.message .close-btn:hover { opacity: 1; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 1024px) { .mapart-container { grid-template-columns: 1fr; } .preview-card { min-height: 400px; } }

.previous-maparts-container { max-width: 1200px; width: 100%; margin: 0 auto 40px auto; padding: 0 20px; }
.previous-maparts-title { font-size: 1.2rem; margin: 0 0 20px 0; color: #2d1f0f; font-family: "JetBrains Mono", monospace; text-align: left; }
.previous-maparts-title i { margin-right: 8px; color: #6ba89d; }

.maparts-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; }
.mapart-card { background: linear-gradient(180deg, #87ceeb 0%, #6ba89d 100%); border: 2px solid #4a7c8c; border-bottom-width: 3px; border-radius: 4px; padding: 12px; display: flex; flex-direction: column; gap: 10px; transition: transform 0.2s, box-shadow 0.2s; box-shadow: 0 3px 0 #2a5c6c; }
.mapart-card:hover { transform: translateY(-2px); box-shadow: 0 5px 8px rgba(0, 0, 0, 0.15); }

.mapart-preview { width: 100%; aspect-ratio: 1; background: transparent; border: 2px solid #4a7c8c; border-radius: 2px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.mapart-preview img { width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }

.mapart-info { display: flex; flex-direction: column; gap: 5px; }
.mapart-title { font-size: 0.85rem; font-weight: 600; color: #1a3a4a; font-family: "JetBrains Mono", monospace; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 1.2em; }
.mapart-meta { font-size: 0.7rem; color: #2a5c6c; display: flex; align-items: center; gap: 5px; }
.mapart-meta i { font-size: 0.65rem; }

.mapart-recreate-btn { width: 100%; padding: 8px; background: linear-gradient(180deg, #4a7c8c 0%, #2a5c6c 100%); border: 2px solid #1a3a4a; border-bottom-width: 3px; border-radius: 4px; color: #fff; font-size: 0.8rem; font-weight: 700; cursor: pointer; transition: all 0.15s ease; box-shadow: 0 2px 0 #0a2a3a; font-family: "JetBrains Mono", monospace; }
.mapart-recreate-btn:hover { background: linear-gradient(180deg, #5a8c9c 0%, #3a6c7c 100%); transform: translateY(-1px); }
.mapart-recreate-btn:active { transform: translateY(1px); box-shadow: 0 1px 0 #0a2a3a; }
.mapart-recreate-btn i { margin-right: 5px; }

.maparts-loading { text-align: center; padding: 20px; color: #8b6a3e; font-size: 0.9rem; }
.maparts-loading i { font-size: 1.5rem; margin-bottom: 8px; display: block; animation: spin 1s linear infinite; }

.maparts-empty { text-align: center; padding: 40px 20px; color: #2d1f0f; opacity: 0.5; }
.maparts-empty i { font-size: 3rem; display: block; margin-bottom: 15px; opacity: 0.3; }
.maparts-empty p { margin: 0; font-size: 0.95rem; }

@media (max-width: 1024px) { .maparts-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px) { .maparts-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .maparts-grid { grid-template-columns: 1fr; } }

.mapart-actions { display: flex; gap: 8px; }

.tm-button-green { flex: 1; padding: 8px 12px; background: linear-gradient(180deg, #5fb878 0%, #4a9960 100%); border: 2px solid #2a6a3a; border-bottom-width: 3px; border-radius: 4px; color: #fff; font-size: 0.8rem; font-weight: 700; cursor: pointer; transition: all 0.15s ease; box-shadow: 0 2px 0 #1a5a2a; font-family: "JetBrains Mono", monospace; }
.tm-button-green:hover { background: linear-gradient(180deg, #6fc888 0%, #5aa970 100%); transform: translateY(-1px); }
.tm-button-green:active { transform: translateY(1px); box-shadow: 0 1px 0 #1a5a2a; }
.tm-button-green i { margin-right: 5px; }

.tm-button-delete { padding: 8px 12px; background: linear-gradient(180deg, #d64545 0%, #b83838 100%); border: 2px solid #8a3a3a; border-bottom-width: 3px; border-radius: 4px; color: #fff; font-size: 0.9rem; font-weight: 700; cursor: pointer; transition: all 0.15s ease; box-shadow: 0 2px 0 #6a2a2a; font-family: "JetBrains Mono", monospace; }
.tm-button-delete:hover { background: linear-gradient(180deg, #e65555 0%, #c84848 100%); transform: translateY(-1px); }
.tm-button-delete:active { transform: translateY(1px); box-shadow: 0 1px 0 #6a2a2a; }

.modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.6); display: flex; align-items: center; justify-content: center; z-index: 9999; animation: fadeIn 0.2s ease-out; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-content { background: linear-gradient(180deg, #e8d4a8 0%, #d4c094 100%); border: 3px solid #8b6a3e; border-bottom-width: 4px; border-radius: 6px; padding: 30px; max-width: 450px; width: 90%; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); animation: slideUp 0.3s ease-out; }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.modal-content h3 { margin: 0 0 15px 0; font-size: 1.3rem; color: #2d1f0f; font-family: "JetBrains Mono", monospace; text-align: center; }
.modal-content p { margin: 0 0 25px 0; color: #2d1f0f; font-size: 0.95rem; text-align: center; line-height: 1.5; }
.modal-note { font-size: 0.8rem !important; color: #6b4423 !important; margin-bottom: 20px !important; font-style: italic; }
.modal-note i { margin-right: 5px; font-size: 0.75rem; }

.modal-actions { display: flex; gap: 12px; justify-content: center; }

.tm-button-secondary { padding: 12px 24px; background: linear-gradient(180deg, #c4ac84 0%, #a89968 100%); border: 2px solid #8b6a3e; border-bottom-width: 3px; border-radius: 4px; color: #2d1f0f; font-size: 0.9rem; font-weight: 700; cursor: pointer; transition: all 0.15s ease; box-shadow: 0 3px 0 #6b4423; font-family: "JetBrains Mono", monospace; }
.tm-button-secondary:hover { background: linear-gradient(180deg, #d4bc94 0%, #b8a978 100%); transform: translateY(-1px); }
.tm-button-secondary:active { transform: translateY(2px); box-shadow: 0 1px 0 #6b4423; }

.tm-button-danger { padding: 12px 24px; background: linear-gradient(180deg, #d64545 0%, #b83838 100%); border: 2px solid #8a3a3a; border-bottom-width: 3px; border-radius: 4px; color: #fff; font-size: 0.9rem; font-weight: 700; cursor: pointer; transition: all 0.15s ease; box-shadow: 0 3px 0 #6a2a2a; font-family: "JetBrains Mono", monospace; }
.tm-button-danger:hover { background: linear-gradient(180deg, #e65555 0%, #c84848 100%); transform: translateY(-1px); }
.tm-button-danger:active { transform: translateY(2px); box-shadow: 0 1px 0 #6a2a2a; }
