/* 
  FutbolAnaliz - Mobile-First & Visual Micro-Animations CSS System
  Kural #2, #3, #4, #8, #9, #10, #18 Uyumlu
  Fontlar: Roboto (Başlıklar & Oranlar) & Open Sans (Gövde & Formlar)
*/

@import url('https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,400;0,600;0,700;1,400&family=Roboto:wght@500;700;900&display=swap');

/* --- 1. TEMA DEĞİŞKENLERİ --- */
:root {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-card-alt: #f1f5f9;
  --bg-border: #e2e8f0;
  --text-primary: #0f172a;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  
  --accent-blue: #2563eb;
  --accent-blue-bg: #dbeafe;
  --accent-green: #059669;
  --accent-green-bg: #d1fae5;
  --accent-gold: #d97706;
  --accent-gold-bg: #fef3c7;
  --accent-red: #dc2626;
  --accent-red-bg: #fee2e2;

  --font-heading: 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --shadow-sm: 0 2px 4px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 6px 16px -2px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 28px -4px rgba(37, 99, 235, 0.12);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --container-width: 1200px;
}

[data-theme="dark"] {
  --bg-primary: #070c18;
  --bg-secondary: #0f172a;
  --bg-card: #141e33;
  --bg-card-alt: #1a2744;
  --bg-border: #233354;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --accent-blue: #3b82f6;
  --accent-blue-bg: #1e3a8a;
  --accent-green: #10b981;
  --accent-green-bg: #064e3b;
  --accent-gold: #f59e0b;
  --accent-gold-bg: #78350f;
  --accent-red: #ef4444;
  --accent-red-bg: #7f1d1d;

  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5);
}

/* --- 2. TEMEL SIFIRLAMA & TIPOGRAFİ --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6, .font-heading {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

p {
  margin-bottom: 1rem;
}

a {
  color: var(--accent-blue);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--text-primary);
}

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1rem;
}

/* --- 3. DOKUNMA DOSTU BUTONLAR & ☀️/🌙 SWİTCH MODE --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.625rem 1.25rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
}

.btn-primary {
  background-color: var(--accent-blue);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
  background-color: #1d4ed8;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
}

.btn-secondary {
  background-color: var(--bg-card-alt);
  color: var(--text-primary);
  border-color: var(--bg-border);
}

.btn-secondary:hover {
  background-color: var(--bg-border);
  transform: translateY(-2px);
}

/* ☀️ / 🌙 Switch Mode Toggle Button */
.theme-switch-btn {
  position: relative;
  width: 60px;
  height: 34px;
  background-color: var(--bg-card-alt);
  border: 1px solid var(--bg-border);
  border-radius: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px;
  overflow: hidden;
  transition: background-color 0.3s ease;
}

.switch-icon {
  font-size: 14px;
  z-index: 1;
  user-select: none;
}

.switch-handle {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 26px;
  height: 26px;
  background-color: var(--accent-blue);
  border-radius: 50%;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 2;
}

[data-theme="dark"] .switch-handle {
  transform: translateX(26px);
  background-color: var(--accent-gold);
}

/* --- 4. HEADER & NAVIGASYON --- */
.site-header {
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--bg-border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.logo-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--text-primary);
}

.logo-badge {
  background: var(--accent-green-bg);
  color: var(--accent-green);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  animation: pulseBadge 2.5s infinite;
}

@keyframes pulseBadge {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
  70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.main-nav {
  display: none;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.nav-link {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 0.5rem 0;
  position: relative;
  transition: color 0.2s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent-blue);
  transition: width 0.25s ease;
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

.nav-link:hover, .nav-link.active {
  color: var(--accent-blue);
}

.mobile-menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 0.75rem;
  background: var(--bg-card-alt);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}

.mobile-nav-drawer {
  position: fixed;
  top: 70px;
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--bg-border);
  padding: 1rem;
  display: none;
  flex-direction: column;
  gap: 1rem;
  z-index: 99;
  box-shadow: var(--shadow-md);
  transform: translateY(-10px);
  opacity: 0;
  transition: all 0.25s ease;
}

.mobile-nav-drawer.open {
  display: flex;
  transform: translateY(0);
  opacity: 1;
}

/* --- 5. HERO ALANI & GÖRSEL KARTLAR --- */
.hero-section {
  padding: 3.5rem 0 3rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--bg-border);
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
}

.hero-title {
  font-size: 2.2rem;
  margin-bottom: 1.25rem;
  letter-spacing: -0.03em;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 1.75rem;
}

/* Yüksek Kalite Görsel Kart Kapsayıcı */
.hero-image-wrapper {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--bg-border);
  box-shadow: var(--shadow-lg);
  transform: perspective(1000px) rotateY(-3deg) rotateX(2deg);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.hero-image-wrapper:hover {
  transform: perspective(1000px) rotateY(0deg) rotateX(0deg) scale(1.02);
  box-shadow: 0 16px 36px rgba(37, 99, 235, 0.25);
}

.hero-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.hero-image-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(7, 12, 24, 0.95), transparent);
  padding: 1.5rem;
  color: #ffffff;
}

/* Yüzen Görsel Animasyonu */
.float-animation {
  animation: floatAnim 4s ease-in-out infinite;
}

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

/* --- 6. İDDAA BANKO TAHMİNLERİ VE YAKLAŞAN MAÇLAR --- */
.section-padding {
  padding: 3rem 0;
}

.section-header {
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.matches-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.match-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
}

.match-card:hover {
  border-color: var(--accent-blue);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.match-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.match-teams {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.team-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
}

.match-card.locked-card {
  background: var(--bg-card-alt);
  border-style: dashed;
  border-color: var(--accent-gold);
}

.locked-overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
  text-align: center;
  gap: 0.5rem;
}

.lock-badge {
  background: var(--accent-gold-bg);
  color: var(--accent-gold);
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.85rem;
}

/* --- 7. CANLI MAÇ ANALİZİ DASHBOARD & MİKRO-ANİMASYONLAR --- */
.dashboard-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.live-alert-banner {
  background: var(--accent-red-bg);
  color: var(--accent-red);
  border: 1px solid var(--accent-red);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  animation: pulseAlert 2s infinite;
}

@keyframes pulseAlert {
  0% { transform: scale(1); }
  50% { transform: scale(1.01); }
  100% { transform: scale(1); }
}

.top-picks-banner {
  background: var(--accent-gold-bg);
  border: 1px solid var(--accent-gold);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 1rem;
}

.top-picks-title {
  color: var(--accent-gold);
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.stats-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.stats-table th, .stats-table td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--bg-border);
  text-align: center;
}

.stats-table th {
  background: var(--bg-card-alt);
  font-family: var(--font-heading);
  color: var(--text-secondary);
}

/* Kaydırma ile Ekran Açılış Animasyonu (Scroll Reveal) */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- 8. WHATSAPP FLOATING WIDGET --- */
.whatsapp-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background-color: #25d366;
  border-radius: 50%;
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.4);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.whatsapp-widget:hover {
  transform: scale(1.12);
}

.whatsapp-icon {
  width: 32px;
  height: 32px;
  fill: #ffffff;
}

/* --- 9. FOOTER --- */
.site-footer {
  margin-top: auto;
  background: var(--bg-secondary);
  border-top: 1px solid var(--bg-border);
  padding: 3rem 0 1.5rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-bottom {
  border-top: 1px solid var(--bg-border);
  padding-top: 1.5rem;
  text-align: center;
}

/* --- 10. MEDIA QUERIES (DESKTOP & TABLET) --- */
@media (min-width: 768px) {
  .main-nav {
    display: block;
  }
  .mobile-menu-toggle {
    display: none;
  }
  .hero-grid {
    grid-template-columns: 1.1fr 0.9fr;
  }
  .hero-title {
    font-size: 2.8rem;
  }
  .matches-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .dashboard-container {
    grid-template-columns: 360px 1fr;
  }
  .footer-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Motion-reduced Preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
