/* ==========================================
   BOTAN ASLAN - PROMPT PANEL v4.0
   Light Bento & Glassmorphism Design
   Color Palette: #EEEEEE | #6FCF97 | #2FA084 | #1F6F5F
   ========================================== */

:root {
  --bg-main: #eeeeee;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-card-hover: rgba(255, 255, 255, 0.95);
  --border-card: rgba(255, 255, 255, 0.9);
  --border-subtle: rgba(47, 160, 132, 0.18);
  
  --primary: #2fa084;
  --primary-hover: #1f6f5f;
  --primary-light: #e6f6f2;
  --secondary: #6fcf97;
  
  --text-dark: #1a2220;
  --text-muted: #576562;
  --text-light: #8e9e9a;
  
  --shadow-sm: 0 10px 25px rgba(31, 111, 95, 0.06);
  --shadow-md: 0 16px 40px rgba(31, 111, 95, 0.12);
  --shadow-lg: 0 24px 60px rgba(31, 111, 95, 0.18);
  
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Outfit', 'Inter', sans-serif;
}

body {
  background: var(--bg-main);
  background-image: radial-gradient(at 10% 10%, rgba(111, 207, 151, 0.18) 0px, transparent 50%),
                    radial-gradient(at 90% 90%, rgba(47, 160, 132, 0.15) 0px, transparent 50%);
  color: var(--text-dark);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  text-decoration: none;
  color: inherit;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ================= HEADER ================= */
.header {
  background: rgba(238, 238, 238, 0.7);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(31, 111, 95, 0.03);
}

/* Top Bar: Logo & Socials */
.header-top {
  padding: 15px 0;
  border-bottom: 1px solid rgba(47, 160, 132, 0.08);
}

.top-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary);
  box-shadow: var(--shadow-sm);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-dark);
}

.brand-subtitle {
  font-size: 0.75rem;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
}

/* Social Icons */
.social-links {
  display: flex;
  gap: 10px;
}

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg-card);
  color: var(--primary);
  border: 1px solid var(--border-subtle);
  transition: all 0.3s;
}

.social-btn:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* Bottom Bar: Horizontal Text Menu */
.header-bottom {
  padding: 14px 0;
}

.story-menu {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scrollbar-width: none; /* Firefox */
  padding-bottom: 2px;
}

.story-menu::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.nav-pill {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  background: white;
  padding: 8px 20px;
  border-radius: 100px;
  border: 1px solid var(--border-card);
  transition: all 0.3s ease;
  white-space: nowrap;
  box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.nav-pill:hover, .nav-pill.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 4px 15px rgba(47, 160, 132, 0.2);
  transform: translateY(-2px);
}

/* ================= MAIN GRID ================= */
.main-content {
  flex: 1;
  padding: 30px 0 50px 0;
}

.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

/* Rigid Card Structure */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  height: 100%; /* Kartların aynı boyda olmasını garantiler */
}

.card:hover {
  transform: translateY(-6px);
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-md);
  border-color: rgba(255, 255, 255, 1);
}

/* Fixed Image Cropping */
.card-image-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9; /* SABİT EN BOY ORANI */
  overflow: hidden;
  background: var(--primary-light);
  flex-shrink: 0;
}

.card-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover; /* SIFIR BOZULMA, KIRPARAK SIĞDIR */
  transition: transform 0.6s ease;
}

.card:hover .card-image {
  transform: scale(1.05);
}

/* Badges */
.card-badges {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  gap: 6px;
  z-index: 2;
}

.badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 100px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.badge-featured {
  background: rgba(255, 255, 255, 0.9);
  color: var(--primary);
}

.badge-prompt {
  background: var(--primary);
  color: white;
}

.badge-tool {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(26, 34, 32, 0.85);
  color: white;
  z-index: 2;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 100px;
}

/* Fixed Content Layout */
.card-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1; /* Geri kalan yüksekliği doldur */
}

/* Fixed Title */
.card-title {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 12px;
  line-height: 1.3;
  color: var(--text-dark);
  
  /* Satır Sınırı: En fazla 2 satır, uzunsa 3 nokta */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 3.25rem; /* Sabit başlık yüksekliği */
}

/* Fixed Tags */
.card-tags {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  height: 24px; /* Sabit yükseklik */
  overflow: hidden;
}

.tag {
  background: var(--primary-light);
  color: var(--primary-hover);
  font-size: 0.7rem;
  padding: 4px 10px;
  border-radius: 100px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* Fixed Prompt Box */
.prompt-box {
  background: #f8fafc;
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-top: auto; /* Kutu dibine iter */
  transition: all 0.3s;
}

.card:hover .prompt-box {
  border-color: var(--primary);
  background: white;
}

/* Fixed Prompt Text */
.prompt-preview {
  font-family: 'Inter', monospace;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 12px;
  
  /* Satır Sınırı: En fazla 3 satır */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 3.8rem; /* Sabit preview yüksekliği */
}

.prompt-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(0,0,0,0.05);
  padding-top: 12px;
}

.action-hint {
  font-size: 0.75rem;
  color: var(--text-light);
  font-weight: 500;
}

.btn-copy {
  background: var(--bg-main);
  border: none;
  color: var(--primary);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.btn-copy:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(47, 160, 132, 0.2);
}


/* ================= ADSENSE (BOĞUK OLMAYAN TASARIM) ================= */
.ad-container {
  width: 100%;
  max-width: 900px;
  margin: 20px auto;
  padding: 10px; /* Boğukluğu almak için azaltıldı */
  background: rgba(255, 255, 255, 0.5); /* Şeffaflık artırıldı, daha kibar */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius-md);
  text-align: center;
  box-shadow: 0 2px 10px rgba(31, 111, 95, 0.03);
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
}

.ad-card .ad-container {
  margin: 0;
  background: transparent;
  backdrop-filter: none;
  box-shadow: none;
  height: 100%;
  justify-content: center;
}

.ad-container ins.adsbygoogle {
  display: block !important;
  margin: 0 auto;
}

.ad-label {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
  display: block;
}


/* ================= DETAIL PAGE ================= */
.detail-header {
  margin-bottom: 24px;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.95rem;
  transition: color 0.2s;
  padding: 8px 16px;
  background: white;
  border-radius: 100px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.btn-back:hover {
  color: var(--primary);
}

.detail-container {
  background: var(--bg-card);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  overflow: hidden;
  max-width: 900px;
  margin: 0 auto;
  box-shadow: var(--shadow-md);
}

.detail-image-box {
  width: 100%;
  aspect-ratio: 16 / 9; /* Detay sayfasında da resim formunu koru */
  background: var(--primary-light);
}

.detail-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-content {
  padding: 30px;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.tag-large {
  font-size: 0.85rem;
  padding: 6px 14px;
  background: var(--primary-light);
  color: var(--primary);
}

.detail-title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 12px;
  line-height: 1.2;
  color: var(--text-dark);
  letter-spacing: -0.02em;
}

.detail-desc {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 30px;
}

.detail-prompt-box {
  background: #f8fafc;
  border: 1px solid rgba(47, 160, 132, 0.2);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}

.prompt-subtitle {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.prompt-full {
  font-family: 'Inter', monospace;
  font-size: 0.95rem;
  color: var(--text-dark);
  line-height: 1.6;
  margin-bottom: 20px;
  white-space: pre-wrap;
  background: white;
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px dashed var(--border-subtle);
}

.btn-copy-large {
  padding: 12px 24px;
  font-size: 1rem;
  width: 100%;
  justify-content: center;
  background: var(--primary);
  color: white;
}

.btn-copy-large:hover {
  background: var(--primary-hover);
  color: white;
}


/* ================= RESPONSIVE (MOBIL UYUM) ================= */
@media (max-width: 768px) {
  .top-bar-inner {
    flex-direction: row;
    justify-content: space-between; /* Mobilde de yan yana */
  }
  
  .brand-logo {
    width: 38px;
    height: 38px;
  }
  
  .brand-title {
    font-size: 1.2rem;
  }
  
  .social-btn {
    width: 32px;
    height: 32px;
  }
  
  .social-btn svg {
    width: 16px;
    height: 16px;
  }
  
  .story-circle {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
  }
  
  .story-text {
    font-size: 0.7rem;
  }
  
  .grid-container {
    grid-template-columns: 1fr; /* Mobilde tek sütun */
    gap: 20px;
  }
  
  .main-content {
    padding: 20px 0;
  }
  
  /* Mobilde reklam boğukluğunu önle */
  .ad-container {
    margin: 15px auto;
    padding: 6px;
    border-radius: 8px;
    background: transparent; /* Mobilde arka planı kaldır, daha temiz dursun */
    border: none;
    box-shadow: none;
  }
  
  .detail-content {
    padding: 20px 16px;
  }
  
  .detail-title {
    font-size: 1.6rem;
  }
  
  .detail-prompt-box {
    padding: 16px;
  }
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  grid-column: 1 / -1;
  font-weight: 600;
  font-size: 1rem;
}

/* Footer */
.footer {
  padding: 30px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  margin-top: auto;
}
