* { box-sizing: border-box; }
body {
  margin: 0;
  padding: 0;
}
.page-wrapper {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  max-width: 900px; margin: 0 auto; padding: 20px;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  color: #333;
}
.tool-container {
  background: white; border-radius: 15px; padding: 30px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1); margin-bottom: 20px;
}
h1 { text-align: center; color: #ff0000; margin-bottom: 10px; font-size: 2.3em; }
.tool-description { text-align: center; color: #666; margin-bottom: 30px; font-style: italic; }
.input-group { margin-bottom: 20px; }
label { display: block; margin-bottom: 8px; font-weight: bold; color: #555; }
.input-field {
  width: 100%; padding: 15px; border: 2px solid #ddd; border-radius: 8px;
  font-size: 16px; transition: border-color 0.3s;
}
.input-field:focus { outline: none; border-color: #ff0000; box-shadow: 0 0 5px rgba(255,0,0,0.2); }
.extract-btn, .copy-btn ,.clear-btn {
  padding: 10px 15px; font-size: 15px; font-weight: bold;
  border: none; border-radius: 8px; cursor: pointer;
  justify-content: center;
  transition: 0.3s; display: inline-flex; align-items: center; gap: 8px;
  color: white;
}
.extract-btn {
  width: 100%; padding: 15px;
  background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
  font-size: 18px;
}
.copy-btn {
  background: linear-gradient(135deg, #2563eb, #9333ea);
  box-shadow: 0 3px 8px rgba(0,0,0,0.15);
}
.copy-btn:hover { transform: scale(1.05); background: linear-gradient(135deg, #1d4ed8, #7e22ce); }
.copy-btn.copied { background: #16a34a !important; }
.copy-btn i { font-size: 14px; }

.result-section { margin-top: 30px; padding: 20px; }
.result-box {
  background: white; padding: 15px 20px;
  border-radius: 10px; box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  margin-bottom: 20px;
}
.result-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px;
}
.result-header h3 { margin: 0; font-size: 1.1em; color: #ff0000; }
.result-content { color: #444; line-height: 1.5; white-space: pre-wrap; }
.result-content strong { font-weight: bold; color: #000; }
.keyword-list { list-style: none; padding: 0; }
.keyword-item {
  background: #f9fafb; margin: 8px 0; padding: 10px;
  border-radius: 6px; box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  display: flex; justify-content: space-between; align-items: center;
}
.keyword-word { font-weight: bold; color: #495057; }
.keyword-count { color: #6c757d; font-size: 0.9em; }

.error-msg {
  color: #dc3545; background: #f8d7da; border: 1px solid #f5c6cb;
  padding: 15px; border-radius: 8px; margin-top: 10px;
}
.loading { text-align: center; color: #007bff; font-style: italic; }

.how-to-use {
  background: #fff; padding: 25px; border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  margin-top: 40px;
}
.how-to-use h2 { color: #ff0000; font-size: 1.5em; margin-bottom: 15px; }
.how-to-use p { line-height: 1.6; color: #555; }
.read-more-btn {
  color: #2563eb; cursor: pointer; font-weight: bold;
  display: inline-block; margin-top: 8px;
}
.clear-btn {
  width: 100%; padding: 15px;
  background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
  font-size: 18px;
  margin-top: 10px;
}
.clear-btn:hover {
  background: linear-gradient(135deg, #4b5563 0%, #374151 100%);
  transform: scale(1.02);
}