.dialog-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.dialog-overlay.show {
  opacity: 1;
}

.dialog-box {
  position: relative;
  background: var(--bg-card);
  border: 0.5px solid var(--accent-purple);
  border-radius: var(--radius-md);
  box-shadow: var(--glow-purple);
  padding: 24px 18px;
  width: 90%;
  max-width: 320px;
  text-align: center;
  transform: scale(0.85);
  transition: transform 0.25s ease;
}

.dialog-close-icon {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-input);
  border: 0.5px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  z-index: 10;
}

.dialog-close-icon:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: var(--glow-orange);
}

.dialog-close-icon:active {
  transform: scale(0.9);
}

.dialog-overlay.show .dialog-box {
  transform: scale(1);
}

.dialog-mascot {
  width: 72px;
  height: 72px;
  object-fit: contain;
  margin: 0 auto 6px;
  display: block;
}

.dialog-title {
  font-family: 'VT323', 'Montserrat', sans-serif;
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: 1px;
  color: var(--accent);
  text-shadow: var(--glow-orange);
  margin-bottom: 8px;
}

.dialog-text {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.4;
}

.dialog-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-export {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: 38px;
  padding: 0 16px;
  background: var(--accent);
  color: var(--accent-dark);
  font-weight: 700;
  border-radius: 8px;
  font-size: 13px;
  box-shadow: var(--glow-orange);
}

.btn-export:disabled {
  opacity: 0.6;
  cursor: default;
}

.btn-close {
  height: 38px;
  background: transparent;
  border: 0.5px solid var(--border-color);
  color: var(--text-secondary);
  font-weight: 500;
  border-radius: 8px;
  font-size: 13px;
}

.btn-danger {
  width: 100%;
  height: 38px;
  background: var(--danger);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  border-radius: 8px;
  letter-spacing: 0.5px;
  box-shadow: 0 0 12px rgba(255, 56, 96, 0.4);
  transition: transform 0.15s ease;
}

.btn-danger:active {
  transform: scale(0.97);
}

.guide-box {
  max-width: 400px;
  max-height: 85vh;
  overflow-y: auto;
}

.guide-content {
  text-align: left;
  margin-bottom: 20px;
}

.guide-content h3 {
  font-family: 'VT323', 'Montserrat', sans-serif;
  font-size: 20px;
  letter-spacing: 1px;
  color: var(--accent-cyan);
  text-shadow: var(--glow-cyan);
  margin: 16px 0 8px;
}

.guide-content h3:first-child {
  margin-top: 0;
}

.guide-content ol {
  padding-left: 20px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.6;
}

.guide-content li {
  margin-bottom: 8px;
}

.guide-content strong {
  color: var(--text-primary);
}

.capture-card {
  position: fixed;
  top: -9999px;
  left: -9999px;
  width: 520px;
  background: var(--bg-main);
  color: var(--text-primary);
  padding: 40px;
  border: 3px solid var(--accent);
  border-radius: var(--radius-lg);
  box-shadow: 0 0 40px rgba(255, 122, 26, 0.25) inset;
  font-family: 'VT323', monospace;
}

.capture-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 2px solid var(--border-color);
}

.capture-logo {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  display: block;
  object-fit: contain;
}

.capture-title {
  color: var(--accent);
  font-weight: 400;
  font-size: 32px;
  line-height: 1.2;
  letter-spacing: 1px;
  text-shadow: var(--glow-orange);
}

.capture-competition {
  color: var(--accent-cyan);
  font-size: 20px;
  letter-spacing: 2px;
  margin-top: 2px;
}

.capture-subtitle {
  color: var(--text-secondary);
  font-size: 16px;
  margin-top: 8px;
}

.capture-info p {
  font-size: 18px;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.capture-keywords {
  display: flex;
  gap: 8px;
  margin: 16px 0;
  flex-wrap: wrap;
}

.capture-chip {
  background: var(--success-bg);
  color: var(--success);
  font-size: 14px;
  padding: 5px 12px;
  border-radius: 8px;
  letter-spacing: 0.5px;
}

.capture-grid {
  display: grid;
  grid-template-columns: repeat(var(--grid-size), 30px);
  gap: 3px;
  margin: 18px 0;
  justify-content: center;
}

.capture-cell {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-input);
  border-radius: 4px;
  font-size: 15px;
  color: var(--text-secondary);
}

.capture-cell.correct {
  background: var(--success-bg);
  color: var(--success);
  font-weight: 700;
}

.capture-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
  font-size: 13px;
  color: #777;
  border-top: 2px solid var(--border-color);
  padding-top: 14px;
}