:root {
  color-scheme: dark;
  --bg: #07090c;
  --panel: #0f141b;
  --panel-2: #151b24;
  --line: #25303d;
  --text: #edf3fb;
  --muted: #91a0b2;
  --accent: #2f79ff;
  --accent-2: #00c08b;
  --danger: #ff4d63;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 20% 10%, rgba(47, 121, 255, 0.16), transparent 34%), var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
textarea {
  font: inherit;
}

.app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(340px, 42vw) minmax(0, 1fr);
}

.photo-panel,
.chat-panel {
  min-height: 100vh;
}

.photo-panel {
  border-right: 1px solid var(--line);
  padding: 28px;
  display: grid;
  grid-template-rows: auto auto minmax(260px, 1fr) auto;
  gap: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
}

.mark {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), #8e5cff);
  display: grid;
  place-items: center;
  font-weight: 900;
}

h1,
p {
  margin: 0;
}

h1 {
  font-size: 30px;
  letter-spacing: 0;
}

.brand p,
.chat-head span,
.dropzone small,
.message.assistant p {
  color: var(--muted);
}

.dropzone {
  min-height: 152px;
  border: 1px dashed #496075;
  border-radius: 10px;
  background: rgba(15, 20, 27, 0.84);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 7px;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.dropzone:hover,
.dropzone.dragging {
  border-color: var(--accent);
  background: rgba(47, 121, 255, 0.1);
  transform: translateY(-1px);
}

.dropzone input {
  display: none;
}

.upload-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--panel-2);
  display: grid;
  place-items: center;
  color: var(--accent-2);
  font-size: 30px;
  line-height: 1;
  font-weight: 300;
}

.preview-shell {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #090d12;
  min-height: 320px;
  display: grid;
  place-items: center;
  overflow: hidden;
  position: relative;
}

.preview-shell::before {
  content: "Yüklenen fotoğraf burada görünür";
  color: var(--muted);
  font-size: 14px;
}

.preview-shell.has-image::before {
  display: none;
}

.preview-shell img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: none;
}

.preview-shell.has-image img {
  display: block;
}

.photo-actions {
  display: flex;
  gap: 10px;
}

.photo-actions button,
.quick-prompts button,
.composer button {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
}

.photo-actions button {
  height: 42px;
  flex: 1;
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--line);
}

.photo-actions button:last-child {
  color: #ff9aa8;
}

.chat-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  background: rgba(10, 13, 18, 0.86);
}

.chat-head {
  min-height: 74px;
  border-bottom: 1px solid var(--line);
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.chat-head strong,
.chat-head span {
  display: block;
}

.chat-head strong {
  font-size: 18px;
}

.chat-head span {
  margin-top: 4px;
  font-size: 13px;
}

.model-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.messages {
  overflow: auto;
  padding: 22px;
  display: grid;
  align-content: start;
  gap: 14px;
}

.message {
  max-width: min(760px, 86%);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 13px 14px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.message.user {
  justify-self: end;
  background: var(--accent);
  border-color: transparent;
  color: white;
}

.message.assistant {
  justify-self: start;
  background: var(--panel);
}

.message.error {
  border-color: rgba(255, 77, 99, 0.55);
  color: #ff9aa8;
}

.quick-prompts {
  border-top: 1px solid var(--line);
  padding: 12px 18px 0;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.quick-prompts button {
  min-height: 34px;
  background: var(--panel-2);
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 0 11px;
}

.composer {
  padding: 14px 18px 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 10px;
}

textarea {
  width: 100%;
  resize: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--text);
  padding: 13px;
  min-height: 54px;
  outline: none;
}

textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(47, 121, 255, 0.18);
}

.composer button {
  background: var(--accent);
  color: white;
}

.composer button:disabled {
  opacity: 0.65;
  cursor: wait;
}

@media (max-width: 900px) {
  .app {
    grid-template-columns: 1fr;
  }

  .photo-panel,
  .chat-panel {
    min-height: auto;
  }

  .photo-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .composer {
    grid-template-columns: 1fr;
  }
}
