/* Base Styles - Typography, Layout, Forms, Buttons */

@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,200..800;1,200..800&family=Source+Code+Pro:ital,wght@0,200..900;1,200..900&family=Syne:wght@400..800&display=swap");

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

body {
  background: #fafafa;
  color: #111;
  padding: 32px;
  max-width: 960px;
  margin: 0 auto;
  line-height: 1.6;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
}

h1 {
  font-size: 32px;
  margin-bottom: 32px;
  letter-spacing: -0.6px;
  color: #111;
  font-family: "Syne", sans-serif;
  font-optical-sizing: auto;
  font-weight: 700;
  font-style: normal;
}

.form-group {
  margin-bottom: 24px;
}

label.field-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #555;
}

input[type="text"],
textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #d1d5db;
  border-radius: 3px;
  font-size: 14px;
  background: white;
  transition: all 0.15s ease;
  color: #111;
  font-family: "Source Code Pro", monospace;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
}

input[type="text"]:focus,
textarea:focus {
  outline: none;
  border-color: #353635;
  box-shadow: 0 0 0 2px rgba(53, 54, 53, 0.15);
}

/* Better focus management for touch devices */
input[type="text"]:focus-visible,
textarea:focus-visible {
  outline: 2px solid #353635;
  outline-offset: 2px;
}

/* Remove tap highlight on all touch elements */
* {
  -webkit-tap-highlight-color: transparent;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

input[type="checkbox"] {
  margin-right: 8px;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 8px;
}

.checkbox-group label {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 14px;
}

.actions {
  margin: 40px 0;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

button {
  padding: 14px 24px;
  background: #111;
  color: white;
  border: 1px solid #111;
  border-radius: 3px;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  transition: all 0.15s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Touch feedback for all devices */
button:active {
  background: #222;
  transform: translateY(1px);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
}

/* Hover only for devices with hover capability */
@media (hover: hover) {
  button:hover {
    background: #353635;
    border-color: #353635;
    box-shadow: 0 2px 6px rgba(53, 54, 53, 0.2);
    transform: translateY(-1px);
  }
}

.output-section {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid #d1d5db;
}

.output-section h2 {
  font-size: 18px;
  margin-bottom: 16px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #111;
}

.prompt-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.token-info {
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 4px;
  border: 1px solid;
  font-family: "Source Code Pro", monospace;
  font-optical-sizing: auto;
  font-weight: 500;
  font-style: normal;
}

.token-info.initial {
  color: #666;
  background: #f8f9fa;
  border-color: #e9ecef;
}

.token-info.continuation {
  color: #166534;
  background: #dcfce7;
  border-color: #86efac;
}

.savings {
  color: #166534;
  font-weight: bold;
}

#generated-prompt,
#ai-response {
  width: 100%;
  min-height: 200px;
  padding: 16px;
  border: 1px solid #d1d5db;
  border-radius: 3px;
  font-size: 13px;
  background: white;
  margin-bottom: 12px;
  color: #111;
  line-height: 1.5;
  font-family: "Source Code Pro", monospace;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
}

#generated-prompt:focus,
#ai-response:focus {
  outline: none;
  border-color: #353635;
  box-shadow: 0 0 0 2px rgba(53, 54, 53, 0.15);
}

#status {
  margin-top: 48px;
  padding: 16px 20px;
  background: #111;
  color: white;
  font-size: 13px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-family: "Source Code Pro", monospace;
  font-optical-sizing: auto;
  font-weight: 500;
  font-style: normal;
}

.hidden {
  display: none;
}
