/* Hangul Stroke Animation Styles */

.stroke-animation-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  padding: 2rem;
  background: var(--bg-secondary, #f9f9f9);
  border-radius: 12px;
  margin-top: 1rem;
}

.stroke-svg {
  width: 100%;
  max-width: 300px;
  height: 300px;
  background: white;
  border: 2px solid var(--border-color, #e0e0e0);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.stroke-path {
  transition: stroke-dashoffset 0.8s ease-in-out, opacity 0.2s ease;
}

.stroke-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: center;
}

.stroke-controls button {
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 6px;
  background: var(--primary-color, #355588);
  color: white;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.stroke-controls button:hover {
  background: var(--primary-hover, #2a4470);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(53, 85, 136, 0.3);
}

.stroke-controls button:active {
  transform: translateY(0);
}

.stroke-speed-control {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: white;
  border: 1px solid var(--border-color, #e0e0e0);
  border-radius: 6px;
}

.stroke-speed-control label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary, #333);
}

.stroke-speed-control select {
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--border-color, #e0e0e0);
  border-radius: 4px;
  font-size: 0.9rem;
  background: white;
  cursor: pointer;
  outline: none;
}

.stroke-speed-control select:focus {
  border-color: var(--primary-color, #355588);
}

.stroke-info {
  display: flex;
  gap: 2rem;
  font-size: 0.95rem;
  color: var(--text-secondary, #666);
  padding: 0.8rem 1.5rem;
  background: white;
  border-radius: 6px;
  border: 1px solid var(--border-color, #e0e0e0);
}

.stroke-info span {
  font-weight: 500;
}

.stroke-info #current-stroke-num {
  color: var(--primary-color, #355588);
  font-weight: 700;
  font-size: 1.1rem;
}

/* Hangul Learning 수정 스타일 */
.hangul-stroke-toggle {
  margin-top: 1rem;
  text-align: center;
}

.btn-stroke-toggle {
  padding: 0.7rem 1.5rem;
  border: 2px solid var(--primary-color, #355588);
  border-radius: 8px;
  background: white;
  color: var(--primary-color, #355588);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-stroke-toggle:hover {
  background: var(--primary-color, #355588);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(53, 85, 136, 0.3);
}

.btn-stroke-toggle.active {
  background: var(--primary-color, #355588);
  color: white;
}

.stroke-section {
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Dark mode support */
[data-theme="dark"] .stroke-animation-wrapper {
  background: var(--bg-secondary-dark, #2a2a2a);
}

[data-theme="dark"] .stroke-svg {
  background: var(--bg-primary-dark, #1a1a1a);
  border-color: var(--border-color-dark, #444);
}

[data-theme="dark"] .stroke-speed-control,
[data-theme="dark"] .stroke-info {
  background: var(--bg-primary-dark, #1a1a1a);
  border-color: var(--border-color-dark, #444);
  color: var(--text-primary-dark, #e0e0e0);
}

[data-theme="dark"] .stroke-speed-control label {
  color: var(--text-primary-dark, #e0e0e0);
}

[data-theme="dark"] .stroke-speed-control select {
  background: var(--bg-secondary-dark, #2a2a2a);
  color: var(--text-primary-dark, #e0e0e0);
  border-color: var(--border-color-dark, #444);
}

[data-theme="dark"] .btn-stroke-toggle {
  background: var(--bg-primary-dark, #1a1a1a);
  border-color: var(--primary-color, #355588);
  color: var(--primary-color, #4a7bb7);
}

[data-theme="dark"] .btn-stroke-toggle:hover,
[data-theme="dark"] .btn-stroke-toggle.active {
  background: var(--primary-color, #355588);
  color: white;
}

/* Responsive */
@media (max-width: 768px) {
  .stroke-animation-wrapper {
    padding: 1rem;
  }

  .stroke-svg {
    max-width: 250px;
    height: 250px;
  }

  .stroke-controls {
    flex-direction: column;
    width: 100%;
  }

  .stroke-controls button {
    width: 100%;
    max-width: 250px;
  }

  .stroke-info {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
}
