* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Courier New', Courier, monospace;
  background-color: #f5f0e6;
  color: #2b2b2b;
  line-height: 1.6;
  background-image: 
    radial-gradient(rgba(0,0,0,0.03) 1px, transparent 1px);
  background-size: 4px 4px;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 60px 40px;
}

.header {
  text-align: center;
  margin-bottom: 60px;
}

.header h1 {
  font-size: 2.5rem;
  font-weight: normal;
  letter-spacing: 0.3em;
  margin-bottom: 8px;
}

.subtitle {
  font-size: 0.85rem;
  color: #666;
  letter-spacing: 0.1em;
}

.input-section {
  max-width: 500px;
  margin: 0 auto 60px;
}

label {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 8px;
  letter-spacing: 0.05em;
}

textarea, input[type="text"] {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #ccc;
  background: rgba(255,255,255,0.5);
  font-family: inherit;
  font-size: 0.95rem;
  resize: vertical;
  margin-bottom: 20px;
  transition: border-color 0.2s;
}

textarea:focus, input[type="text"]:focus {
  outline: none;
  border-color: #8b5a2b;
}

.mode-select {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}

.radio-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  cursor: pointer;
}

.hidden {
  display: none;
}

.generate-btn {
  width: 100%;
  padding: 14px;
  background: #2b2b2b;
  color: #f5f0e6;
  border: none;
  font-family: inherit;
  font-size: 1rem;
  letter-spacing: 0.2em;
  cursor: pointer;
  transition: background 0.2s;
}

.generate-btn:hover {
  background: #444;
}

.generate-btn:disabled {
  background: #999;
  cursor: not-allowed;
}

.result-section {
  max-width: 600px;
  margin: 0 auto;
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.result-header h2 {
  font-weight: normal;
  font-size: 1.2rem;
  letter-spacing: 0.1em;
}

.text-btn {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 0.85rem;
  color: #8b5a2b;
  cursor: pointer;
  text-decoration: underline;
}

.image-container {
  text-align: center;
  margin-bottom: 30px;
}

.image-container img {
  max-width: 100%;
  height: auto;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  border: 1px solid #ddd;
}

.prompt-box {
  background: rgba(255,255,255,0.6);
  padding: 20px;
  border: 1px solid #ddd;
}

.prompt-box h3 {
  font-size: 0.9rem;
  font-weight: normal;
  margin-bottom: 10px;
  letter-spacing: 0.05em;
}

.prompt-box pre {
  font-family: inherit;
  font-size: 0.85rem;
  white-space: pre-wrap;
  color: #444;
  line-height: 1.7;
}

.footer {
  text-align: center;
  margin-top: 80px;
  font-size: 0.75rem;
  color: #999;
  letter-spacing: 0.1em;
}
