/**
 * MKY.WEB.TR — Sosyal Medya & Instagram Tarzı Tasarım Sistemi
 * Modern Dark/Light Mod, Glassmorphism, Responsive Feed & Grid
 */

:root {
  --bg-main: #0b0f19;
  --bg-card: #121826;
  --bg-card-hover: #1a2236;
  --bg-subtle: #1e293b;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --border-color: #232d42;
  --primary: #f97316;
  --primary-hover: #ea580c;
  --primary-glow: rgba(249, 115, 22, 0.25);
  --accent-pink: #e11d48;
  --accent-purple: #8b5cf6;
  --accent-blue: #0284c7;
  --accent-green: #10b981;
  --ig-gradient: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-full: 9999px;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.25);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.35);
  --shadow-lg: 0 16px 36px rgba(0,0,0,0.45);
  --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --header-height: 64px;
  --bottom-nav-height: 60px;
}

[data-theme="light"] {
  --bg-main: #f4f6fa;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --bg-subtle: #f1f5f9;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-dim: #94a3b8;
  --border-color: #e2e8f0;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 8px 20px rgba(0,0,0,0.08);
  --shadow-lg: 0 16px 32px rgba(0,0,0,0.12);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-main);
  line-height: 1.5;
  transition: background-color 0.3s ease, color 0.3s ease;
  min-height: 100vh;
  padding-bottom: 80px;
}

/* ================= TOP NAVBAR ================= */
.top-navbar {
  position: sticky;
  top: 0;
  z-index: 200;
  height: var(--header-height);
  background: rgba(11, 15, 25, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  transition: all 0.3s;
}
[data-theme="light"] .top-navbar {
  background: rgba(255, 255, 255, 0.9);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-main);
}
.brand-badge-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--ig-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 1.15rem;
  box-shadow: 0 4px 12px rgba(220, 39, 67, 0.35);
}
.brand-text-group {
  display: flex;
  flex-direction: column;
}
.brand-handle {
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 6px;
}
.verified-badge {
  color: #38bdf8;
  font-size: 0.9rem;
}
.brand-sub {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.nav-search {
  flex: 1;
  max-width: 380px;
  margin: 0 24px;
  position: relative;
}
.search-input {
  width: 100%;
  padding: 9px 16px 9px 38px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  color: var(--text-main);
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  transition: all 0.2s;
}
.search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  font-size: 0.9rem;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.btn-nav-icon {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  font-size: 1.1rem;
  transition: all 0.2s;
}
.btn-nav-icon:hover {
  background: var(--bg-subtle);
  border-color: var(--primary);
  transform: translateY(-1px);
}
.btn-admin-link {
  background: linear-gradient(135deg, #e11d48, #c2410c);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.25);
  transition: all 0.2s;
}
.btn-admin-link:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

/* ================= MAIN CONTAINER ================= */
.main-wrapper {
  max-width: 940px;
  margin: 0 auto;
  padding: 24px 16px;
}

/* ================= PROFILE & BIOGRAPHY (INSTAGRAM STYLE) ================= */
.profile-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-sm);
  display: flex;
  gap: 36px;
  align-items: flex-start;
}
@media(max-width: 680px) {
  .profile-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 24px 18px;
    gap: 20px;
  }
}

.profile-avatar-wrapper {
  position: relative;
  flex-shrink: 0;
}
.story-ring {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  padding: 4px;
  background: var(--ig-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
}
.profile-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-subtle);
  border: 3px solid var(--bg-card);
}
.profile-badge-bubble {
  position: absolute;
  bottom: 0;
  right: 0;
  background: #10b981;
  color: white;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  border: 2px solid var(--bg-card);
}

.profile-info {
  flex: 1;
}
.profile-header-line {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
@media(max-width: 680px) {
  .profile-header-line {
    justify-content: center;
  }
}
.profile-username {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.profile-action-btns {
  display: flex;
  gap: 8px;
}
.btn-profile {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}
.btn-profile:hover {
  background: var(--border-color);
  color: var(--primary);
}

.profile-stats {
  display: flex;
  gap: 32px;
  margin-bottom: 18px;
}
@media(max-width: 680px) {
  .profile-stats {
    justify-content: center;
    gap: 24px;
  }
}
.stat-item {
  display: flex;
  gap: 6px;
  font-size: 0.95rem;
}
.stat-val {
  font-weight: 800;
  color: var(--text-main);
}
.stat-lbl {
  color: var(--text-muted);
}

.profile-bio-box {
  font-size: 0.95rem;
  line-height: 1.6;
}
.bio-full-name {
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text-main);
}
.bio-school {
  color: #38bdf8;
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 6px;
}
.bio-slogan {
  color: var(--text-muted);
  margin-bottom: 12px;
  font-style: italic;
}

.social-links-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}
@media(max-width: 680px) {
  .social-links-bar {
    justify-content: center;
  }
}
.social-pill {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}
.social-pill:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  transform: translateY(-2px);
}

/* ================= STORIES (CATEGORIES HIGHLIGHTS) ================= */
.stories-section {
  margin-bottom: 28px;
  overflow-x: auto;
  padding: 4px 6px 12px;
  scrollbar-width: thin;
  display: flex;
  justify-content: center;
  width: 100%;
}
.stories-list {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  padding: 4px 6px;
  flex-shrink: 0;
}
@media (max-width: 768px) {
  .stories-section {
    justify-content: flex-start;
  }
  .stories-list {
    justify-content: flex-start;
    margin: 0;
  }
}
.story-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
  font-family: inherit;
  transition: transform 0.2s;
  outline: none;
}
.story-item:hover {
  transform: translateY(-2px);
}
.story-bubble {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  padding: 3px;
  background: var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}
.story-item.active .story-bubble {
  background: var(--ig-gradient);
  box-shadow: 0 0 16px rgba(225, 29, 72, 0.4);
}
.story-icon-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--bg-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
}
.story-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  max-width: 80px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.story-item.active .story-label {
  color: var(--primary);
  font-weight: 700;
}

/* ================= VIEW SWITCHER BAR ================= */
.feed-tabs-bar {
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: center;
  gap: 60px;
  margin-bottom: 24px;
}
.tab-btn {
  background: none;
  border: none;
  border-top: 2px solid transparent;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 14px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: -1px;
}
.tab-btn:hover {
  color: var(--text-main);
}
.tab-btn.active {
  border-top-color: var(--primary);
  color: var(--primary);
}

/* ================= FEED CARDS VIEW ================= */
.feed-stream {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
}
@media (max-width: 880px) {
  .feed-stream {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}
@media (max-width: 600px) {
  .feed-stream {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 500px;
    margin: 0 auto;
  }
}

.feed-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.feed-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-top-author {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  gap: 8px;
}
.author-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.author-avatar-sm {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--primary);
  flex-shrink: 0;
}
.author-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.author-name {
  font-weight: 700;
  font-size: 0.82rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.author-cat-tag {
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.badge-category {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  color: white;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Card Visual / Interactive Stage */
/* Card Visual / Interactive Stage */
.card-media-stage {
  position: relative;
  width: 100%;
  height: 205px;
  min-height: 205px;
  background: #090d16;
  background-image: 
    radial-gradient(circle at 50% 50%, rgba(30, 58, 138, 0.28) 0%, transparent 75%),
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 100% 100%, 20px 20px, 20px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.stage-circuit-preview {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  transition: transform 0.3s ease;
  overflow: hidden;
}
.card-media-stage:hover .stage-circuit-preview {
  transform: scale(1.04);
}
.stage-circuit-preview svg {
  width: 100% !important;
  height: 100% !important;
  max-height: 185px;
  object-fit: contain;
  display: block;
  border-radius: 6px;
  pointer-events: none;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.6));
}

.stage-sim-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 20px 10px;
}
.stage-emoji {
  font-size: 2.75rem;
  margin-bottom: 6px;
  filter: drop-shadow(0 4px 16px rgba(0,0,0,0.5));
  transition: transform 0.3s;
}
.card-media-stage:hover .stage-emoji {
  transform: scale(1.15) rotate(-5deg);
}
.stage-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(8px);
  color: #f8fafc;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.74rem;
  font-weight: 700;
  border: 1px solid rgba(255,255,255,0.18);
  margin-bottom: 6px;
  max-width: 90%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stage-top-pill {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: liveBlink 1.8s infinite;
}
@keyframes liveBlink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.3; transform: scale(0.85); }
}

.stage-hover-overlay {
  position: absolute;
  inset: 0;
  background: rgba(9, 13, 22, 0.82);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
  z-index: 5;
}
.card-media-stage:hover .stage-hover-overlay {
  opacity: 1;
}
.stage-fullscreen-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: white;
  padding: 9px 18px;
  border-radius: var(--radius-full);
  font-size: 0.84rem;
  font-weight: 800;
  box-shadow: 0 4px 18px rgba(2, 132, 199, 0.55);
  transform: translateY(6px);
  transition: transform 0.25s ease;
}
.card-media-stage:hover .stage-fullscreen-badge {
  transform: translateY(0);
}

/* Action Bar below media */
.card-actions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px 6px;
  gap: 8px;
}
.actions-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.btn-action-pill {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 5px 11px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  text-decoration: none;
  line-height: 1;
}
.btn-action-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--text-muted);
  transform: translateY(-1px);
}
.btn-action-pill.btn-like:hover,
.btn-action-pill.btn-like.liked {
  color: #f43f5e;
  border-color: rgba(244, 63, 94, 0.4);
  background: rgba(244, 63, 94, 0.12);
}
.btn-action-pill.btn-like.popping {
  animation: popAnim 0.3s ease;
}
.btn-action-pill.btn-views {
  cursor: default;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.08);
}
.btn-action-pill.btn-share {
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.3);
  background: rgba(56, 189, 248, 0.08);
}
.btn-action-pill.btn-share:hover {
  background: #0284c7;
  color: white;
  border-color: #0284c7;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.35);
}

/* Fullscreen SVG Icon Styles */
.icon-fs-svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
  flex-shrink: 0;
  transition: transform 0.2s ease;
  display: inline-block;
  vertical-align: middle;
}
.btn-modal-fullscreen {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
}
.btn-modal-fullscreen:hover {
  background: #0284c7;
  color: white;
  border-color: #0284c7;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
}
.btn-modal-fullscreen:hover .icon-fs-svg {
  transform: scale(1.15);
}

.btn-inspect-direct {
  margin: 0 14px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: white;
  text-decoration: none;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 700;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
}
.btn-inspect-direct:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}
.btn-inspect-direct .icon-fs-svg {
  width: 15px;
  height: 15px;
}

.card-caption-body {
  padding: 0 14px 10px;
  font-size: 0.82rem;
  line-height: 1.45;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.caption-title {
  font-weight: 800;
  font-size: 0.9rem;
  margin-bottom: 4px;
  color: var(--text-main);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.25;
  min-height: 2.3em;
}
.caption-desc {
  color: var(--text-muted);
  margin-bottom: 6px;
  font-size: 0.76rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.35;
}
.caption-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: auto;
  max-height: 2.4em;
  overflow: hidden;
}
.feed-tag {
  color: #38bdf8;
  font-size: 0.72rem;
  font-weight: 600;
  text-decoration: none;
}
.btn-inspect-direct {
  margin: 0 14px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: white;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 700;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
}
.btn-inspect-direct:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}

/* ================= GRID VIEW (3-COLUMN INSTAGRAM EXPLORE) ================= */
.grid-stream {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
@media(max-width: 640px) {
  .grid-stream {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
}
.grid-item {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
  text-align: center;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s;
}
.grid-item:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
}
.grid-emoji {
  font-size: 2.8rem;
  margin-bottom: 8px;
}
.grid-title-snippet {
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.grid-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  opacity: 0;
  transition: opacity 0.2s;
  color: white;
  font-weight: 800;
  font-size: 0.95rem;
}
.grid-item:hover .grid-overlay {
  opacity: 1;
}

/* ================= MODAL VIEWER ================= */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-backdrop.open {
  display: flex;
}
.modal-window {
  width: 100%;
  max-width: 1100px;
  height: 90vh;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
}
.modal-header {
  height: 56px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}
.modal-title-text {
  font-weight: 700;
  font-size: 1.05rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 600px;
}
.btn-close-modal {
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px;
}
.modal-body {
  flex: 1;
  position: relative;
  background: white;
}
.modal-body iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* ================= MOBILE BOTTOM NAVIGATION ================= */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottom-nav-height);
  background: rgba(11, 15, 25, 0.95);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--border-color);
  z-index: 300;
  justify-content: space-around;
  align-items: center;
}
[data-theme="light"] .bottom-nav {
  background: rgba(255, 255, 255, 0.95);
}
@media(max-width: 768px) {
  .bottom-nav {
    display: flex;
  }
}
.bottom-nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 600;
  transition: color 0.2s;
}
.bottom-nav-link .nav-icon {
  font-size: 1.25rem;
}
.bottom-nav-link.active, .bottom-nav-link:hover {
  color: var(--primary);
}

/* ================= UTILITY & ANIMATIONS ================= */
@keyframes heartPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.4); }
  100% { transform: scale(1); }
}
.popping {
  animation: heartPop 0.3s ease;
}
