/* Hide content until translations are applied */
body {
  background-color: #222222;
  color: #f5f5f5;
  scroll-behavior: smooth;
  font-family: 'Space Grotesk', sans-serif;
  opacity: 0;
  transition: opacity 0.15s ease-in;
}

body.translations-ready {
  opacity: 1;
}

html,
body {
  overflow-x: hidden;
}

/* Language visibility control */
/* Language visibility control - scoped to prose/blog content only */
html:lang(en) .prose [lang="tr"],
html:lang(tr) .prose [lang="en"] {
  display: none !important;
}

.sharp-edge {
  border-radius: 0px !important;
}

.cyan-glow {
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.3);
}

.grid-bg {
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 30px 30px;
}

::selection {
  background: #00f0ff;
  color: #222222;
}

.navbar-scrolled {
  background-color: rgba(34, 34, 34, 0.95);
  border-bottom: 1px solid #1f2937;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.sliding-bar {
  animation: slide 3s infinite;
}

@keyframes slide {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(300%);
  }
}

/* ============================================================================
   COMPONENT LOADING
   ============================================================================ */

/* Prevent layout shift when components load */
#navbar-placeholder {
  min-height: 88px;
  /* Approximate navbar height */
}

/* Add a subtle skeleton loading effect */
#navbar-placeholder:empty::before {
  content: '';
  display: block;
  height: 88px;
  background: linear-gradient(90deg, #2d2d2d 25%, #333 50%, #2d2d2d 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

#navbar-placeholder:empty,
#footer-placeholder:empty {
  opacity: 0;
  transition: opacity 0.2s;
}

#navbar-placeholder:not(:empty),
#footer-placeholder:not(:empty) {
  opacity: 1;
  transition: opacity 0.2s;
}


/* ============================================================================
   MOBILE BOTTOM NAV
   ============================================================================ */

.safe-area-bottom {
  padding-bottom: env(safe-area-inset-bottom, 0);
}

#mobile-bottom-nav {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Add padding to body to prevent content from being hidden behind mobile nav */
@media (max-width: 1023px) {
  body {
    padding-bottom: 4rem;
  }
}

/* ============================================================================
   DRAWER STYLES
   ============================================================================ */

[id^="drawer-"] {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

#drawer-backdrop {
  transition: opacity 0.3s ease;
}

/* ============================================================================
   DROPDOWN STYLES
   ============================================================================ */

[data-dropdown-menu] {
  pointer-events: none;
}

[data-dropdown]:hover [data-dropdown-menu] {
  pointer-events: auto;
}

/* ============================================================================
   PROSE STYLES FOR BLOG
   ============================================================================ */

.prose {
  color: #e2e8f0;
  line-height: 1.75;
}

.prose h1,
.prose h2,
.prose h3,
.prose h4 {
  color: #f5f5f5;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.025em;
  margin-top: 2em;
  margin-bottom: 0.75em;
}

.prose h1 {
  font-size: 2.25rem;
}

.prose h2 {
  font-size: 1.75rem;
}

.prose h3 {
  font-size: 1.5rem;
}

.prose h4 {
  font-size: 1.25rem;
}

.prose p {
  margin-bottom: 1.25em;
}

.prose a {
  color: #00f0ff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.prose a:hover {
  color: #ffffff;
}

.prose strong {
  color: #f5f5f5;
  font-weight: 700;
}

.prose ul,
.prose ol {
  padding-left: 1.5em;
  margin-bottom: 1.25em;
}

.prose li {
  margin-bottom: 0.5em;
}

.prose ul li::marker {
  color: #00f0ff;
}

.prose blockquote {
  border-left: 3px solid #00f0ff;
  padding-left: 1em;
  margin: 1.5em 0;
  font-style: italic;
  color: #94a3b8;
}

.prose code {
  background-color: #2d2d2d;
  padding: 0.2em 0.4em;
  border-radius: 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9em;
  color: #00f0ff;
}

.prose pre {
  background-color: #2d2d2d;
  padding: 1em;
  overflow-x: auto;
  border: 1px solid #374151;
  margin: 1.5em 0;
}

.prose pre code {
  background: none;
  padding: 0;
  color: #e2e8f0;
}

.prose img {
  max-width: 100%;
  height: auto;
  margin: 2em 0;
  border: 1px solid #374151;
}

.prose hr {
  border: none;
  border-top: 1px solid #374151;
  margin: 3em 0;
}

/* ============================================================================
   LINE CLAMP
   ============================================================================ */

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================================================================
   GALLERY LIGHTBOX
   ============================================================================ */

.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.lightbox-overlay.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-content {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
}

/* ============================================================================
   PAGE TRANSITIONS
   ============================================================================ */

.page-enter {
  opacity: 0;
  transform: translateY(10px);
}

.page-enter-active {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.3s, transform 0.3s;
}

/* ============================================================================
   FILTER BUTTONS
   ============================================================================ */

.filter-btn {
  transition: all 0.2s;
}

.filter-btn.active {
  background-color: #00f0ff;
  color: #222222;
}

.filter-btn:not(.active):hover {
  border-color: #00f0ff;
  color: #00f0ff;
}