* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #111827; /* สีพื้นหลังเข้มตามรูป */
  color: #f3f4f6;
  min-height: 85vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

.container {
  width: 100%;
  max-width: 440px;
  text-align: center; /* จัดทุกอย่างให้อยู่ตรงกลางเหมือนในภาพ */
}

.icon {
  font-size: 2.5rem;
  margin-bottom: 0.25rem;
}

h1 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: #ffffff;
}

.subtitle {
  color: #9ca3af;
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  text-align: left;
  font-size: 0.95rem;
  color: #d1d5db;
  margin-bottom: 0.5rem;
}

textarea {
  width: 100%;
  padding: 0.85rem;
  background-color: #1f2937; /* สีช่องข้อความ */
  border: 1px solid #374151;
  border-radius: 0.5rem;
  color: #ffffff;
  font-size: 0.95rem;
  outline: none;
  resize: vertical;
  transition: border-color 0.2s, box-shadow 0.2s;
  margin-bottom: 1rem;
}

textarea::placeholder {
  color: #6b7280;
}

textarea:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

button[type="submit"] {
  width: 100%;
  padding: 0.85rem;
  background-color: #6366f1; /* สีปุ่มม่วงอมฟ้าตามแบบ */
  color: #ffffff;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background-color 0.2s;
}

button[type="submit"]:hover {
  background-color: #4f46e5;
}

button[type="submit"]:disabled {
  background-color: #374151;
  cursor: not-allowed;
  color: #9ca3af;
}

.status-msg {
  margin-top: 1rem;
  font-size: 0.9rem;
  display: none;
}

.status-msg.success {
  color: #34d399;
  display: block;
}

.status-msg.error {
  color: #f87171;
  display: block;
}

/* ===== Angle Grinder (ลากได้ + physics) ===== */
#grinder {
  position: fixed;
  left: 0;
  top: 0;
  width: 280px;
  height: auto;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-drag: none;
  z-index: 10;
  will-change: transform;
  filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.5));
}
#grinder.dragging { cursor: grabbing; }

#sparks {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 11;
}

@media (max-width: 600px) {
  #grinder { width: 200px; }
}
