/* === WRAPPER === */
.wc-wrapper {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  max-width: 780px;
  margin: 0 auto;
  padding: 0 16px;
  color: #1a1a2e;
}

/* === HEADER === */
.wc-header {
  text-align: center;
  margin-bottom: 24px;
}
.wc-title {
  font-size: 26px;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0 0 6px 0;
}
.wc-subtitle {
  font-size: 14px;
  color: #6b7280;
  margin: 0;
}

/* === STATS GRID === */
.wc-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
.wc-stat-card {
  background: linear-gradient(135deg, #f0f4ff 0%, #e8eeff 100%);
  border: 1px solid #d0d9f0;
  border-radius: 12px;
  padding: 16px 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.wc-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(66, 86, 153, 0.15);
}
.wc-stat-number {
  font-size: 24px;
  font-weight: 700;
  color: #3b5998;
  line-height: 1.2;
  transition: color 0.3s ease;
}
.wc-stat-label {
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* === TEXTAREA === */
.wc-textarea-wrapper {
  position: relative;
  margin-bottom: 16px;
}
#textInput {
  width: 100%;
  min-height: 200px;
  max-height: 500px;
  box-sizing: border-box;
  padding: 16px;
  padding-bottom: 36px;
  border: 2px solid #d0d9f0;
  border-radius: 12px;
  font-size: 15px;
  font-family: inherit;
  line-height: 1.7;
  color: #1a1a2e;
  background: #fafbff;
  resize: vertical;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  outline: none;
}
#textInput:focus {
  border-color: #3b5998;
  box-shadow: 0 0 0 3px rgba(59, 89, 152, 0.15);
  background: #fff;
}
#textInput::placeholder {
  color: #9ca3af;
}
.wc-textarea-hint {
  position: absolute;
  bottom: 10px;
  right: 16px;
  font-size: 11px;
  color: #9ca3af;
  pointer-events: none;
}

/* === BUTTONS === */
.wc-btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}
.wc-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  line-height: 1;
}
.wc-btn:active {
  transform: scale(0.97);
}
.wc-btn-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.wc-btn-primary {
  background: #3b5998;
  color: #fff;
}
.wc-btn-primary:hover {
  background: #2d4a7a;
  box-shadow: 0 2px 8px rgba(59, 89, 152, 0.3);
}
.wc-btn-secondary {
  background: #e8eeff;
  color: #3b5998;
}
.wc-btn-secondary:hover {
  background: #d0d9f0;
}
.wc-btn-danger {
  background: #fee2e2;
  color: #dc2626;
}
.wc-btn-danger:hover {
  background: #fecaca;
}

/* === KEYWORDS === */
.wc-keywords-section {
  margin-bottom: 24px;
}
.wc-keywords-title {
  font-size: 16px;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0 0 12px 0;
}
.wc-keywords-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.wc-keyword-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: linear-gradient(135deg, #eef1fb 0%, #e0e7fa 100%);
  border: 1px solid #c7d2f0;
  border-radius: 20px;
  font-size: 13px;
  color: #3b5998;
  font-weight: 500;
}
.wc-keyword-count {
  font-size: 11px;
  font-weight: 700;
  background: #3b5998;
  color: #fff;
  border-radius: 10px;
  padding: 1px 7px;
  min-width: 18px;
  text-align: center;
}

/* === TOAST === */
.wc-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1a1a2e;
  color: #fff;
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 9999;
  white-space: nowrap;
}
.wc-toast.wc-toast-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* === NUMBER ANIMATION === */
.wc-stat-number.wc-updated {
  color: #2563eb;
}

/* === RESPONSIVE === */
@media (max-width: 640px) {
  .wc-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .wc-stat-number {
    font-size: 20px;
  }
  .wc-stat-label {
    font-size: 10px;
  }
  .wc-btn-group {
    flex-direction: column;
  }
  .wc-btn {
    justify-content: center;
    width: 100%;
  }
  .wc-title {
    font-size: 22px;
  }
  #textInput {
    min-height: 160px;
    font-size: 14px;
  }
}
