/* Homepage Özel Stilleri - Tam Versiyon */

/* ================================
   HERO SECTION STYLES
================================ */

.hero-section {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

/* 12,692 Basamaklı Sayı Arka Plan */
.mega-number-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}

.mega-number-text {
  animation: shimmer 8s ease-in-out infinite;
  word-break: break-all;
  overflow-wrap: break-word;
  line-height: 1.3;
  font-family: 'JetBrains Mono', monospace;
  opacity: 0.08; /* Açık tema - eski değer */
}

/* Dark theme için daha parlak */
.dark .mega-number-text {
  opacity: 0.12;
}%;
  word-break: break-all;
  overflow-wrap: break-word;
  line-height: 1.2;
  font-family: 'JetBrains Mono', monospace;
}

@keyframes shimmer {
  0%, 100% {
    opacity: 0.06;
    transform: scale(1);
  }
  50% {
    opacity: 0.10;
    transform: scale(1.005);
  }
}

/* Dark theme için daha görünür - tekrarı kaldır */

.dark .mega-number-text {
  animation: shimmer-dark 8s ease-in-out infinite;
}

@keyframes shimmer-dark {
  0%, 100% {
    opacity: 0.15;
    transform: scale(1);
  }
  50% {
    opacity: 0.25;
    transform: scale(1.01);
  }
}

/* Ana Açıklama Metni Stilleri */
.main-explanation {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.main-explanation:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.dark .main-explanation:hover {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.vahid-section {
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.dark .vahid-section {
  border-color: rgba(99, 102, 241, 0.3);
}

/* Hero Animasyonları */
.hero-intro {
  animation: fade-in-down 1s ease-out;
}

.hero-title {
  animation: fade-in-up 1s ease-out 0.3s both;
}

.hero-nineteen {
  animation: scale-in 1.2s ease-out 0.5s both;
}

.hero-cta {
  animation: fade-in-up 1s ease-out 1.2s both;
}

/* Temel Animasyon Tanımları */
@keyframes fade-in-down {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scale-in {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* 19 Sayısı Animasyonları */
.nineteen-container {
  position: relative;
  display: inline-block;
}

.nineteen-main {
  position: relative;
  z-index: 2;
  font-family: 'Inter', sans-serif;
  font-weight: 900;
}

.nineteen-glow {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% {
    opacity: 0.3;
  }
  50% {
    opacity: 0.6;
  }
}

/* Hesaplama Balonları */
.calculation-orbit {
  animation: orbit 20s linear infinite;
}

.calculation-bubble {
  background-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  animation: float 4s ease-in-out infinite;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
  cursor: pointer;
}

.calculation-bubble:hover {
  background-color: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
  animation-play-state: paused;
}

.simple-calc {
  animation-delay: 0s;
}

.complex-calc {
  animation-delay: -2s;
}

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

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


/* Scroll Indicator kaldırıldı - artık gerek yok */

/* ================================
   WELCOME SECTION STYLES
================================ */

.welcome-section {
  position: relative;
}

.welcome-header {
  animation: fade-in-up 1s ease-out;
}

.welcome-content {
  animation: fade-in-up 1s ease-out 0.3s both;
}

.welcome-footer {
  animation: fade-in-up 1s ease-out 0.6s both;
}

/* İçerik Blokları */
.content-block,
.highlight-block,
.special-discovery,
.final-emphasis {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.content-block:hover,
.highlight-block:hover,
.special-discovery:hover,
.final-emphasis:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.dark .content-block:hover,
.dark .highlight-block:hover,
.dark .special-discovery:hover,
.dark .final-emphasis:hover {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

/* Özel Keşif Kutusu Animasyonları */
.special-discovery {
  position: relative;
  overflow: hidden;
}

.special-discovery::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, #4f46e5, #6366f1, #8b5cf6, #a855f7);
  background-size: 400% 400%;
  animation: gradient-border 3s ease infinite;
  border-radius: 1rem;
  z-index: -1;
}

@keyframes gradient-border {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* Buton Stilleri */
.btn-primary,
.btn-secondary {
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  white-space: nowrap; /* Yazıların üst üste binmesini engelle */
}

.btn-primary::before,
.btn-secondary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
  z-index: 1;
}

.btn-primary:hover::before,
.btn-secondary:hover::before {
  left: 100%;
}

.btn-primary span,
.btn-secondary span {
  position: relative;
  z-index: 2; /* İçeriği animasyonun üstünde tut */
}

.btn-primary:hover::before,
.btn-secondary:hover::before {
  left: 100%;
}

.btn-primary:hover,
.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

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

/* ================================
   RESPONSIVE DESIGN
================================ */

/* Large Desktop */
@media (min-width: 1280px) {
  .hero-section {
    padding: 4rem 0;
  }
  
  .container {
    max-width: 1200px;
  }
}

/* Desktop */
@media (min-width: 1024px) {
  .calculation-bubble {
    font-size: 1rem;
    padding: 0.75rem 1rem;
  }
  
  .welcome-content {
    padding: 0 2rem;
  }
}

/* Büyük desktop dışında her yerde orbital animasyonu kapat ama 19'u koru */
@media (max-width: 1023px) {
  .calculation-orbit {
    animation: none !important; /* Orbit animasyonunu durdur */
  }
  
  .calculation-bubble {
    display: none !important; /* Hesaplama balonlarını gizle */
  }
  
  /* 19'un kendi animasyonları mobilde de aktif kalacak */
  .nineteen-main,
  .nineteen-glow {
    /* Bu animasyonlar devam etsin */
  }
}

/* Tablet ve altı */
@media (max-width: 768px) {
  .hero-section {
    padding: 3rem 0;
    min-height: 100vh;
  }
  
  .nineteen-main,
  .nineteen-glow {
    font-size: 6rem !important;
  }
  
  .calculation-bubble {
    font-size: 0.75rem;
    padding: 0.375rem 0.5rem;
  }
  
  .mega-number-text {
    font-size: 0.5rem;
    line-height: 1.1;
    padding: 1rem;
  }
  
  .welcome-content {
    margin-top: 2rem;
  }
  
  .welcome-footer .flex {
    flex-direction: column;
    gap: 1rem;
  }
  
  .hero-title h1 {
    font-size: 3rem;
    line-height: 1.1;
  }
  
  .hero-title p {
    font-size: 1.1rem;
  }
  
  .special-discovery {
    padding: 1.5rem;
  }
  
  .special-discovery .text-6xl {
    font-size: 3rem;
  }

}

/* Mobil */
@media (max-width: 480px) {
  .hero-section {
    padding: 2rem 0;
  }
  
  .hero-title h1 {
    font-size: 2.5rem !important;
    line-height: 1.2;
  }
  
  .hero-title p {
    font-size: 1rem;
  }
  
  .nineteen-main,
  .nineteen-glow {
    font-size: 4rem !important;
  }
  
  .calculation-bubble {
    font-size: 0.625rem;
    padding: 0.25rem 0.375rem;
  }
  
  .calculation-bubble.complex-calc {
    display: none; /* Karmaşık hesaplamaları mobilde gizle */
  }
  
  
  .welcome-header h2 {
    font-size: 2rem !important;
  }
  
  .content-block,
  .highlight-block,
  .special-discovery,
  .final-emphasis {
    padding: 1.5rem;
  }
  
  .special-discovery .text-6xl {
    font-size: 2.5rem;
  }
  
  .hero-intro h3 {
    font-size: 1.5rem;
  }
  
  .hero-intro p {
    font-size: 1rem;
  }
}

/* ================================
   DARK THEME OVERRIDES
================================ */

.dark .mega-number-text {
  color: rgba(255, 255, 255, 0.05);
}

.dark .calculation-bubble {
  background-color: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border-color: rgba(255, 255, 255, 0.1);
}

.dark .calculation-bubble:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.dark .scroll-indicator .border-white\/30 {
  border-color: rgba(255, 255, 255, 0.3);
}

.dark .scroll-indicator .bg-white\/50 {
  background-color: rgba(255, 255, 255, 0.5);
}

.dark .scroll-indicator .text-white\/60 {
  color: rgba(255, 255, 255, 0.6);
}

/* ================================
   ACCESSIBILITY & PERFORMANCE
================================ */

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .mega-number-text,
  .nineteen-glow,
  .calculation-orbit,
  .calculation-bubble,
  .scroll-indicator,
  .hero-intro,
  .hero-title,
  .hero-nineteen,
  .hero-cta,
  .welcome-header,
  .welcome-content,
  .welcome-footer {
    animation: none !important;
  }
  
  .content-block:hover,
  .highlight-block:hover,
  .special-discovery:hover,
  .final-emphasis:hover,
  .btn-primary:hover,
  .btn-secondary:hover {
    transform: none !important;
  }
  
  .calculation-bubble:hover {
    transform: none !important;
  }
}

/* Focus states için accessibility */
.btn-primary:focus,
.btn-secondary:focus {
  outline: 2px solid rgba(59, 130, 246, 0.5);
  outline-offset: 2px;
}

.calculation-bubble:focus {
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: 2px;
}

.scroll-indicator:focus {
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .calculation-bubble {
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    border-color: white;
  }
  
  .dark .calculation-bubble {
    background-color: rgba(255, 255, 255, 0.9);
    color: black;
    border-color: black;
  }
  
  .special-discovery::before {
    animation: none;
    background: linear-gradient(45deg, #000, #fff);
  }
}

/* ================================
   UTILITY CLASSES
================================ */

.font-mono {
  font-family: 'JetBrains Mono', 'Monaco', 'Cascadia Code', 'Segoe UI Mono', 'Roboto Mono', 'Oxygen Mono', 'Ubuntu Monospace', 'Source Code Pro', 'Fira Mono', 'Droid Sans Mono', 'Courier New', monospace;
}

.bg-clip-text {
  -webkit-background-clip: text;
  background-clip: text;
}

.text-transparent {
  color: transparent;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Loading state için */
.loading {
  opacity: 0;
  pointer-events: none;
}

.loaded {
  opacity: 1;
  pointer-events: auto;
}

/* Animation state classes */
.animate-in {
  animation: fade-in-up 0.6s ease-out forwards;
}

/* Performance optimizations */
.hero-section,
.welcome-section {
  will-change: transform;
  transform: translateZ(0);
}

.calculation-orbit {
  will-change: transform;
}

.nineteen-main {
  will-change: transform;
}

/* Print styles */
@media print {
  .hero-section {
    background: white !important;
    color: black !important;
    page-break-inside: avoid;
  }
  
  .calculation-bubble,
  .scroll-indicator {
    display: none;
  }
  
  .mega-number-background {
    display: none;
  }
}

/* ================================
   FALLBACK STYLES
================================ */

.fallback-mode .hero-section {
  background: linear-gradient(135deg, #1e3a8a, #3730a3) !important;
}

.fallback-mode .calculation-bubble,
.fallback-mode .mega-number-background {
  display: none;
}

.animation-fallback * {
  animation: none !important;
  transition: none !important;
}

/* Besmele Section Styles */
.font-scheherazade {
  font-family: 'Scheherazade New', serif;
  direction: rtl;
}

.besmele-cards .bg-white:hover,
.besmele-cards .dark\:bg-gray-800:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
}

.dark .besmele-cards .bg-white:hover {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
  .besmele-cards {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}
/* Başlangıç Harfleri Section Özel Stilleri */
.baslangic-harfleri-section .font-scheherazade {
  font-family: 'Scheherazade New', serif;
  direction: rtl;
}

.baslangic-harfleri-section .example-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.dark .baslangic-harfleri-section .example-card:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* Tablo Stilleri */
.baslangic-harfleri-section .table-container table tbody tr:hover {
  background-color: rgba(79, 70, 229, 0.05);
}

.dark .baslangic-harfleri-section .table-container table tbody tr:hover {
  background-color: rgba(79, 70, 229, 0.1);
}

/* Responsive */
@media (max-width: 768px) {
  .baslangic-harfleri-section .table-container {
    font-size: 0.875rem;
  }
  
  .baslangic-harfleri-section .table-container th,
  .baslangic-harfleri-section .table-container td {
    padding: 0.5rem 0.25rem;
  }
  
  .baslangic-harfleri-section .example-card {
    padding: 1rem;
  }
}

@media (max-width: 480px) {
  .baslangic-harfleri-section .table-container {
    font-size: 0.75rem;
  }
  
  .baslangic-harfleri-section .table-container th,
  .baslangic-harfleri-section .table-container td {
    padding: 0.375rem 0.125rem;
  }
}
