:root {
  --bg: #0a0f16;
  --surface: #12171f;
  --accent: #00eaff;
  --accent-glow: rgba(0, 234, 255, 0.4);
  --text: #e0f7ff;
  --gradient: linear-gradient(135deg, #00d4ff, #00f2ea);
  --card-bg: rgba(18, 23, 31, 0.8);
  --card-border: rgba(0, 234, 255, 0.2);
}

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

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  overflow-x: hidden;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  background: linear-gradient(to bottom, rgba(0,212,255,0.05), transparent);
  position: relative;
  z-index: 999;
}

.logo {
  font-size: 2rem;
  font-weight: 700;
  background: var(--gradient);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Standart Select Stilleri (Kartlar ve Modallar için) */
.language-selector {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.9rem;
  outline: none;
  cursor: pointer;
}

/* Özel Dil Seçici Stilleri */
.custom-language-selector {
  position: relative;
  /*min-width: 140px;*/
  font-size: 0.9rem;
}

.selected-lang {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}
.selected-lang:hover { background: rgba(255, 255, 255, 0.1); border-color: var(--accent); }
.selected-lang img { width: 20px; height: 15px; object-fit: cover; border-radius: 2px; }

.lang-options {
  position: absolute;
  top: 100%;
  right: 0;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  margin-top: 5px;
  max-height: 300px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
  box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}
.lang-option { display: flex; align-items: center; gap: 8px; padding: 10px; cursor: pointer; transition: background 0.2s; }
.lang-option:hover { background: rgba(0, 234, 255, 0.1); }
.lang-option img { width: 20px; height: 15px; object-fit: cover; border-radius: 2px; }

.avatar-section {
  text-align: center;
  padding: 2rem 1rem;
  position: relative;
}

.lolo-avatar-container {
  position: relative;
  display: inline-block;
}

.lolo-avatar {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--accent);
  box-shadow: 0 0 40px var(--accent-glow);
  cursor: pointer;
}

.lolo-avatar-container.thinking::before {
  content: '';
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  border-radius: 50%;
  border: 4px solid transparent;
  border-top-color: var(--accent);
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.change-icon {
  position: absolute;
  bottom: 0;
  right: 0;
  background: var(--accent);
  color: #000;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  border: 2px solid var(--surface);
  cursor: pointer;
  box-shadow: 0 0 10px rgba(0,0,0,0.4);
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background: var(--surface);
  border-radius: 1.5rem;
  padding: 2rem;
  max-width: 90%;
  width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  border: 1px solid var(--card-border);
  text-align: center;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-size: 2rem;
  cursor: pointer;
  color: var(--accent);
}

.assistant-video-preview {
  width: 100%;
  max-width: 400px;
  border-radius: 1rem;
  margin: 1rem auto;
  box-shadow: 0 0 30px rgba(0,234,255,0.3);
}

.assistant-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.assistant-card {
  text-align: center;
  cursor: pointer;
  padding: 1rem;
  border-radius: 1rem;
  background: rgba(255,255,255,0.05);
  border: 2px solid transparent;
  transition: all 0.3s;
}

.assistant-card:hover {
  background: rgba(0,234,255,0.15);
  transform: scale(1.05);
}

.assistant-card.selected {
  background: rgba(0,234,255,0.25);
  border-color: var(--accent);
  transform: scale(1.08);
}

.assistant-card img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 0.8rem;
}

.assistant-card span {
  display: block;
  font-size: 1.1rem;
}

.chat-bubble {
  background: var(--surface);
  border-radius: 1.5rem;
  padding: 1.2rem 1.8rem;
  max-width: 80%;
  margin: 1rem auto;
  border: 1px solid rgba(0,234,255,0.2);
  box-shadow: 0 8px 25px rgba(0,0,0,0.4);
  position: relative;
}

.chat-bubble::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  border: 12px solid transparent;
  border-top-color: var(--surface);
}

.mic-btn {
  background: var(--gradient);
  color: white;
  border: none;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 0 15px var(--accent-glow);
  transition: all 0.3s;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mic-btn:hover { transform: scale(1.1); }
.mic-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.mic-btn.listening {
  background: #d62828; /* Kırmızı */
  box-shadow: 0 0 20px rgba(214, 40, 40, 0.6);
  animation: pulse 1.5s infinite;
}

.cards-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.compact-card {
  background: var(--card-bg);
  border-radius: 1.25rem;
  padding: 1.5rem;
  border: 1px solid var(--card-border);
  min-height: 180px;
  position: relative;
  touch-action: manipulation;
}

#weather-info {
    text-align: center;
}

.drag-handle {
  position: absolute;
  top: 0;
  right: 0;
  font-size: 1.5rem;
  color: var(--accent);
  cursor: move;
  opacity: 0.6;
  transition: opacity 0.2s;
  z-index: 10;
}

.compact-card:hover .drag-handle,
.compact-card:active .drag-handle {
  opacity: 1;
}

.compact-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--accent);
}

.play-icon {
  position: absolute;
  bottom: 0.2rem;
  right: 0.2rem;
  font-size: 1.8rem;
  color: var(--accent);
  cursor: pointer;
  opacity: 0.6;
  transition: all 0.2s;
}
.play-icon:hover {
  opacity: 1;
  transform: scale(1.1);
}

.play-icon.playing {
    pointer-events: none; /* Tıklamaları engelle */
}

.play-icon.playing::before {
    content: '';
    position: absolute;
    top: -6px;
    left: -6px;
    right: -6px;
    bottom: -6px;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: var(--accent);
    animation: spin 1s linear infinite;
}

/* Şehir Seçimi Estetik Düzenlemeler */
.city-selector-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: 2.5rem; /* Drag handle'dan uzaklaşmak için boşluk */
  background: rgba(0, 234, 255, 0.08);
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid rgba(0, 234, 255, 0.2);
  transition: all 0.3s ease;
}

.city-selector-wrapper:hover {
  background: rgba(0, 234, 255, 0.15);
  border-color: var(--accent);
  box-shadow: 0 0 10px rgba(0, 234, 255, 0.1);
}

.city-select {
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 0.85rem;
  cursor: pointer;
  outline: none;
  max-width: 130px;
  font-family: inherit;
  appearance: none; /* Varsayılan oku kaldır */
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 1.2rem; /* Ok ikonu için yer */
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300eaff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right center;
  background-size: 1em;
}

.city-select option {
  background: var(--surface);
  color: var(--text);
  padding: 5px;
}

body.translating {
    cursor: wait;
}

/* --- Takvim Stilleri --- */
.calendar-wrapper {
    font-size: 0.8rem;
    user-select: none;
}
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text);
}
.calendar-nav {
    cursor: pointer;
    padding: 2px 8px;
    opacity: 0.7;
    font-size: 1rem;
}
.calendar-nav:hover { opacity: 1; color: var(--accent); }
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    text-align: center;
    margin-bottom: 8px;
}
.calendar-day-name {
    font-size: 0.65rem;
    opacity: 0.6;
    margin-bottom: 4px;
}
.calendar-day {
    padding: 5px 0;
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    transition: background 0.2s;
}
.calendar-day:hover { background: rgba(255,255,255,0.1); }
.calendar-day.today { color: var(--accent); font-weight: bold; border: 1px solid rgba(0, 234, 255, 0.3); }
.calendar-day.selected { background: var(--accent); color: #000; font-weight: bold; }
.calendar-day.has-event::after { content: ''; position: absolute; bottom: 2px; left: 50%; transform: translateX(-50%); width: 4px; height: 4px; background: currentColor; border-radius: 50%; opacity: 0.8; }
.calendar-day.selected.has-event::after { background: #000; }
.calendar-events-preview { font-size: 0.75rem; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 8px; min-height: 45px; max-height: 60px; overflow-y: auto; }
.calendar-event-item { margin-bottom: 4px; /*white-space: nowrap;*/ overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; justify-content: space-between; }
.calendar-event-item i { cursor: pointer; color: #ff6b6b; margin-left: 5px; }

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}
::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb {
    background: rgba(0, 234, 255, 0.3);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* Finans Ayarları */
.settings-icon:hover { opacity: 1 !important; color: var(--accent); transform: rotate(90deg); transition: all 0.3s; }
.checkbox-list { text-align: left; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 1rem; }
.checkbox-item { display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 8px; border-radius: 8px; transition: background 0.2s; border: 1px solid rgba(255,255,255,0.05); }
.checkbox-item:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.2); }
.checkbox-item input { accent-color: var(--accent); transform: scale(1.2); cursor: pointer; }

/* Film Kartı Stilleri */
.compact-card[data-card-id="movie"] { min-height: 350px; display: flex; flex-direction: column; }
.movie-card-content { position: relative; z-index: 1; display: flex; flex-direction: column; flex: 1; justify-content: flex-end; }
.movie-bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-size: cover; background-position: center; opacity: 0.6; border-radius: 1.25rem; transition: opacity 0.5s; }
.movie-bg::after { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(to top, var(--card-bg) 20%, transparent 100%); border-radius: 1.25rem; }
.movie-rating { position: absolute; top: 15px; right: 15px; background: rgba(0,0,0,0.7); color: #ffc107; padding: 4px 8px; border-radius: 8px; font-weight: bold; font-size: 0.9rem; border: 1px solid rgba(255, 193, 7, 0.3); z-index: 5; display: flex; align-items: center; gap: 4px; }
.movie-info { margin-top: auto; text-shadow: 0 2px 4px rgba(0,0,0,0.8); position: relative; z-index: 2; }
.movie-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 4px; color: #fff; }
.movie-meta { font-size: 0.8rem; opacity: 0.9; display: flex; gap: 8px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.movie-genre-tag { background: rgba(0, 234, 255, 0.2); padding: 2px 6px; border-radius: 4px; font-size: 0.7rem; border: 1px solid rgba(0, 234, 255, 0.3); }
.movie-actions { display: flex; gap: 8px; margin-top: 10px; }
.movie-btn { flex: 1; padding: 6px; border: none; border-radius: 6px; cursor: pointer; font-size: 0.8rem; font-weight: 600; transition: all 0.2s; display: flex; align-items: center; justify-content: center; gap: 5px; }
.btn-watch { background: rgba(76, 175, 80, 0.2); color: #4caf50; border: 1px solid rgba(76, 175, 80, 0.4); }
.btn-watch:hover { background: rgba(76, 175, 80, 0.4); }
.btn-pass { background: rgba(244, 67, 54, 0.2); color: #f44336; border: 1px solid rgba(244, 67, 54, 0.4); }
.btn-pass:hover { background: rgba(244, 67, 54, 0.4); }
.btn-trailer { background: rgba(0, 234, 255, 0.2); color: var(--accent); border: 1px solid rgba(0, 234, 255, 0.4); width: 100%; margin-bottom: 8px; padding: 8px; }
.btn-trailer:hover { background: rgba(0, 234, 255, 0.4); }
.btn-add { background: rgba(255, 193, 7, 0.2); color: #ffc107; border: 1px solid rgba(255, 193, 7, 0.4); }
.btn-add:hover { background: rgba(255, 193, 7, 0.4); }

/* Notlar Kartı Özelleştirmesi */
.compact-card[data-card-id="notes"] {
    background: url('../img/note_bg.png') center/cover no-repeat;
    color: #0d47a1; /* Dolmakalem mavisi */
}
.compact-card[data-card-id="notes"] .compact-title { color: #0d47a1; text-shadow: none; }
.compact-card[data-card-id="notes"] .drag-handle { color: #0d47a1; opacity: 0.5; }
#notes-list { font-family: 'Caveat', cursive; font-size: 1.6rem !important; line-height: 1.3; }
#notes-list li { border-bottom: 1px solid rgba(13, 71, 161, 0.2) !important; }

/* İzleme Listesi Stilleri */
.watchlist-item { display: flex; align-items: center; gap: 10px; padding: 10px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.watchlist-item img { width: 50px; height: 75px; object-fit: cover; border-radius: 4px; }
.watchlist-info { flex: 1; text-align: left; }
.watchlist-title { font-weight: bold; font-size: 0.9rem; color: var(--text); }
.watchlist-year { font-size: 0.8rem; opacity: 0.7; }
.watchlist-remove { color: #ff6b6b; cursor: pointer; padding: 5px; transition: transform 0.2s; }
.watchlist-remove:hover { transform: scale(1.2); }

/* İzleme Listesi Tabları */
.watchlist-tabs { display: flex; border-bottom: 1px solid rgba(255,255,255,0.1); margin-bottom: 15px; }
.watchlist-tab { flex: 1; padding: 10px; cursor: pointer; opacity: 0.6; transition: all 0.2s; border-bottom: 2px solid transparent; font-size: 0.9rem; text-align: center; }
.watchlist-tab:hover { opacity: 1; background: rgba(255,255,255,0.05); }
.watchlist-tab.active { opacity: 1; border-bottom-color: var(--accent); color: var(--accent); font-weight: bold; }

/* Öğrenilen Kelimeler Listesi */
.learned-word-item {
    padding: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.learned-word-item:last-child { border-bottom: none; }

/* Öğrenilen Kelimeler - Oynatma Animasyonu */
.learned-word-item .fa-play-circle {
    position: relative; /* for the ::before pseudo-element */
}

.learned-word-item .fa-play-circle.playing {
    pointer-events: none;
}

.learned-word-item .fa-play-circle.playing::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: var(--accent);
    animation: spin 1s linear infinite;
}

/* Toast Bildirimleri */
#toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.toast-notification {
    background: var(--surface);
    color: var(--text);
    padding: 12px 20px;
    border-radius: 10px;
    border: 1px solid var(--card-border);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}
.toast-notification.show {
    opacity: 1;
    transform: translateX(0);
}
.toast-notification .toast-icon { font-size: 1.2rem; }
.toast-notification.success .toast-icon { color: #4caf50; }
.toast-notification.info .toast-icon { color: var(--accent); }
.toast-notification.error .toast-icon { color: #f44336; }

/* Youtube Modal */
.video-container { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; border-radius: 12px; margin-bottom: 15px; }
.video-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }

@keyframes pulse {
  0% {
    transform: translateX(-50%) scale(1);
  }
  50% {
    transform: translateX(-50%) scale(1.05);
  }
  100% {
    transform: translateX(-50%) scale(1);
  }
}

/* Chat Input */
.chat-input-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
  width: 100%;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
}

#chat-input {
  flex-grow: 1;
  padding: 12px 20px;
  border-radius: 30px;
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 1rem;
  outline: none;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

#chat-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 15px rgba(0, 234, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
}

.send-btn {
  background: var(--gradient);
  border: none;
  color: #fff;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s;
  box-shadow: 0 0 15px var(--accent-glow);
  flex-shrink: 0;
}

.send-btn:hover {
  transform: scale(1.1);
}

.send-btn i {
    font-size: 1.1rem;
    margin-left: -2px;
}

    /* Sabit Mikrofon Butonu */
    #mic-btn {
      position: fixed;
      bottom: 30px;
      left: 50%;
      transform: translateX(-50%);
      width: 70px;
      height: 70px;
      border-radius: 50%;
      font-size: 28px;
      z-index: 9999;
      box-shadow: 0 5px 20px rgba(0,0,0,0.3);
      display: flex;
      align-items: center;
      justify-content: center;
    }

    /* Landing Page Stilleri */
    #landing-page {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: #000;
      z-index: 998; /* Header'ın altında kalabilir veya üstünde, duruma göre */
      display: none; /* JS ile kontrol edilecek */
      flex-direction: column;
      justify-content: flex-end; /* İçeriği alta it */
      padding-bottom: 50px;
    }
    .landing-slider {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      z-index: 1;
    }
    .landing-slide {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background-size: cover;
      background-position: center;
      opacity: 0;
      transition: opacity 1.5s ease-in-out;
      object-fit: cover;
      object-position: center center;
    }
    .landing-slide.active { opacity: 0.5; } /* Resmi biraz karart */
    .landing-content {
      position: relative;
      z-index: 2;
      text-align: center;
      width: 90%;
      max-width: 400px;
      margin: 0 auto 40px auto;
    }
    .landing-title {
      font-family: 'Playfair Display', serif;
      font-size: 2.5rem;
      color: #fff;
      margin-bottom: 10px;
      text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    }
    .landing-subtitle {
      font-size: 1.1rem;
      color: rgba(255,255,255,0.9);
      margin-bottom: 30px;
    }
    .landing-dynamic-text {
      font-family: 'Playfair Display', serif;
      font-size: 2rem;
      color: #fff;
      margin-bottom: 30px;
      text-shadow: 0 2px 10px rgba(0,0,0,0.8);
      opacity: 0;
      transform: translateY(30px);
      transition: opacity 0.8s ease-out, transform 0.8s ease-out;
      min-height: 3rem; /* Metin değişirken zıplamayı önlemek için */
    }
    .landing-dynamic-text.visible {
      opacity: 1;
      transform: translateY(0);
    }