:root {
  --accent: #3b82f6;
  --danger: #e5484d;
  /* clean red, not aggressive */
  --radius: 14px;
  --header-height: 90px;
}

[data-i18n] {
  transition: color 0.2s ease;
}

/* ===== THEMES ===== */
body.dark {
  --bg: #0b1220;
  --card: #111a2e;
  --text: #e5e7eb;
  --muted: #9ca3af;
  /* ===== PRICING GROUP COLORS ===== */
  --unlimited-bg: linear-gradient(180deg, #0f1f3a, #0b1220);
  --limited-bg: linear-gradient(180deg, #22163d, #0b1220);
  --vip-bg: linear-gradient(180deg, #2a2408, #0b1220);
}

body.light {
  --bg: #ffffff;
  --card: #f3f4f6;
  --text: #000000;
  --muted: #4b5563;
  /* ===== PRICING GROUP COLORS ===== */
  --unlimited-bg: linear-gradient(180deg, #e8f1ff, #ffffff);
  --limited-bg: linear-gradient(180deg, #f2e9ff, #ffffff);
  --vip-bg: linear-gradient(180deg, #fff6d6, #ffffff);
}

/* ===== GLOBAL ===== */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, system-ui, sans-serif;
  background: linear-gradient(135deg, var(--bg), var(--card));
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* ===== HEADER ===== */
header {
  position: fixed;
  /* sticky yerine fixed */
  top: 0;
  left: 0;
  /* Tam genişlik için gerekli */
  z-index: 1000;
  width: 100%;
  height: var(--header-height);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  transition: background 0.3s ease, border-color 0.3s ease;
}

body.dark header {
  background: rgba(11, 18, 32, 0.75);
  --border-color: rgba(255, 255, 255, 0.05);
}

body.light header {
  background: rgba(239, 238, 240, 0.9);
  --border-color: rgba(0, 0, 0, 0.05);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  gap: 20px;
}

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  height: 90px;
  width: auto;
  transition: transform 0.3s ease;
}

.logo:hover img {
  transform: scale(1.03);
}

/* ===== MENU ===== */
.menu {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-link {
  text-decoration: none;
  color: var(--muted);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  transition: color 0.3s ease;
  padding: 5px 0;
  text-align: center;
}

.nav-link:hover {
  color: var(--text);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%; /* Çizgiyi tam ortaya alır */
  transform: translateX(-50%); /* Çizginin ortadan iki yana doğru büyümesini sağlar */
  width: 0%;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
  border-radius: 2px;
}

.nav-link:hover::after {
  width: 100%;
}

/* ===== CONTROLS ===== */
.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Temiz Tema Butonu */
.control-btn {
  background: var(--card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text);
  font-size: 1.1rem;
  transition: all 0.2s ease;
}

.control-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

/* Modern Dil Seçici */
.lang-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0 12px;
  height: 38px;
  transition: all 0.2s ease;
  flex-shrink: 0;
  min-width: 115px;
}

.lang-wrapper:hover {
  border-color: var(--accent);
}

.lang-icon {
  position: absolute;
  left: 12px;
  color: var(--muted);
  font-size: 0.9rem;
  pointer-events: none;
}

.language-select {
  appearance: none;
  background: transparent;
  border: none;
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  outline: none;
  width: 100%;
  height: 100%;
  padding: 0 12px 0 32px;
}

.language-select option {
  background: var(--card);
  color: var(--text);
}

.login-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent);
  border: 1px solid rgba(59, 130, 246, 0.25);
  padding: 8px 16px;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.login-btn:hover {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 6px 15px rgba(59, 130, 246, 0.3);
  transform: translateY(-2px);
}

/* ===== MAIN ===== */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  gap: 60px;
  padding: 60px 20px;
  padding-top: calc(var(--header-height) + 60px);
  /* Header'ın üstünü kapatmaması için eklendi */
}

.hero {
  text-align: center;
  max-width: 600px;
}

.hero h1 {
  font-size: 35px;
  margin-bottom: 12px;
}

.hero p {
  font-size: 18px;
  margin-bottom: 28px;
}

.cta {
  display: inline-block;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
  padding: 14px 28px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
}

.features {
  display: flex;
  flex-direction: row;
  /* stack feature cards vertically */
  align-items: center;
  gap: 30px;
}

.feature-card {
  width: 100%;
  max-width: 350px;
  text-align: center;
  padding: 30px 20px;
  border-radius: 16px;
  background-color: var(--card);
  border: 1px solid var(--border-color);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

.feature-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.feature-icon {
  font-size: 1.5rem;
  color: var(--accent);
  margin-bottom: 15px;
}

.pricing-preview {
  text-align: center;
  max-width: 600px;
}

.pricing-preview a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ===== FOOTER ===== */
footer {
  padding: 20px 40px;
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr auto 1fr; /* Sol, Orta, Sağ olarak ekranı 3'e böler */
  align-items: center;
  gap: 20px;
}

.footer-legal {
  font-size: 13px;
  display: flex;
  align-items: center;
  flex-wrap: wrap; /* Sığmazsa kendi içinde kırılsın */
  gap: 6px;
  justify-self: start; /* LTR dillerinde sola, RTL dillerinde otomatik sağa yaslar */
}

.footer-legal a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-legal a:hover {
  color: var(--text);
}

.footer-sep {
  color: var(--muted);
}

.footer-text {
  text-align: center;
  font-size: 14px;
  color: var(--muted);
  grid-column: 2; /* Her zaman ekranın tam ortasındaki (2.) sütunda durur */
}

/* ===== RTL ===== */
html[dir="rtl"] {
  direction: rtl;
}

html[dir="rtl"] .logo img {
  padding-right: 0%;
}

/*-- Hide hamburger on desktop --*/
.hamburger {
  display: none;
  font-size: 20px;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
}

/* ===== MOBILE HAMBURGER (Animated) ===== */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1002;
}

.hamburger .bar {
  height: 2px;
  width: 100%;
  background-color: var(--text);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Tıklandığında Çarpı (X) Olma Animasyonu */
.hamburger.active .bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.hamburger.active .bar:nth-child(2) {
  opacity: 0;
}

.hamburger.active .bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ===== MOBILE QUERIES ===== */
@media (max-width: 1100px) {
  .hamburger {
    display: flex;
  }

  /* Telefondan girince login yazısını gizler, sadece ikonu bırakır yer kazandırır */
  .login-text {
    display: none;
  }

  .login-btn {
    padding: 8px 12px;
  }

  nav.menu {
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    flex-direction: column !important;
    background: var(--card);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    padding: 0;
    gap: 0;

    /* Yumuşak açılma animasyonu */
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.3s ease;
  }

  nav.menu.active {
    max-height: 500px;
    opacity: 1;
    padding: 10px 0;
  }

  .nav-link {
    width: 100%;
    padding: 15px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
  }

  .nav-link::after {
    display: none;
    /* Mobilde çizgiyi kaldırır */
  }

  .nav-link:hover {
    background: rgba(59, 130, 246, 0.05);
  }
}

@media (max-width: 600px) {
  .header-actions {
    gap: 12px;
  }

  /* ===== MOBİL DİL SEÇİCİ DÜZELTMESİ (Invisible Overlay) ===== */
  .lang-wrapper {
    width: 38px;
    min-width: 38px;
    /* Tema butonu ile aynı kare boyuta getiriyoruz */
    padding: 0;
    justify-content: center;
    /* İkonu tam merkeze alıyoruz */
  }

  .lang-icon {
    position: static;
    margin: 0;
    /* Yazı kalktığı için yandaki boşluğa gerek yok */
    font-size: 1.1rem;
    color: var(--text);
    /* İkonu daha belirgin yapıyoruz */
  }

  .language-select {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    /* Metni ve oku tamamen görünmez yapıyoruz ama dokunulabilir kalıyor */
    font-size: 16px;
    /* ÖNEMLİ: iOS Safari'de menüye tıklayınca ekranın otomatik zoom yapmasını engeller */
    cursor: pointer;
    padding: 0;
  }

  .language-select option {
    font-size: 1rem;
    color: var(--text);
  }

  /* ===== RTL ===== */
  html[dir="rtl"] .lang-icon {
    left: auto;
    right: auto;
  }

  html[dir="rtl"] .language-select {
    padding: 0;
  }

  html[dir="rtl"] .nav-link::after {
    left: auto;
    right: 0;
  }
}

@media (max-width: 900px) {
  footer {
    padding-bottom: 100px;
    grid-template-columns: 1fr; /* Mobilde grid'i tek sütuna düşürür, her şeyi alt alta alır */
    gap: 12px;
  }

  .footer-legal {
    justify-self: center;
    justify-content: center;
    margin-bottom: 0;
  }

  .footer-text {
    grid-column: 1;
    text-align: center;
    font-size: 13px;
  }

  .features {
    display: flex;
    flex-direction: column;
    /* stack feature cards vertically */
    align-items: center;
    gap: 30px;
  }

  .feature-card {
    width: 100%;
    max-width: 400px;
    text-align: center;
    padding: 5px;
    border-radius: 12px;
    background-color: var(--card);
  }

}

/* ===== AUTH (LOGIN / SIGNUP / LOGOUT) ===== */

.auth-page {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px 10px;
}

.auth-card {
  width: 100%;
  width: min(90vw, 500px);
  background: var(--card);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  text-align: center;
}

.auth-card h1 {
  margin-bottom: 8px;
}

.auth-subtitle {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 24px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-form label {
  text-align: left;
  font-size: 13px;
}

.auth-form input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--muted);
  background: transparent;
  color: var(--text);
}

.login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: -3px 0;
}

.auth-submit {
  margin-top: 12px;
  padding: 12px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.auth-links {
  margin-top: 20px;
  font-size: 13px;
  color: var(--muted);
}

.auth-links a {
  color: var(--accent);
  margin-left: 6px;
  text-decoration: none;
}

.auth-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.auth-error {
  font-size: 14px;
  color: #ef4444;
  min-height: 16px;
}

.auth-success {
  color: #22c55e;
  font-size: 14px;
  text-align: center;
}

.hidden {
  display: none;
}

.terms-row {
  display: flex;
  align-items: center;
  gap: 6px;
  /* small, controlled gap */
  font-size: 13px;
  cursor: pointer;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.terms-row input[type="checkbox"] {
  margin: 0;
  padding: 0;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  /* prevent spacing expansion */
}

.terms-row span,
.terms-row a {
  display: inline;
  line-height: 1.2;
  /* align text vertically with checkbox */
}

.terms-row a {
  color: var(--accent);
  text-decoration: none;
}

.terms-row a:hover {
  text-decoration: underline;
}

/* Logout message at the center of the screen */
.auth-overlay {
  position: fixed;
  inset: 0;
  /* top:0 right:0 bottom:0 left:0 */
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  z-index: 9999;
}

/* Hide by default */
.auth-overlay.hidden {
  display: none;
}

/* --- RESEND LINK BUTTON STATES --- */
button.auth-link {
  background: transparent;
  border: none;
  color: var(--accent);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  transition: opacity 0.3s ease, color 0.3s ease;
}

button.auth-link:hover {
  color: var(--accent-hover);
}

/* Sayaç sayarken veya limit aşıldığında soluk görünür */
button.auth-link:disabled {
  color: var(--muted);
  text-decoration: none;
  cursor: not-allowed;
  opacity: 0.6;
}

/* ===== RTL ===== */
html[dir="rtl"] .auth-form label {
  text-align: right;
}

/* ===== EMAIL VERIFICATION ===== */

.verify-view {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.verify-view h1 {
  margin-bottom: 6px;
}

.verify-subtitle {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 12px;
}

.verify-input {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--muted);
  background: transparent;
  color: var(--text);
  font-size: 15px;
  text-align: center;
  letter-spacing: 3px;
}

.code-inputs {
  display: flex;
  gap: 6px;
  justify-content: center;
}

.code-inputs input {
  width: 42px;
  height: 48px;
  text-align: center;
  font-size: 18px;
  border-radius: 8px;
  border: 1px solid var(--muted);
  background: transparent;
  color: var(--text);
}

.verify-hint {
  font-size: 13px;
  color: var(--muted);
  text-align: left;
}

.verify-timer {
  font-size: 13px;
  color: var(--muted);
  text-align: left;
}

.verify-submit {
  margin-top: 10px;
  padding: 12px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.verify-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Back button */
.verify-back {
  margin-top: 16px;
  background: none;
  border: none;
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
}

.verify-back:hover {
  text-decoration: underline;
}

.auth-secondary {
  background: transparent;
  font-size: 14px;
  color: var(--text);
}

/* Resend button */
.auth-link {
  background: none;
  border: none;
  padding: 0;
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
}

.auth-link:hover {
  text-decoration: underline;
}

/* Fade transition */
.fade-out {
  opacity: 0;
  transition: opacity 0.4s ease;
}

/* Spinner */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--muted);
  border-top-color: var(--accent);
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Shake animation (error) */
.shake {
  animation: shake 0.4s;
}

@keyframes shake {
  0% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-5px);
  }

  50% {
    transform: translateX(5px);
  }

  75% {
    transform: translateX(-5px);
  }

  100% {
    transform: translateX(0);
  }
}

/* =========================================
   SUCCESS / VERIFICATION PAGE
========================================= */

.success-card {
  padding: 50px 30px;
  text-align: center;
  max-width: 500px;
}

.success-icon-wrapper {
  font-size: 4.5rem;
  color: #10b981;
  /* Premium zümrüt yeşili */
  margin-bottom: 25px;
  /* İkonun etrafına hafif, şık bir yeşil parlama verir */
  filter: drop-shadow(0 0 20px rgba(16, 185, 129, 0.35));
  /* Yaylanarak ekrana girme animasyonu */
  animation: popInSuccess 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.success-desc {
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 35px;
  color: var(--muted);
}

/* Vurgulu (strong/b) kelimelerin sitenin temasıyla uyumlu görünmesi için */
.success-desc strong,
.success-desc b {
  color: var(--text);
  font-weight: 600;
}

.success-actions {
  margin-top: 10px;
}

/* Animasyon Keyframes */
@keyframes popInSuccess {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* ===== RTL ===== */

html[dir="rtl"] .success-desc {
  line-height: 1.8;
}

/* =========================================
   PAYMENT SUCCESS PAGE ADDITIONS
========================================= */
.processing-note {
  font-size: 0.85rem;
  color: var(--warning);
  /* Projedeki standart sarı/uyarı rengi */
  margin-bottom: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  /* RTL'de yönü otomatik ayarlar */
}

.btn-dashboard {
  text-align: center;
}

/* ================= COOKIE BANNER ================= */
.cookie-banner {
  position: fixed;
  bottom: 24px;
  left: 24px;
  max-width: 450px;
  background: var(--card);
  border: 1px solid rgba(59, 130, 246, 0.2);
  /* Accent renginin hafif şeffafı */
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
  z-index: 9999;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: slideUpCookie 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.cookie-banner.hide {
  animation: slideDownCookie 0.4s ease forwards;
}

.cookie-content {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.cookie-icon {
  color: var(--accent);
  font-size: 1.4rem;
  margin-top: 2px;
}

.cookie-content p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.5;
}

.cookie-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 15px;
}

.cookie-link {
  color: var(--muted);
  font-size: 0.85rem;
  text-decoration: underline;
  transition: color 0.2s;
}

.cookie-link:hover {
  color: var(--text);
}

.cookie-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 8px 24px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.cookie-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(59, 130, 246, 0.3);
}

@keyframes slideUpCookie {
  from {
    transform: translateY(100px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideDownCookie {
  from {
    transform: translateY(0);
    opacity: 1;
  }

  to {
    transform: translateY(100px);
    opacity: 0;
  }
}

/* ===== RTL  ===== */
html[dir="rtl"] .cookie-banner {
  left: auto;
  right: 24px;
}

html[dir="rtl"] .cookie-content {
  flex-direction: row-reverse;
  text-align: right;
}

html[dir="rtl"] .cookie-actions {
  justify-content: flex-start;
}

/* ===== MOBİL ===== */
@media (max-width: 600px) {
  .cookie-banner {
    bottom: 15px;
    left: 15px;
    right: 15px;
    max-width: 100%;
    padding: 16px;
  }

  .cookie-actions {
    justify-content: space-between;
  }
}

/* =========================================
   ERROR / EXPIRED TOKEN PAGE
========================================= */

.error-card {
  padding: 50px 30px;
  text-align: center;
  max-width: 500px;
}

.error-icon-wrapper {
  font-size: 4.5rem;
  color: var(--danger);
  margin-bottom: 25px;
  /* İkonun etrafına hafif kırmızı bir parlama (Drop shadow) verir */
  filter: drop-shadow(0 0 20px rgba(229, 72, 77, 0.35));
  /* Titreme animasyonu */
  animation: shakeError 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

.error-desc {
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 35px;
  color: var(--muted);
}

.btn-error {
  display: inline-block;
  padding: 12px 30px;
  text-decoration: none;
  text-align: center;
}

/* Hata ikonuna özel sarsıntı animasyonu */
@keyframes shakeError {

  10%,
  90% {
    transform: translate3d(-1px, 0, 0);
  }

  20%,
  80% {
    transform: translate3d(2px, 0, 0);
  }

  30%,
  50%,
  70% {
    transform: translate3d(-4px, 0, 0);
  }

  40%,
  60% {
    transform: translate3d(4px, 0, 0);
  }
}

/* ===== RTL ===== */
html[dir="rtl"] .error-desc {
  line-height: 1.8;
}

/* ===== SUCCESS & ERROR PAGES MOBILE ===== */
@media (max-width: 600px) {

  .success-card,
  .error-card {
    padding: 35px 20px;
    /* Mobilde o devasa iç boşlukları azalttık */
    margin: 0 15px;
    /* Ekran kenarlarına yapışmasını engeller */
  }

  .success-icon-wrapper,
  .error-icon-wrapper {
    font-size: 3.5rem;
    /* İkonları mobilde bir tık küçülttük */
    margin-bottom: 20px;
  }

  .success-desc,
  .error-desc {
    font-size: 0.95rem;
    /* Metni mobil ekran için optimize ettik */
    margin-bottom: 25px;
  }
}

/* =========================================
   MAIN SERVER ERROR PAGE
========================================= */

.server-error-card {
  padding: 50px 30px;
  text-align: center;
  max-width: 530px;
  /* Metin biraz uzun olduğu için kartı 30px genişlettik */
}

/* İkon Sarmalayıcı ve Animasyon */
.server-icon-wrapper {
  position: relative;
  display: inline-block;
  font-size: 4.5rem;
  color: var(--warning);
  /* Projedeki sarı/turuncu uyarı rengi */
  margin-bottom: 25px;
  filter: drop-shadow(0 0 25px rgba(250, 204, 21, 0.25));
  /* Hafifçe yukarı aşağı süzülme animasyonu */
  animation: floatServer 3s ease-in-out infinite;
}

/* Sunucu ikonunun köşesindeki küçük çark */
.server-icon-wrapper .overlay-icon {
  position: absolute;
  bottom: 0;
  right: -10px;
  font-size: 2rem;
  color: var(--text);
  background: var(--card);
  border-radius: 50%;
  padding: 2px;
  /* Çarkın yavaşça dönmesi, "işlem yapılıyor" hissi verir */
  animation: spinGear 4s linear infinite;
}

.server-desc {
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 35px;
  color: var(--muted);
}

.server-desc strong {
  color: var(--text);
  font-weight: 600;
}

/* Buton Düzeni (Yan Yana) */
.server-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
}

.btn-primary-action,
.btn-secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 25px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  flex: 1;
  /* Butonların eşit genişlikte olmasını sağlar */
}

.btn-secondary-action i {
  margin-right: 8px;
  font-size: 1.1rem;
}

/* --- Animasyon Keyframes --- */
@keyframes floatServer {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

@keyframes spinGear {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* ===== RTL (Arapça / Farsça) ===== */
html[dir="rtl"] .server-desc {
  line-height: 1.8;
}

html[dir="rtl"] .btn-secondary-action i {
  margin-right: 0;
  margin-left: 8px;
}

html[dir="rtl"] .server-icon-wrapper .overlay-icon {
  right: auto;
  left: -10px;
}

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 600px) {
  .server-error-card {
    padding: 35px 20px;
    margin: 0 15px;
  }

  .server-icon-wrapper {
    font-size: 3.5rem;
  }

  .server-icon-wrapper .overlay-icon {
    font-size: 1.5rem;
  }

  .server-desc {
    font-size: 0.95rem;
    margin-bottom: 25px;
  }

  /* Mobilde butonları alt alta al */
  .server-actions {
    flex-direction: column;
    gap: 12px;
  }

  .btn-primary-action,
  .btn-secondary-action {
    width: 100%;
    flex: none;
  }
}