@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&display=swap');

/* ===== RESET & BASE ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --pink: #ff6b9d;
  --pink-light: #ff8fb8;
  --purple: #c44dff;
  --purple-dark: #a033e0;
  --mint: #4ecdc4;
  --mint-light: #7eddd7;
  --orange: #ff9a56;
  --yellow: #ffd93d;
  --bg: #faf5ff;
  --card: #ffffff;
  --text: #2d1b69;
  --text-light: #8b7fad;
  --border: #e8e0f0;
  --shadow: 0 4px 24px rgba(45, 27, 105, 0.08);
  --shadow-hover: 0 8px 32px rgba(45, 27, 105, 0.14);
  --radius: 18px;
  --radius-sm: 12px;
}

body {
  font-family: 'Nunito', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}

/* ===== AUTH PAGE ===== */
.auth-page {
  background: linear-gradient(135deg, #faf5ff 0%, #f0e6ff 30%, #ffe6f0 70%, #fff5e6 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1rem;
}

.auth-container {
  width: 100%;
  max-width: 440px;
}

.auth-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow);
  text-align: center;
  animation: fadeInUp 0.5s ease;
}

.auth-logo {
  font-size: 3.5rem;
  margin-bottom: 0.5rem;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.auth-card h1 {
  font-size: 1.8rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.2rem;
}

.subtitle {
  color: var(--text-light);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.setup-desc {
  color: var(--text-light);
  margin-bottom: 1.2rem;
  font-size: 0.9rem;
}

/* ===== TABS ===== */
.tab-buttons {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  background: #f5f0fa;
  border-radius: var(--radius-sm);
  padding: 4px;
}

.tab-btn {
  flex: 1;
  padding: 0.6rem;
  border: none;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-light);
  transition: all 0.25s ease;
}

.tab-btn.active {
  background: linear-gradient(135deg, var(--pink), var(--purple));
  color: white;
  box-shadow: 0 4px 12px rgba(196, 77, 255, 0.3);
}

.tab-btn:hover:not(.active) {
  color: var(--purple);
}

/* ===== FORM INPUTS ===== */
.input-group {
  text-align: left;
  margin-bottom: 1rem;
}

.input-group label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.35rem;
  font-size: 0.85rem;
  color: var(--text);
}

.input-group input,
.input-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.2s ease;
  background: #faf5ff;
  color: var(--text);
}

.input-group input:focus,
.input-group select:focus {
  outline: none;
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(196, 77, 255, 0.1);
  background: white;
}

.input-group input::placeholder {
  color: #c4b8d9;
}

/* ===== ŞİFRE GÖSTER/GİZLE ===== */
.password-group {
  position: relative;
}

.password-group input {
  padding-right: 2.8rem;
}

.toggle-password {
  position: absolute;
  right: 0.6rem;
  bottom: 0.55rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  color: #a090b8;
  display: flex;
  align-items: center;
  transition: color 0.2s;
}

.toggle-password:hover {
  color: var(--purple);
}

.toggle-password svg {
  width: 1.2rem;
  height: 1.2rem;
}

.toggle-password .hidden {
  display: none;
}

/* ===== BENİ HATIRLA ===== */
.remember-me-row {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.remember-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  user-select: none;
}

.remember-label input[type="checkbox"] {
  display: none;
}

.remember-check {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 2px solid var(--border);
  background: #faf5ff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

.remember-label input[type="checkbox"]:checked + .remember-check {
  background: linear-gradient(135deg, var(--pink), var(--purple));
  border-color: var(--purple);
}

.remember-label input[type="checkbox"]:checked + .remember-check::after {
  content: '✓';
  color: white;
  font-size: 0.75rem;
  font-weight: 800;
}

/* ===== KAYITLI HESAPLAR ===== */
.saved-accounts-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--card);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 32px rgba(45, 27, 105, 0.15);
  border: 2px solid var(--border);
  z-index: 50;
  margin-top: 4px;
  overflow: hidden;
  animation: fadeInUp 0.2s ease;
}

.saved-accounts-dropdown.hidden {
  display: none;
}

.saved-accounts-title {
  padding: 0.5rem 0.8rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-light);
  border-bottom: 1px solid var(--border);
}

.saved-account-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0.8rem;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.15s;
}

.saved-account-item:hover {
  background: #f5f0ff;
}

.saved-account-remove {
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--text-light);
  font-size: 0.7rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.saved-account-remove:hover {
  background: #fce4ec;
  color: var(--pink);
}

.input-group {
  position: relative;
}

/* ===== BUTTONS ===== */
.btn-primary {
  width: 100%;
  padding: 0.85rem;
  border: none;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--pink), var(--purple));
  color: white;
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
  letter-spacing: 0.3px;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(196, 77, 255, 0.35);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  padding: 0.7rem 1.2rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text);
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  border-color: var(--purple);
  color: var(--purple);
  box-shadow: var(--shadow);
}

.btn-sm {
  padding: 0.4rem 0.9rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.15);
  color: white;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.btn-sm:hover {
  background: rgba(255, 255, 255, 0.25);
}

.btn-icon {
  width: 38px;
  height: 38px;
  border: 2px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  cursor: pointer;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.btn-icon:hover {
  border-color: var(--purple);
  color: var(--purple);
  box-shadow: var(--shadow);
}

.hidden { display: none !important; }

.error-msg {
  color: var(--pink);
  margin-top: 0.75rem;
  font-size: 0.9rem;
  font-weight: 600;
  min-height: 1.2em;
}

/* ===== NAVBAR ===== */
.navbar {
  background: linear-gradient(135deg, var(--pink), var(--purple));
  color: white;
  padding: 0.9rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 20px rgba(196, 77, 255, 0.25);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: 0.5px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-weight: 600;
  font-size: 0.9rem;
}

/* ===== CONTAINER ===== */
.container {
  max-width: 680px;
  margin: 0 auto;
  padding: 1.2rem;
}

/* ===== CARD ===== */
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.4rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s ease;
  animation: fadeInUp 0.4s ease;
}

.card:hover {
  box-shadow: var(--shadow-hover);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-bottom: 1.2rem;
}

.full-width {
  grid-column: 1 / -1;
}

/* ===== SUMMARY ===== */
.summary-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  margin-bottom: 1.2rem;
}

.summary-header h2 {
  font-size: 1rem;
  min-width: 200px;
  text-align: center;
  color: var(--text);
  font-weight: 700;
}

.calorie-bar-container {
  margin-bottom: 1.2rem;
}

.calorie-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.6rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.cal-remaining {
  color: var(--mint);
}

.calorie-bar {
  height: 14px;
  background: linear-gradient(90deg, #f0e6ff, #ffe6f0);
  border-radius: 7px;
  overflow: hidden;
  position: relative;
}

.calorie-bar-fill {
  height: 100%;
  border-radius: 7px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  background: linear-gradient(90deg, var(--mint), var(--purple));
  position: relative;
}

.calorie-bar-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.3) 0%, transparent 100%);
  border-radius: 7px;
}

.calorie-bar-fill.over {
  background: linear-gradient(90deg, var(--orange), var(--pink));
}

.macro-row {
  display: flex;
  gap: 0.5rem;
}

.macro-item {
  flex: 1;
  text-align: center;
  padding: 0.7rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  transition: transform 0.2s;
}

.macro-item:hover {
  transform: translateY(-2px);
}

.macro-item span {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.7;
  margin-bottom: 0.2rem;
}

.macro-item strong {
  font-size: 1.1rem;
}

.macro-item.protein {
  background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
  color: #2e7d32;
}

.macro-item.carbs {
  background: linear-gradient(135deg, #fff3e0, #ffe0b2);
  color: #ef6c00;
}

.macro-item.fat {
  background: linear-gradient(135deg, #fce4ec, #f8bbd0);
  color: #c62828;
}

/* ===== MEAL CARDS ===== */
.meal-card {
  border-left: 4px solid transparent;
  border-image: linear-gradient(to bottom, var(--pink), var(--purple)) 1;
}

.meal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.meal-header h3 {
  font-size: 1rem;
  font-weight: 700;
}

.meal-cal {
  font-weight: 800;
  color: var(--purple);
  font-size: 0.95rem;
}

.meal-items {
  min-height: 0;
}

.meal-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid #f5f0fa;
  font-size: 0.9rem;
  animation: fadeInUp 0.3s ease;
}

.meal-item:last-child {
  border-bottom: none;
}

.meal-item-name {
  font-weight: 600;
  flex: 1;
  margin-right: 0.5rem;
}

.meal-item-right {
  font-weight: 700;
  color: var(--text-light);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.btn-del {
  background: none;
  border: none;
  color: var(--pink);
  cursor: pointer;
  font-size: 1rem;
  padding: 0.2rem 0.4rem;
  border-radius: 6px;
  transition: all 0.2s;
  font-weight: 700;
}

.btn-del:hover {
  background: #fce4ec;
  transform: scale(1.1);
}

/* ===== FOOD SEARCH ===== */
.add-food {
  margin-top: 0.5rem;
}

.food-search-wrap {
  position: relative;
}

.food-search {
  width: 100%;
  padding: 0.65rem 1rem;
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9rem;
  background: #fdf8ff;
  transition: all 0.2s;
}

.food-search:focus {
  outline: none;
  border-color: var(--purple);
  border-style: solid;
  background: white;
  box-shadow: 0 0 0 3px rgba(196, 77, 255, 0.08);
}

.food-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: white;
  border-radius: var(--radius-sm);
  box-shadow: 0 12px 40px rgba(45, 27, 105, 0.15);
  z-index: 50;
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid var(--border);
}

.food-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.7rem 1rem;
  cursor: pointer;
  transition: all 0.15s;
  border-bottom: 1px solid #f8f4fc;
}

.food-option:last-child {
  border-bottom: none;
}

.food-option:hover {
  background: linear-gradient(135deg, #fdf5ff, #fff5f8);
  padding-left: 1.2rem;
}

.food-option-name {
  font-weight: 600;
  font-size: 0.9rem;
}

.food-cal {
  color: var(--purple);
  font-size: 0.8rem;
  font-weight: 700;
  background: #f5f0fa;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
}

/* ===== CUSTOM FOOD FORM ===== */
.custom-food-toggle {
  margin-top: 0.5rem;
  text-align: center;
}

.btn-custom-food {
  background: none;
  border: none;
  color: var(--purple);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0.3rem 0.6rem;
  border-radius: 8px;
  transition: all 0.2s;
}

.btn-custom-food:hover {
  background: #f5f0fa;
  color: var(--purple-dark);
}

.custom-food-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
  padding: 0.8rem;
  background: linear-gradient(135deg, #fdf8ff, #fff5f8);
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  animation: fadeInUp 0.3s ease;
}

.custom-food-form.hidden {
  display: none !important;
}

.custom-food-name {
  flex: 1 1 100%;
  padding: 0.6rem 0.8rem;
  border: 2px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.9rem;
  background: white;
}

.custom-food-cal {
  flex: 1 1 80px;
  padding: 0.6rem 0.8rem;
  border: 2px solid var(--pink-light);
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.9rem;
  background: white;
  font-weight: 700;
}

.custom-food-macro {
  flex: 1 1 60px;
  padding: 0.6rem 0.8rem;
  border: 2px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.82rem;
  background: white;
}

.custom-food-name:focus,
.custom-food-cal:focus,
.custom-food-macro:focus {
  outline: none;
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(196, 77, 255, 0.1);
}

.btn-add-custom {
  flex: 0 0 auto;
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--mint), var(--purple));
  color: white;
  font-family: inherit;
  font-weight: 800;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-add-custom:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(78, 205, 196, 0.35);
}

/* ===== WATER ===== */
.water-card {
  text-align: center;
}

.water-card h3 {
  margin-bottom: 0.8rem;
  font-size: 1rem;
}

.water-glasses {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  flex-wrap: wrap;
}

.water-glass {
  font-size: 1.6rem;
  cursor: pointer;
  filter: grayscale(1);
  opacity: 0.3;
  transition: all 0.25s ease;
  padding: 0.15rem;
}

.water-glass.filled {
  filter: grayscale(0);
  opacity: 1;
  animation: pop 0.3s ease;
}

@keyframes pop {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

.water-glass:hover {
  transform: scale(1.25);
  filter: grayscale(0);
  opacity: 0.8;
}

.water-count {
  font-weight: 700;
  margin-left: 0.6rem;
  color: var(--text-light);
  font-size: 0.9rem;
}

/* ===== KİLO TAKİBİ ===== */
.weight-card {
  border-left: 4px solid transparent;
  border-image: linear-gradient(to bottom, #c44dff, #ff6b9d) 1;
}

.weight-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.8rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.weight-header h3 {
  margin: 0;
  font-size: 1rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.weight-range-btns {
  display: flex;
  gap: 0.3rem;
}

.weight-range-btn {
  padding: 0.25rem 0.6rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: white;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.2s;
}

.weight-range-btn.active,
.weight-range-btn:hover {
  background: var(--purple);
  color: white;
  border-color: var(--purple);
}

.weight-input-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.weight-input-row input {
  flex: 1;
  padding: 0.6rem 0.8rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9rem;
  background: var(--bg);
  transition: border-color 0.2s;
}

.weight-input-row input:focus {
  outline: none;
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(196, 77, 255, 0.1);
}

.weight-input-row .btn-add-custom {
  white-space: nowrap;
}

.weight-chart-wrap {
  position: relative;
  margin-bottom: 0.8rem;
}

.weight-chart-wrap canvas {
  width: 100%;
  display: block;
}

.weight-empty {
  text-align: center;
  color: var(--text-light);
  font-size: 0.85rem;
  padding: 2rem 0;
}

.weight-stats {
  display: flex;
  justify-content: space-around;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.weight-stat {
  text-align: center;
  padding: 0.4rem;
}

.weight-stat span {
  display: block;
  font-size: 0.7rem;
  color: var(--text-light);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 0.15rem;
}

.weight-stat strong {
  font-size: 0.95rem;
  color: var(--text);
}

.weight-stat.weight-down strong {
  color: #22c55e;
}

.weight-stat.weight-up strong {
  color: #f43f5e;
}

/* ===== SCROLLBAR ===== */
.food-dropdown::-webkit-scrollbar {
  width: 6px;
}

.food-dropdown::-webkit-scrollbar-track {
  background: transparent;
}

.food-dropdown::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 500px) {
  .form-grid {
    grid-template-columns: 1fr;
  }

  .navbar {
    padding: 0.7rem 1rem;
    font-size: 0.85rem;
  }

  .logo {
    font-size: 1.05rem;
  }

  .container {
    padding: 0.8rem;
  }

  .card {
    padding: 1.1rem;
    border-radius: 14px;
  }

  .auth-card {
    padding: 2rem 1.5rem;
  }

  .auth-logo {
    font-size: 2.8rem;
  }

  .auth-card h1 {
    font-size: 1.5rem;
  }

  .macro-row {
    gap: 0.35rem;
  }

  .macro-item {
    padding: 0.5rem 0.3rem;
  }

  .macro-item strong {
    font-size: 0.95rem;
  }

  .calorie-info {
    font-size: 0.78rem;
  }

  .summary-header h2 {
    font-size: 0.9rem;
    min-width: 160px;
  }

  .friends-panel {
    width: 100% !important;
  }

  .modal-card {
    width: 95%;
    margin: 1rem auto;
    max-height: 90vh;
  }

  .btn-friends {
    padding: 0.3rem 0.6rem;
    font-size: 0.75rem;
  }

  .weight-header {
    flex-wrap: wrap;
  }

  .weight-header h3 {
    font-size: 0.9rem;
  }

  .weight-range-btn {
    padding: 0.2rem 0.45rem;
    font-size: 0.7rem;
  }

  .weight-input-row input {
    font-size: 0.85rem;
    padding: 0.5rem 0.6rem;
  }

  .weight-stat strong {
    font-size: 0.85rem;
  }

  .weight-stat span {
    font-size: 0.65rem;
  }
}

@media (max-width: 360px) {
  .water-glass {
    font-size: 1.3rem;
  }
}

/* ===== NAVBAR AVATAR ===== */
.nav-avatar-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: opacity 0.2s;
}

.nav-avatar-wrap:hover {
  opacity: 0.8;
}

.nav-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.5);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

#nav-user {
  font-weight: 700;
  font-size: 0.9rem;
}

/* ===== AVATAR UPLOAD SECTION ===== */
.avatar-upload-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
  padding: 1.2rem;
  background: linear-gradient(135deg, rgba(255,107,157,0.08), rgba(196,77,255,0.08));
  border-radius: var(--radius);
  border: 2px dashed var(--border);
}

.avatar-preview-wrap {
  position: relative;
  cursor: pointer;
}

.avatar-preview {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  background: linear-gradient(135deg, var(--pink-light), var(--purple));
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid white;
  box-shadow: 0 4px 15px rgba(196,77,255,0.2);
  transition: all 0.3s;
}

.avatar-preview:not(.has-avatar) {
  background: linear-gradient(135deg, var(--pink-light), var(--purple));
}

.avatar-overlay {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(0,0,0,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  opacity: 0;
  transition: opacity 0.2s;
  cursor: pointer;
}

.avatar-preview-wrap:hover .avatar-overlay {
  opacity: 1;
}

.btn-avatar-upload {
  background: linear-gradient(135deg, var(--pink), var(--purple));
  color: white;
  border: none;
  padding: 0.5rem 1.2rem;
  border-radius: 10px;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-avatar-upload:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(196,77,255,0.3);
}

.avatar-size-control {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  width: 100%;
  max-width: 250px;
}

.avatar-size-control label {
  font-size: 0.8rem;
  color: var(--text-light);
  font-weight: 600;
}

.avatar-size-control input[type="range"] {
  width: 100%;
  accent-color: var(--purple);
}

/* ===== AVATAR CROP MODAL ===== */
.avatar-crop-card {
  max-width: 420px !important;
}

.crop-container {
  display: flex;
  justify-content: center;
  padding: 1rem 0;
}

.crop-area {
  position: relative;
  width: 280px;
  height: 280px;
  overflow: hidden;
  background: #1a1a2e;
  border-radius: var(--radius);
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.crop-area:active {
  cursor: grabbing;
}

.crop-area img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform-origin: center center;
  pointer-events: none;
}

.crop-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 80%;
  height: 80%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 3px solid white;
  box-shadow: 0 0 0 9999px rgba(0,0,0,0.5);
  pointer-events: none;
}

.crop-controls {
  text-align: center;
  padding: 0.5rem 1rem;
}

.crop-controls label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-light);
  display: block;
  margin-bottom: 0.3rem;
}

.crop-controls input[type="range"] {
  width: 100%;
  max-width: 260px;
  accent-color: var(--purple);
}

.crop-actions {
  display: flex;
  gap: 0.8rem;
  justify-content: center;
  padding: 0.8rem 0;
}

.crop-actions .btn-secondary {
  margin-top: 0;
  width: auto;
  padding: 0.6rem 1.5rem;
}

.crop-actions .btn-primary {
  width: auto;
  padding: 0.6rem 1.5rem;
}

/* ===== FRIEND AVATAR IMAGE ===== */
.friend-avatar-img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.fd-avatar {
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--pink-light);
  box-shadow: 0 4px 12px rgba(196,77,255,0.2);
  vertical-align: middle;
  margin-right: 0.5rem;
}

/* ===== ARKADAŞLAR BUTONU (NAVBAR) ===== */
.btn-friends {
  position: relative;
  background: rgba(255,255,255,0.2);
  border: 2px solid rgba(255,255,255,0.35);
  padding: 0.4rem 0.9rem;
  border-radius: 10px;
  color: white;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.btn-friends:hover {
  background: rgba(255,255,255,0.3);
  transform: translateY(-1px);
}

.notif-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #ff4757;
  color: white;
  font-size: 0.65rem;
  font-weight: 800;
  min-width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid white;
  animation: pop 0.3s ease;
}

@keyframes pop {
  0% { transform: scale(0); }
  80% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/* ===== ARKADAŞLAR PANELİ ===== */
.friends-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 380px;
  height: 100vh;
  background: var(--bg);
  box-shadow: -8px 0 40px rgba(45, 27, 105, 0.15);
  z-index: 200;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  pointer-events: none;
}

.friends-panel.open {
  transform: translateX(0);
  pointer-events: auto;
}

.friends-panel-inner {
  height: 100%;
  overflow-y: auto;
  padding: 1.5rem;
}

.friends-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.2rem;
  padding-bottom: 0.8rem;
  border-bottom: 2px solid var(--border);
}

.friends-panel-header h2 {
  font-size: 1.3rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.friends-search-section {
  margin-bottom: 1.2rem;
}

.friends-search-section .input-group {
  margin-bottom: 0.5rem;
}

.friends-panel h3 {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.6rem;
  margin-top: 1rem;
}

.empty-text {
  color: var(--text-light);
  font-size: 0.85rem;
  text-align: center;
  padding: 1rem 0;
}

/* ===== ARAMA SONUÇLARI ===== */
.search-result-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0.8rem;
  background: var(--card);
  border-radius: var(--radius-sm);
  margin-bottom: 0.4rem;
  box-shadow: 0 2px 8px rgba(45, 27, 105, 0.06);
  font-size: 0.9rem;
  font-weight: 600;
}

.btn-send-request {
  padding: 0.3rem 0.7rem;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--mint), var(--mint-light));
  color: white;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-send-request:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(78, 205, 196, 0.35);
}

.btn-send-request:disabled,
.btn-send-request.sent {
  background: #e0e0e0;
  color: #888;
  cursor: default;
  transform: none;
  box-shadow: none;
}

/* ===== ARKADAŞLIK İSTEKLERİ ===== */
.friend-request-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.7rem 0.8rem;
  background: var(--card);
  border-radius: var(--radius-sm);
  margin-bottom: 0.4rem;
  box-shadow: 0 2px 8px rgba(45, 27, 105, 0.06);
  border-left: 3px solid var(--orange);
}

.friend-req-name {
  font-weight: 700;
  font-size: 0.9rem;
}

.friend-req-buttons {
  display: flex;
  gap: 0.4rem;
}

.btn-accept {
  padding: 0.3rem 0.6rem;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--mint), #2ecc71);
  color: white;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-accept:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(46, 204, 113, 0.35);
}

.btn-reject {
  padding: 0.3rem 0.6rem;
  border: none;
  border-radius: 8px;
  background: #f0e6ff;
  color: var(--text-light);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-reject:hover {
  background: #fce4ec;
  color: var(--pink);
}

/* ===== GELEN İLETİLER ===== */
.friend-message-card {
  position: relative;
  padding: 0.7rem 0.8rem;
  background: var(--card);
  border-radius: var(--radius-sm);
  margin-bottom: 0.4rem;
  box-shadow: 0 2px 8px rgba(45, 27, 105, 0.06);
  border-left: 3px solid var(--purple);
}

.msg-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.2rem;
}

.msg-header strong {
  font-size: 0.85rem;
  color: var(--purple);
}

.msg-time {
  font-size: 0.7rem;
  color: var(--text-light);
}

.msg-text {
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.4;
}

.friend-message-card .btn-del {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  font-size: 0.75rem;
  padding: 0.15rem 0.3rem;
}

/* ===== ARKADAŞ KARTLARI ===== */
.friend-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem;
  background: var(--card);
  border-radius: var(--radius-sm);
  margin-bottom: 0.4rem;
  box-shadow: 0 2px 8px rgba(45, 27, 105, 0.06);
  cursor: pointer;
  transition: all 0.2s;
  border: 2px solid transparent;
}

.friend-card:hover {
  border-color: var(--purple);
  box-shadow: var(--shadow-hover);
  transform: translateY(-1px);
}

.friend-card-info {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.friend-avatar {
  font-size: 1.4rem;
}

.friend-name {
  font-weight: 700;
  font-size: 0.95rem;
}

.friend-card-actions {
  display: flex;
  gap: 0.3rem;
}

.btn-friend-view,
.btn-friend-remove {
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.btn-friend-view {
  background: #f0e6ff;
  color: var(--purple);
}

.btn-friend-view:hover {
  background: var(--purple);
  color: white;
}

.btn-friend-remove {
  background: #fce4ec;
  color: var(--pink);
}

.btn-friend-remove:hover {
  background: var(--pink);
  color: white;
}

/* ===== MODAL OVERLAY & KART ===== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(45, 27, 105, 0.4);
  backdrop-filter: blur(4px);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.modal-overlay.hidden {
  display: none !important;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.8rem;
  width: 90%;
  max-width: 500px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(45, 27, 105, 0.2);
  animation: fadeInUp 0.35s ease;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.8rem;
  border-bottom: 2px solid var(--border);
}

.modal-header h2 {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text);
}

/* ===== MODAL İÇERİK ===== */
.fd-date {
  text-align: center;
  font-weight: 700;
  color: var(--text-light);
  font-size: 0.85rem;
  margin-bottom: 0.6rem;
}

.fd-cal-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.fd-meal-group {
  margin-top: 0.8rem;
  padding: 0.6rem;
  background: #faf5ff;
  border-radius: var(--radius-sm);
}

.fd-meal-group h4 {
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: var(--purple);
}

.fd-meal-item {
  display: flex;
  justify-content: space-between;
  padding: 0.3rem 0;
  font-size: 0.83rem;
  border-bottom: 1px solid #f0e6ff;
}

.fd-meal-item:last-child {
  border-bottom: none;
}

/* ===== MOTİVASYON İLETİSİ ===== */
.modal-message-section {
  margin-top: 1.2rem;
  padding-top: 1rem;
  border-top: 2px solid var(--border);
}

.modal-message-section h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
}

.message-input-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}

.message-input-row input {
  flex: 1;
  padding: 0.6rem 0.8rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.message-input-row input:focus {
  outline: none;
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(196, 77, 255, 0.1);
}

.quick-messages {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.quick-messages button {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--card);
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quick-messages button:hover {
  transform: scale(1.15);
  border-color: var(--purple);
  box-shadow: 0 4px 12px rgba(196, 77, 255, 0.2);
}

/* ===== STORY BAR ===== */
.story-bar {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 0.8rem 0;
  box-shadow: 0 2px 12px rgba(45, 27, 105, 0.06);
}

.story-bar-inner {
  display: flex;
  gap: 0.8rem;
  overflow-x: auto;
  padding: 0 1rem;
  scrollbar-width: none;
  -ms-overflow-style: none;
  max-width: 900px;
  margin: 0 auto;
}

.story-bar-inner::-webkit-scrollbar {
  display: none;
}

.story-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  cursor: pointer;
  flex-shrink: 0;
}

.story-ring {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, var(--pink), var(--purple), var(--orange));
  transition: transform 0.2s;
}

.story-ring:hover {
  transform: scale(1.08);
}

.story-ring.add {
  background: linear-gradient(135deg, #e0e0e0, #c0c0c0);
}

.story-ring.mine {
  background: linear-gradient(135deg, var(--mint), var(--purple));
}

.story-avatar-wrap {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--card);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.story-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.story-avatar-placeholder {
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0e6ff;
  color: var(--purple);
}

.story-plus {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  color: white;
  font-size: 0.9rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--card);
}

.story-username {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text);
  max-width: 64px;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ===== STORY VIEWER ===== */
.story-viewer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.story-viewer.hidden {
  display: none !important;
}

.story-viewer-inner {
  position: relative;
  width: 100%;
  max-width: 420px;
  height: 100%;
  max-height: 750px;
  border-radius: 16px;
  overflow: hidden;
  background: #111;
  display: flex;
  flex-direction: column;
}

.story-viewer-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  padding: 0.6rem 0.8rem;
  background: linear-gradient(to bottom, rgba(0,0,0,0.6), transparent);
}

.story-progress-bar {
  display: flex;
  gap: 3px;
  margin-bottom: 0.6rem;
}

.story-progress-segment {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: rgba(255,255,255,0.3);
  overflow: hidden;
}

.story-progress-segment .story-progress-fill {
  height: 100%;
  background: white;
  border-radius: 2px;
  width: 0%;
}

.story-progress-segment.done .story-progress-fill {
  width: 100%;
}

.story-progress-segment.active .story-progress-fill {
  width: 100%;
  animation: storyProgress 5s linear forwards;
}

@keyframes storyProgress {
  from { width: 0%; }
  to { width: 100%; }
}

.story-viewer-user {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.story-viewer-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid white;
}

.story-viewer-username {
  color: white;
  font-weight: 700;
  font-size: 0.9rem;
}

.story-viewer-time {
  color: rgba(255,255,255,0.6);
  font-size: 0.75rem;
}

.story-close-btn {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.2);
  color: white;
  font-size: 1.1rem;
  cursor: pointer;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.story-close-btn:hover {
  background: rgba(255,255,255,0.4);
}

.story-viewer-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.story-nav-left,
.story-nav-right {
  position: absolute;
  top: 60px;
  bottom: 60px;
  width: 40%;
  cursor: pointer;
  z-index: 5;
}

.story-nav-left {
  left: 0;
}

.story-nav-right {
  right: 0;
}

.story-delete-btn {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.5rem 1.2rem;
  border: none;
  border-radius: 12px;
  background: rgba(255, 75, 75, 0.85);
  color: white;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  z-index: 15;
  transition: all 0.2s;
  backdrop-filter: blur(4px);
}

.story-delete-btn:hover {
  background: rgba(255, 50, 50, 1);
  transform: translateX(-50%) scale(1.05);
}

.story-delete-btn.hidden {
  display: none;
}

/* ===== STORY VIEWERS ===== */
.sv-viewers-toggle {
  position: absolute;
  bottom: 3.5rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.4rem 1rem;
  border-radius: 20px;
  background: rgba(255,255,255,0.15);
  color: white;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  z-index: 15;
  backdrop-filter: blur(4px);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.sv-viewers-toggle:hover {
  background: rgba(255,255,255,0.25);
}

.sv-viewers-toggle.hidden {
  display: none;
}

.sv-viewers-panel {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 55%;
  background: rgba(20,20,20,0.95);
  border-radius: 16px 16px 0 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(10px);
  animation: slideUp 0.25s ease;
}

.sv-viewers-panel.hidden {
  display: none;
}

@keyframes slideUp {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.sv-viewers-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  color: white;
  font-weight: 700;
  font-size: 0.9rem;
}

.sv-viewers-header button {
  background: none;
  border: none;
  color: rgba(255,255,255,0.6);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.2rem;
}

.sv-viewers-list {
  overflow-y: auto;
  padding: 0.5rem 0;
  flex: 1;
}

.sv-viewer-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.5rem 1rem;
}

.sv-viewer-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.sv-viewer-avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.1);
  font-size: 1rem;
}

.sv-viewer-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.sv-viewer-name {
  color: white;
  font-weight: 600;
  font-size: 0.85rem;
}

.sv-viewer-time {
  color: rgba(255,255,255,0.5);
  font-size: 0.72rem;
}

/* ===== STORY REPLY BAR ===== */
.sv-reply-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.8rem;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(10px);
  z-index: 15;
}

.sv-reply-bar.hidden {
  display: none;
}

.sv-reply-input {
  flex: 1;
  padding: 0.5rem 0.8rem;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.1);
  color: white;
  font-family: inherit;
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.2s;
}

.sv-reply-input::placeholder {
  color: rgba(255,255,255,0.4);
}

.sv-reply-input:focus {
  border-color: rgba(255,255,255,0.5);
}

.sv-reply-send {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 20px;
  background: linear-gradient(135deg, #7c4dff, #e040fb);
  color: white;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  transition: opacity 0.2s;
  white-space: nowrap;
}

.sv-reply-send:hover {
  opacity: 0.85;
}

/* ===== STORY REPLY IN NOTIFICATIONS ===== */
.friend-message-card.story-reply {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  border-left-color: var(--orange);
  padding-right: 2rem;
}

.msg-story-thumbnail {
  width: 42px;
  height: 56px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}

.msg-content {
  flex: 1;
  min-width: 0;
}

.msg-story-label {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--orange);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.15rem;
}

/* ===== STORY DURATION SELECT ===== */
.story-duration-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
  justify-content: center;
}

.story-duration-wrap label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary, #666);
}

.story-duration-select {
  padding: 0.35rem 0.7rem;
  border-radius: 8px;
  border: 1px solid var(--border-color, #ddd);
  background: var(--card-bg, #fff);
  color: var(--text-primary, #333);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
}

.story-duration-select:focus {
  border-color: var(--primary-color, #7c4dff);
}

/* ===== STORY TEXT OVERLAY ===== */
.story-text-overlay {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  text-align: center;
  z-index: 5;
  cursor: grab;
  user-select: none;
  pointer-events: auto;
  padding: 0 10px;
  word-break: break-word;
}

.story-text-overlay:active {
  cursor: grabbing;
}

.story-text-overlay.hidden {
  display: none;
}

.story-text-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.5);
  color: white;
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  backdrop-filter: blur(4px);
}

.story-text-btn:hover {
  background: rgba(0,0,0,0.7);
}

.story-text-btn.hidden {
  display: none;
}

.story-text-editor {
  padding: 0.6rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.story-text-editor.hidden {
  display: none;
}

.story-text-input {
  width: 100%;
  padding: 0.5rem 0.8rem;
  border-radius: 10px;
  border: 2px solid var(--border, #ddd);
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  background: var(--card, #fff);
  color: var(--text, #333);
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.story-text-input:focus {
  border-color: var(--purple, #7c4dff);
}

.story-text-styles {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.story-style-btn {
  padding: 0.3rem 0.65rem;
  border-radius: 16px;
  border: 2px solid var(--border, #ddd);
  background: var(--card, #fff);
  color: var(--text, #333);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.story-style-btn.active {
  border-color: var(--purple, #7c4dff);
  background: var(--purple, #7c4dff);
  color: white;
}

.story-style-btn:hover:not(.active) {
  border-color: var(--purple, #7c4dff);
}

/* Stil önizlemeleri */
.story-style-btn[data-style="bold"] {
  font-weight: 900;
}

.story-style-btn[data-style="neon"] {
  color: #00cc6a;
}

.story-style-btn[data-style="neon"].active {
  background: #00cc6a;
  border-color: #00cc6a;
  color: white;
  box-shadow: 0 0 8px rgba(0,204,106,0.4);
}

.story-style-btn[data-style="cursive"] {
  font-style: italic;
  font-family: Georgia, serif;
}

.story-text-editor-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}

.story-text-editor-actions .story-text-remove {
  font-size: 0.8rem;
  padding: 0.3rem 0.8rem;
}

.story-text-editor-actions .story-text-done {
  font-size: 0.8rem;
  padding: 0.3rem 0.8rem;
}

/* ===== STORY UPLOAD MODAL ===== */
.story-upload-card {
  max-width: 420px;
}

.story-upload-preview-wrap {
  width: 100%;
  aspect-ratio: 3 / 4;
  max-height: 400px;
  border-radius: var(--radius-sm);
  background: #f5f0ff;
  border: 2px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 1rem;
  position: relative;
}

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

.story-upload-placeholder {
  color: var(--text-light);
  font-size: 1.1rem;
  font-weight: 600;
}

.story-upload-actions {
  display: flex;
  gap: 0.6rem;
}

.story-upload-actions .btn-secondary,
.story-upload-actions .btn-primary {
  flex: 1;
}

.story-cam-btn {
  background: linear-gradient(135deg, var(--purple), var(--pink)) !important;
  color: white !important;
  border: none !important;
}

/* ===== STORY KAMERA ===== */
.story-camera-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  max-height: 400px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #111;
  margin-bottom: 1rem;
}

.story-camera-wrap.hidden {
  display: none;
}

.story-camera-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}

.story-camera-capture {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 4px solid white;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  font-size: 1.4rem;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  transition: transform 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.story-camera-capture:hover {
  transform: translateX(-50%) scale(1.08);
}

.story-camera-capture:active {
  transform: translateX(-50%) scale(0.95);
}

.story-camera-flip {
  position: absolute;
  bottom: 1.2rem;
  right: 1rem;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(4px);
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.story-camera-flip:hover {
  background: rgba(255,255,255,0.35);
  transform: rotate(180deg);
}

.story-camera-cancel {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.5);
  color: white;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.story-camera-cancel:hover {
  background: rgba(255, 75, 75, 0.8);
}

/* ===== RESPONSIVE (STORY) ===== */
@media (max-width: 600px) {
  .story-viewer-inner {
    max-width: 100%;
    max-height: 100%;
    border-radius: 0;
  }

  .story-ring {
    width: 56px;
    height: 56px;
  }

  .story-bar-inner {
    gap: 0.6rem;
    padding: 0 0.6rem;
  }
}
