* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: #f5f5f7;
  color: #1d1d1f;
}

.kanji-container {
  text-align: center;
  width: 100%;
  max-width: 600px;
  padding: 20px;
  margin: auto;
  flex-grow: 1; /* Centers the container vertically */
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.title {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.subtitle {
  font-size: 1rem;
  font-weight: 300;
  margin-bottom: 20px;
  color: #6e6e73;
}

.input-group {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 20px;
}

.input {
  font-size: 1.2rem;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 8px;
  outline: none;
  width: 100px;
  transition: border-color 0.3s;
}

.input:focus {
  border-color: #3a7bbb;
}

.button {
  font-size: 1rem;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  background-color: #3a7bbb;
  color: #fff;
  cursor: pointer;
  transition: background-color 0.3s;
}

.button:hover {
  background-color: #295b8d;
}

.canvas-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 20px;
}

.kanji-canvas {
  width: 400px;
  height: 400px;
  resize: both;
  overflow: hidden;
  border: 1px solid #ddd;
  border-radius: 8px;
  background-color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px;
  margin-bottom: 10px;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
}

.animate-button {
  width: 100%;
  max-width: 200px;
}

.kanji-canvas svg {
  width: 100%;
  height: 100%;
}

/* Footer Styles */
.footer {
  background-color: #f8f8f9;
  padding: 15px 40px;
  border-top: 1px solid #e0e0e0;
  font-size: 0.85rem;
  color: #555555;
  text-align: center;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-text {
  margin: 0;
  color: #555555;
}

.footer-links {
  display: flex;
  gap: 8px;
  font-size: 0.8rem;
  color: #a1a1a6;
}

.footer-links a {
  color: #a1a1a6;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: #0073e6;
}

.separator {
  color: #d1d1d6;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal.show {
  display: block;
  opacity: 1;
}

.modal.hide {
  opacity: 0;
}

.modal-content {
  background-color: #ffffff;
  margin: 5% auto;
  padding: 25px;
  border-radius: 8px;
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.2);
  position: relative;
  font-family: Arial, sans-serif;
  color: #5f5f5f; /* Lighter gray for main text */
  line-height: 1.6;
}

/* Close Button */
.close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 1.4rem;
  color: #888;
  cursor: pointer;
  transition: color 0.2s ease;
}

.close:hover {
  color: #555;
}

/* Text Styling */
.modal-content h2 {
  font-size: 1.1rem;
  margin-bottom: 12px;
  color: #646464;
  font-weight: bold;
  text-align: left;
}

.modal-content h3 {
  font-size: 0.95rem; /* Smaller numbered subheading */
  margin-top: 14px;
  margin-bottom: 8px;
  color: #7a7a7a; /* Softer, lighter gray for subheadings */
  font-weight: bold;
  text-align: left;
}

.modal-content p {
  font-size: 0.9rem;
  margin-bottom: 12px;
  color: #7a7a7a; /* Lighter gray for paragraph text */
}

.modal-content strong {
  color: #7a7a7a;
  font-weight: bold;
}

.modal-content ul {
  margin: 12px 0;
  padding-left: 20px;
  color: #7a7a7a;
}

.modal-content ul li {
  margin-bottom: 8px;
  font-size: 0.9rem;
}

/* Link Styling */
.modal-content a {
  color: #0073e6;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.modal-content a:hover {
  color: #005bb5;
}
