/* ============================================================
   POFUDUK - DeepSeek Tarzi Koyu Tema
   ============================================================ */

:root {
  --bg-primary: #1a1a1a;
  --bg-secondary: #232323;
  --bg-tertiary: #2a2a2a;
  --bg-hover: #333;
  --text-primary: #ececec;
  --text-secondary: #a0a0a0;
  --accent: #7c6fff;
  --accent-hover: #6b5eeb;
  --border: #333;
  --user-bubble: #2d2d2d;
  --radius: 12px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100dvh;
  min-height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.hidden {
  display: none !important;
}

/* ============================================================
   AUTH EKRANI
   ============================================================ */
.auth-screen {
  min-height: 100dvh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  padding: 24px 16px;
  overflow-y: auto;
}

.auth-card {
  background: var(--bg-secondary);
  border-radius: 20px;
  padding: 32px 28px;
  width: 100%;
  max-width: 380px;
  text-align: center;
  border: 1px solid var(--border);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  margin: auto;
}

.auth-logo {
  font-size: 44px;
  margin-bottom: 8px;
  line-height: 1;
}

.auth-card h1 {
  font-size: 24px;
  margin-bottom: 6px;
  font-weight: 700;
}

.auth-subtitle {
  color: var(--text-secondary);
  margin-bottom: 22px;
  font-size: 13px;
}

.auth-btn {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.2s;
  font-family: inherit;
  line-height: 1;
  min-height: 44px;
}

.google-btn {
  background: white;
  color: #333;
}

.google-btn:hover:not(:disabled) {
  background: #f0f0f0;
}

.google-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.auth-footer {
  margin-top: 16px;
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* ============================================================
   EMAIL/PASSWORD AUTH
   ============================================================ */
.email-auth-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.auth-input {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
  height: 44px;
}

.auth-input::placeholder {
  color: var(--text-secondary);
}

.auth-input:focus {
  border-color: var(--accent);
}

.primary-btn {
  background: var(--accent);
  color: white;
  font-weight: 600;
}

.primary-btn:hover:not(:disabled) {
  background: var(--accent-hover);
}

.primary-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  color: var(--text-secondary);
  font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-switch {
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-secondary);
  text-align: center;
}

.auth-switch a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  margin-left: 4px;
  cursor: pointer;
}

.auth-switch a:hover {
  text-decoration: underline;
}

.auth-error {
  background: rgba(255, 85, 85, 0.1);
  border: 1px solid rgba(255, 85, 85, 0.3);
  color: #ff7b7b;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  margin-top: 4px;
  text-align: left;
}

.auth-success {
  background: rgba(76, 175, 80, 0.1);
  border: 1px solid rgba(76, 175, 80, 0.3);
  color: #66bb6a;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  margin-top: 4px;
  text-align: left;
}

/* ============================================================
   ANA UYGULAMA
   ============================================================ */
.app {
  display: flex;
  height: 100dvh;
  max-height: 100dvh;
  width: 100%;
  overflow: hidden;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  width: 260px;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  height: 100dvh;
  overflow: hidden;
}

.sidebar-header {
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.logo-icon {
  font-size: 20px;
}

.logo-text {
  font-size: 16px;
}

.new-chat-btn {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.new-chat-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.new-chat-btn svg {
  width: 16px;
  height: 16px;
}

.chat-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  min-height: 0;
}

.chat-item {
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
  transition: all 0.15s;
  animation: slideIn 0.2s ease;
}

.chat-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.chat-item.active {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.chat-item-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  cursor: pointer;
}

.chat-item-delete {
  opacity: 0;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 2px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.chat-item:hover .chat-item-delete {
  opacity: 1;
}

.chat-item-delete:hover {
  color: #ff5555;
  background: rgba(255, 85, 85, 0.1);
}

.sidebar-footer {
  padding: 12px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  object-fit: cover;
}

.user-details {
  flex: 1;
  overflow: hidden;
  min-width: 0;
}

.user-name {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-email {
  font-size: 11px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.icon-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.icon-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.icon-btn svg {
  width: 16px;
  height: 16px;
}

/* ============================================================
   ANA ALAN
   ============================================================ */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
  min-height: 0;
  height: 100dvh;
  max-height: 100dvh;
}

.messages {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 32px 0;
  scroll-behavior: smooth;
  min-height: 0;
}

/* ============================================================
   HOS GELDIN EKRANI
   ============================================================ */
.welcome-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 40px 20px;
  text-align: center;
}

.welcome-logo {
  font-size: 64px;
  margin-bottom: 16px;
  line-height: 1;
}

.welcome-screen h2 {
  font-size: 24px;
  margin-bottom: 8px;
  font-weight: 600;
}

.welcome-screen p {
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  max-width: 600px;
}

.suggestion {
  padding: 10px 16px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-primary);
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
  transition: all 0.2s;
}

.suggestion:hover {
  border-color: var(--accent);
  background: var(--bg-hover);
}

/* ============================================================
   MESAJ BALONLARI
   ============================================================ */
.message {
  max-width: 800px;
  margin: 0 auto 24px;
  padding: 0 24px;
  display: flex;
  gap: 16px;
  animation: fadeIn 0.3s ease;
  width: 100%;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.message-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.message.user .message-avatar {
  background: var(--accent);
  color: white;
}

.message.assistant .message-avatar {
  background: var(--bg-tertiary);
}

.message-content {
  flex: 1;
  min-width: 0;
}

.message-role {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-secondary);
}

/* ============================================================
   MARKDOWN
   ============================================================ */
.message-content .markdown {
  color: var(--text-primary);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.message-content .markdown p {
  margin: 0 0 14px 0;
}

.message-content .markdown p:last-child {
  margin-bottom: 0;
}

.message-content .markdown h1,
.message-content .markdown h2,
.message-content .markdown h3,
.message-content .markdown h4 {
  margin: 20px 0 12px 0;
  font-weight: 600;
  line-height: 1.3;
}

.message-content .markdown h1 { font-size: 22px; }
.message-content .markdown h2 { font-size: 18px; }
.message-content .markdown h3 { font-size: 16px; }
.message-content .markdown h4 { font-size: 15px; }

.message-content .markdown h1:first-child,
.message-content .markdown h2:first-child,
.message-content .markdown h3:first-child {
  margin-top: 0;
}

.message-content .markdown ul,
.message-content .markdown ol {
  margin: 12px 0;
  padding-left: 24px;
}

.message-content .markdown li {
  margin-bottom: 6px;
}

.message-content .markdown strong {
  color: #fff;
  font-weight: 600;
}

.message-content .markdown em {
  font-style: italic;
}

.message-content .markdown code {
  background: var(--bg-tertiary);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 13px;
  color: #e8c07d;
}

.message-content .markdown pre {
  background: #0d1117;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  margin: 14px 0;
  overflow-x: auto;
  position: relative;
}

.message-content .markdown pre code {
  background: none;
  padding: 0;
  color: #e6edf3;
  font-size: 13.5px;
  line-height: 1.5;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
}

/* Kod Blok Basligi */
.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #161b22;
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 10px 10px 0 0;
  padding: 8px 14px;
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 14px;
  font-family: 'Consolas', 'Monaco', monospace;
}

.code-header + pre {
  margin-top: 0;
  border-radius: 0 0 10px 10px;
}

.copy-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: inherit;
  transition: all 0.15s;
}

.copy-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.copy-btn.copied {
  color: #4caf50;
}

/* Tablolar */
.message-content .markdown table {
  border-collapse: collapse;
  margin: 14px 0;
  font-size: 14px;
  min-width: 100%;
}

.message-content .markdown th,
.message-content .markdown td {
  border: 1px solid var(--border);
  padding: 8px 12px;
  text-align: left;
}

.message-content .markdown th {
  background: var(--bg-tertiary);
  font-weight: 600;
}

.message-content .markdown tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.02);
}

.table-wrapper {
  overflow-x: auto;
  margin: 14px 0;
  border-radius: 8px;
}

.table-wrapper table {
  margin: 0;
}

/* Blockquote */
.message-content .markdown blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 14px;
  margin: 14px 0;
  color: var(--text-secondary);
  font-style: italic;
}

/* Link */
.message-content .markdown a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s;
}

.message-content .markdown a:hover {
  border-bottom-color: var(--accent);
}

/* HR */
.message-content .markdown hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 20px 0;
}

/* Resim */
.message-content .markdown img {
  max-width: 100%;
  border-radius: 8px;
  margin: 8px 0;
}

/* ============================================================
   TYPING INDICATOR
   ============================================================ */
.typing {
  display: inline-flex;
  gap: 4px;
  padding: 8px 0;
}

.typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-secondary);
  animation: blink 1.4s infinite;
}

.typing span:nth-child(2) {
  animation-delay: 0.2s;
}

.typing span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes blink {
  0%, 60%, 100% {
    opacity: 0.3;
  }
  30% {
    opacity: 1;
  }
}

/* ============================================================
   INPUT ALANI
   ============================================================ */
.input-container {
  padding: 16px 24px 20px;
  padding-bottom: max(20px, env(safe-area-inset-bottom));
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
  flex-shrink: 0;
  background: var(--bg-primary);
}

.input-wrapper {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  transition: border-color 0.2s;
}

.input-wrapper:focus-within {
  border-color: var(--accent);
}

#messageInput {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 15px;
  resize: none;
  outline: none;
  max-height: 200px;
  padding: 6px 4px;
  line-height: 1.5;
  min-height: 24px;
}

#messageInput::placeholder {
  color: var(--text-secondary);
}

.mic-btn,
.send-btn,
.voice-mode-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

.mic-btn {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
}

.mic-btn:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.mic-btn.recording {
  background: #ff4757;
  color: white;
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.08);
  }
}

.send-btn {
  background: var(--accent);
  color: white;
}

.send-btn:hover:not(:disabled) {
  background: var(--accent-hover);
}

.send-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.mic-btn svg,
.send-btn svg,
.voice-mode-btn svg {
  width: 18px;
  height: 18px;
}

.input-footer {
  text-align: center;
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 8px;
}

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #444;
}

/* ============================================================
   ANIMASYONLAR
   ============================================================ */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ============================================================
   MOBIL HEADER (sadece mobile'da gorunur)
   ============================================================ */
.mobile-header {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.mobile-title {
  font-weight: 600;
  font-size: 15px;
}

.mobile-menu-btn {
  background: none;
  border: none;
  color: var(--text-primary);
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.mobile-menu-btn:active {
  background: var(--bg-hover);
}

/* Sidebar backdrop (mobile) */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 99;
  opacity: 0;
  transition: opacity 0.3s;
}

.sidebar-backdrop.visible {
  display: block;
  opacity: 1;
}

/* ============================================================
   SESLI SOHBET MODU BUTONU
   ============================================================ */
.voice-mode-btn {
  background: linear-gradient(135deg, #7c6fff, #9d5eff);
  color: white;
  position: relative;
}

.voice-mode-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 12px rgba(124, 111, 255, 0.5);
}

/* ============================================================
   SESLI SOHBET OVERLAY
   ============================================================ */
.voice-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.voice-modal {
  width: 100%;
  max-width: 480px;
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}

.voice-close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--text-primary);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.voice-close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Orb */
.voice-orb-container {
  margin: 40px 0 20px;
  position: relative;
  width: 180px;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.voice-orb {
  position: relative;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s ease;
}

.voice-core {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c6fff, #9d5eff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  box-shadow: 0 0 40px rgba(124, 111, 255, 0.5);
  z-index: 2;
  position: relative;
  transition: all 0.4s ease;
}

.voice-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(124, 111, 255, 0.5);
  opacity: 0;
}

.voice-orb.idle .voice-core {
  animation: voiceIdlePulse 3s ease-in-out infinite;
}

@keyframes voiceIdlePulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 40px rgba(124, 111, 255, 0.5); }
  50% { transform: scale(1.05); box-shadow: 0 0 60px rgba(124, 111, 255, 0.7); }
}

.voice-orb.listening .voice-core {
  background: linear-gradient(135deg, #ff4757, #ff6b81);
  animation: voiceListenPulse 1s ease-in-out infinite;
}

@keyframes voiceListenPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.voice-orb.listening .voice-ring {
  animation: voiceRipple 2s ease-out infinite;
}

.voice-orb.listening .voice-ring:nth-child(2) {
  animation-delay: 0.6s;
}

.voice-orb.listening .voice-ring:nth-child(3) {
  animation-delay: 1.2s;
}

@keyframes voiceRipple {
  0% {
    transform: scale(0.7);
    opacity: 0.7;
  }
  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}

.voice-orb.thinking .voice-core {
  background: linear-gradient(135deg, #f39c12, #f1c40f);
  animation: voiceThink 0.8s linear infinite;
}

@keyframes voiceThink {
  0%, 100% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(1.05); }
}

.voice-orb.speaking .voice-core {
  background: linear-gradient(135deg, #2ecc71, #27ae60);
  animation: voiceSpeak 0.5s ease-in-out infinite;
}

@keyframes voiceSpeak {
  0%, 100% { transform: scale(1); box-shadow: 0 0 40px rgba(46, 204, 113, 0.6); }
  50% { transform: scale(1.1); box-shadow: 0 0 70px rgba(46, 204, 113, 0.8); }
}

.voice-status {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 20px;
  min-height: 24px;
}

.voice-transcript {
  min-height: 60px;
  max-height: 120px;
  overflow-y: auto;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.5;
  padding: 0 20px;
  margin-bottom: 30px;
  font-style: italic;
}

.voice-transcript.live {
  color: var(--text-primary);
  font-style: normal;
}

.voice-action-btn {
  background: rgba(255, 71, 87, 0.9);
  color: white;
  border: none;
  padding: 14px 40px;
  border-radius: 30px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
  box-shadow: 0 4px 20px rgba(255, 71, 87, 0.4);
}

.voice-action-btn:hover {
  background: #ff4757;
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(255, 71, 87, 0.5);
}

/* ============================================================
   RESPONSIVE - TABLET
   ============================================================ */
@media (max-width: 1024px) {
  .sidebar {
    width: 240px;
  }
}

/* ============================================================
   RESPONSIVE - MOBILE (TEK BLOK)
   ============================================================ */
@media (max-width: 768px) {
  /* Sidebar drawer modu */
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 280px;
    max-width: 80vw;
    height: 100dvh;
    z-index: 100;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    box-shadow: none;
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.5);
  }

  /* Mobile header gorunur */
  .mobile-header {
    display: flex;
  }

  /* Main alan */
  .main {
    width: 100%;
    max-width: 100%;
  }

  /* Mesajlar */
  .messages {
    padding: 20px 0;
  }

  .message {
    padding: 0 14px;
    gap: 10px;
    margin-bottom: 18px;
  }

  .message-avatar {
    width: 28px;
    height: 28px;
    font-size: 14px;
  }

  .message-role {
    font-size: 12px;
  }

  .message-content .markdown h1 { font-size: 19px; }
  .message-content .markdown h2 { font-size: 17px; }
  .message-content .markdown h3 { font-size: 15px; }
  .message-content .markdown p { margin-bottom: 10px; }

  .message-content .markdown pre {
    padding: 12px;
    font-size: 12px;
    border-radius: 8px;
  }

  .message-content .markdown code {
    font-size: 12px;
  }

  /* Hos geldin ekrani */
  .welcome-screen {
    padding: 24px 16px;
  }

  .welcome-logo {
    font-size: 52px;
    margin-bottom: 12px;
  }

  .welcome-screen h2 {
    font-size: 20px;
  }

  .welcome-screen p {
    font-size: 14px;
    margin-bottom: 20px;
  }

  .suggestions {
    flex-direction: column;
    gap: 8px;
    width: 100%;
    max-width: 320px;
  }

  .suggestion {
    width: 100%;
    padding: 12px 16px;
    font-size: 13px;
  }

  /* Input alani */
  .input-container {
    padding: 10px 12px;
    padding-bottom: max(14px, env(safe-area-inset-bottom));
  }

  .input-wrapper {
    padding: 8px 10px;
    gap: 6px;
    border-radius: 12px;
  }

  #messageInput {
    font-size: 16px;
    padding: 8px 4px;
  }

  .mic-btn,
  .send-btn,
  .voice-mode-btn {
    width: 34px;
    height: 34px;
    border-radius: 9px;
  }

  .mic-btn svg,
  .send-btn svg,
  .voice-mode-btn svg {
    width: 16px;
    height: 16px;
  }

  .input-footer {
    font-size: 10px;
    margin-top: 6px;
  }

  /* Auth karti */
  .auth-card {
    padding: 28px 22px;
    max-width: 100%;
  }

  .auth-logo { font-size: 40px; }
  .auth-card h1 { font-size: 22px; }
  .auth-subtitle { font-size: 13px; margin-bottom: 20px; }

  .auth-input,
  .auth-btn {
    height: 44px;
    font-size: 14px;
  }

  /* Sesli sohbet overlay */
  .voice-orb-container {
    width: 150px;
    height: 150px;
    margin: 30px 0 15px;
  }

  .voice-core {
    width: 100px;
    height: 100px;
    font-size: 40px;
  }

  .voice-status {
    font-size: 16px;
  }

  .voice-transcript {
    font-size: 14px;
    padding: 0 12px;
    max-height: 100px;
  }

  .voice-action-btn {
    padding: 12px 32px;
    font-size: 14px;
  }
}

/* ============================================================
   KUCUK YUKSEKLIK (notebook, kisa ekranlar)
   ============================================================ */
@media (max-height: 700px) {
  .auth-card {
    padding: 24px 24px;
  }

  .auth-logo {
    font-size: 36px;
    margin-bottom: 4px;
  }

  .auth-card h1 {
    font-size: 20px;
    margin-bottom: 4px;
  }

  .auth-subtitle {
    margin-bottom: 16px;
    font-size: 12px;
  }

  .email-auth-form {
    gap: 8px;
    margin-bottom: 12px;
  }

  .auth-input,
  .auth-btn {
    height: 40px;
    padding: 10px 12px;
    font-size: 13px;
  }

  .auth-divider {
    margin: 12px 0;
  }

  .auth-switch {
    margin-top: 12px;
    font-size: 12px;
  }

  .auth-footer {
    margin-top: 10px;
    font-size: 10px;
  }
}

/* ============================================================
   KUCUK TELEFONLAR
   ============================================================ */
@media (max-width: 380px) {
  .message { padding: 0 10px; }
  .input-container { padding: 8px 10px 12px; }
  .welcome-logo { font-size: 44px; }
  .welcome-screen h2 { font-size: 18px; }
}