@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&display=swap');

:root {
  --bg: #f8f9fa;
  --surface: #ffffff;
  --text-main: #202124;
  --text-muted: #5f6368;
  --primary: #1a73e8;
  --primary-hover: #1557b0;
  --border: #dadce0;
  --focus: rgba(26,115,232,0.3);
  --shadow: 0 1px 3px rgba(0,0,0,0.1);
  --danger: #d93025;
}

body.dark-mode {
  --bg: #202124;
  --surface: #292a2d;
  --text-main: #e8eaed;
  --text-muted: #9aa0a6;
  --primary: #8ab4f8;
  --primary-hover: #aecbfa;
  --border: #5f6368;
  --focus: rgba(138,180,248,0.3);
  --shadow: 0 1px 3px rgba(0,0,0,0.5);
}

* { box-sizing: border-box; font-family: 'Manrope', sans-serif; }
body { margin: 0; background: var(--bg); color: var(--text-main); transition: 0.3s; }

/* Navbar */
.navbar { display: flex; justify-content: space-between; align-items: center; padding: 12px 24px; background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; color: var(--primary); }
.nav-actions { display: flex; gap: 10px; }

/* Butonlar */
button { cursor: pointer; border: none; background: transparent; transition: 0.2s; color: var(--text-main); }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; padding: 8px; border-radius: 50%; }
.icon-btn:hover { background: var(--bg); }
.icon-btn.small { padding: 6px; }
.primary-text { color: var(--primary); font-weight: 600; gap: 6px; border-radius: 8px; padding: 6px 12px; }
.primary-text:hover { background: rgba(26,115,232,0.1); }
.outline-btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border: 1px solid var(--border); border-radius: 8px; font-weight: 600; color: var(--text-main); }
.outline-btn:hover { background: var(--bg); border-color: var(--primary); }
.text-danger { color: var(--danger) !important; }

/* Çeviri Alanı (Google Çeviri Tarzı) */
.wrap { max-width: 1200px; margin: 0 auto; padding: 24px 16px; }
.translation-container { display: flex; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; position: relative; }
.panel { flex: 1; display: flex; flex-direction: column; }
.tr-panel { border-right: 1px solid var(--border); }
.panel-header { padding: 16px 20px; border-bottom: 1px solid var(--border); }
.lang-title { font-weight: 600; color: var(--primary); text-transform: uppercase; letter-spacing: 0.5px; font-size: 14px; }
textarea { flex: 1; min-height: 250px; border: none; background: transparent; color: var(--text-main); padding: 20px; font-size: 22px; resize: none; outline: none; }
.panel-footer { display: flex; justify-content: space-between; padding: 10px 20px; border-top: 1px solid var(--border); background: var(--bg); }

/* Değişim Butonu */
.swap-wrapper { position: absolute; left: 50%; top: 20px; transform: translateX(-50%); z-index: 10; }
.swap-btn { width: 40px; height: 40px; border-radius: 50%; background: var(--surface); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow); color: var(--text-muted); font-size: 18px; }
.swap-btn:hover { color: var(--primary); transform: scale(1.05); }

/* Araçlar */
.tools-container { display: flex; gap: 12px; margin-top: 24px; justify-content: center; flex-wrap: wrap; }
.status { text-align: center; margin-top: 16px; font-weight: 500; color: var(--primary); min-height: 20px; }

/* Yan Menü (Mobil Uyumlu) */
.sidebar { position: fixed; top: 0; right: -300px; width: 280px; height: 100vh; background: var(--surface); box-shadow: -2px 0 8px rgba(0,0,0,0.1); transition: 0.3s ease; z-index: 200; display: flex; flex-direction: column; }
.sidebar.open { right: 0; }
.sidebar-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); opacity: 0; pointer-events: none; transition: 0.3s; z-index: 199; }
.sidebar-overlay.open { opacity: 1; pointer-events: auto; }
.sidebar-header { padding: 20px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border); }
.sidebar-menu { list-style: none; padding: 0; margin: 0; }
.sidebar-menu li a { display: block; padding: 16px 20px; text-decoration: none; color: var(--text-main); font-weight: 500; transition: 0.2s; }
.sidebar-menu li a:hover { background: var(--bg); color: var(--primary); }
.sidebar-menu hr { border: none; border-top: 1px solid var(--border); margin: 8px 0; }

/* Mobil Görünüm */
@media (max-width: 768px) {
  .translation-container { flex-direction: column; }
  .tr-panel { border-right: none; border-bottom: 1px solid var(--border); }
  .swap-wrapper { top: 50%; transform: translate(-50%, -50%) rotate(90deg); }
  textarea { min-height: 180px; font-size: 18px; }
}

/* Giriş Ekranı (Login) */
.login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: var(--bg); }
.login-card { width: 100%; max-width: 400px; text-align: center; padding: 40px 32px; }
.password-wrapper { position: relative; margin-bottom: 20px; text-align: left; }
.password-wrapper input { width: 100%; padding: 14px 45px 14px 16px; border: 1px solid var(--border); border-radius: 8px; font-size: 16px; background: var(--bg); color: var(--text-main); outline: none; transition: 0.2s; }
.password-wrapper input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--focus); }
.password-wrapper i { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); cursor: pointer; color: var(--text-muted); font-size: 18px; transition: 0.2s; }
.password-wrapper i:hover { color: var(--text-main); }

/* Google Çeviri Kutu Yer Değiştirme (Reverse Mode) */
.translation-container { transition: 0.3s ease; }
.translation-container.reverse-mode { flex-direction: row-reverse; }
.translation-container.reverse-mode .tr-panel { border-right: none; border-left: 1px solid var(--border); }

@media (max-width: 768px) {
  .translation-container.reverse-mode { flex-direction: column-reverse; }
  .translation-container.reverse-mode .tr-panel { border-left: none; border-top: 1px solid var(--border); border-bottom: none; }
}