/* Genel tema */
:root {
  --bg-dark: #0f172a; /* slate-900 */
  --bg-card: #111827; /* gray-900 */
  --text: #e5e7eb;    /* gray-200 */
  --muted: #9ca3af;   /* gray-400 */
  --primary: #7c3aed; /* violet-600 */
  --primary-2: #a78bfa; /* violet-300 */
}

body {
  background: radial-gradient(1200px 600px at 10% -10%, rgba(124,58,237,.25), transparent 40%),
              radial-gradient(1000px 500px at 110% 10%, rgba(14,165,233,.22), transparent 40%),
              var(--bg-dark);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
  line-height: 1.6;
}

.navbar-custom {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(10px);
}

.navbar-brand {
  font-weight: 700;
  letter-spacing: .5px;
}

.navbar .nav-link {
  color: var(--muted);
  transition: color .2s ease, opacity .2s ease;
}
.navbar .nav-link:hover,
.navbar .nav-link:focus {
  color: #fff;
}
.navbar .nav-link.active {
  color: var(--primary-2);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  border: 0;
}

.btn-primary:hover {
  filter: brightness(1.03);
  box-shadow: 0 8px 22px rgba(124,58,237,.35);
  transform: translateY(-1px);
}
.btn-primary:active {
  transform: translateY(0);
}

.btn-outline-light { border-color: rgba(229,231,235,.3); }
.btn-outline-light:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.5); color: red;}

.hero {
  padding: 60px 0 30px;
}

.hero .title {
  font-weight: 800;
  font-size: clamp(1.6rem, 2.5vw, 2.2rem);
  background: linear-gradient(135deg, #ffffff, var(--primary-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.card.bg-dark {
  background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.01));
  border: 1px solid rgba(255,255,255,.06);
  border-radius: .75rem;
}

.card-hover {
  transition: transform .2s ease, box-shadow .2s ease;
}
.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 26px rgba(0,0,0,.35);
}

model-viewer.thumbnail {
  width: 100%;
  height: 220px;
  background: #0b1220;
  border-bottom: 1px solid rgba(255,255,255,.06);
  cursor: default;
  border-top-left-radius: .75rem;
  border-top-right-radius: .75rem;
}
img.thumbnail {
  width: 100%;
  height: 220px;
  object-fit: cover;
  background: #0b1220;
  border-bottom: 1px solid rgba(255,255,255,.06);
  display: block;
  border-top-left-radius: .75rem;
  border-top-right-radius: .75rem;
}

model-viewer.viewer {
  width: 100%;
  height: 70vh;
  background: #000;
}
model-viewer:hover {
  cursor: pointer;
}

/* Loading spinner overlay for model-viewer */
model-viewer.thumbnail, model-viewer.viewer { position: relative; }
.mv-spinner-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.25);
  z-index: 5;
  transition: opacity .3s ease;
}
.mv-spinner-overlay.hidden { opacity: 0; pointer-events: none; }

.badge-soft {
  background: rgba(167,139,250,.15);
  color: #c4b5fd;
  border: 1px solid rgba(167,139,250,.35);
}

.text-muted { color: var(--muted) !important; }

.form-control, .form-select, .form-control:focus, .form-select:focus {
  background: #0b1220;
  color: var(--text);
  border-color: rgba(255,255,255,.08);
}
.form-control:focus, .form-select:focus { box-shadow: 0 0 0 .25rem rgba(124,58,237,.15); }

.section-title {
  font-weight: 700;
  position: relative;
  display: inline-block;
}
.section-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 56px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  opacity: .85;
}

.thumbnail.interactive { cursor: grab; }
.thumbnail.interactive:active { cursor: grabbing; }

/* Discover grid cards */
.discover-item .card { background: #1d1f23; border: 1px solid rgba(255,255,255,.07); }
.discover-item .card:hover { transform: translateY(-2px); transition: transform .2s ease; }

/* Dropdown menu tweaks */
.dropdown-menu-dark { background-color: #0b1220; border-color: rgba(255,255,255,.08); }
.dropdown-menu-dark .dropdown-item { color: var(--text); }
.dropdown-menu-dark .dropdown-item:hover { background-color: rgba(124,58,237,.25); color: #fff; }

/* Footer */
footer a.text-muted:hover { color: #fff !important; }

/* Header user pill/avatar */
.user-avatar {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #0b1220;
  font-weight: 700;
}
.user-name { color: var(--text); font-weight: 600; }
.dropdown-user { background: rgba(11,18,32,.98); border: 1px solid rgba(255,255,255,.06); }
.dropdown-user .dropdown-item { color: var(--text); }
.dropdown-user .dropdown-item:hover { background: rgba(124,58,237,.12); color: #fff; }

.discover-animated-btn {
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-2) 100%);
  color: var(--text);
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(124,58,237,0.15);
  transition: background 0.4s, transform 0.2s, box-shadow 0.3s;
  position: relative;
  overflow: hidden;
}
.discover-animated-btn:hover, .discover-animated-btn:focus {
  background: linear-gradient(90deg, var(--primary-2) 0%, var(--primary) 100%);
  color: #fff;
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 4px 16px rgba(124,58,237,0.25);
  text-decoration: none;
}
.discover-animated-btn .star-animated {
  animation: star-bounce 1.2s infinite alternate;
}


/* Mega menu specific styling */
.mega-menu {
  min-width: 560px;
  max-width: 900px;
  border-radius: .5rem;
}
.mega-menu .dropdown-item { padding: .25rem .5rem; }
.mega-menu .container { max-width: 100%; }
.mega-menu ul { padding-left: 0; }
.mega-menu a.dropdown-item { color: var(--text); }
.mega-menu a.dropdown-item:hover { background: rgba(124,58,237,.12); color: #fff; }

@media (max-width: 767.98px) {
  .mega-menu { min-width: 200px; }
  .mega-menu .col-md-4 { width: 100%; }
}

/* More decorative / showy mega menu styles */
.mega-menu {
  background: linear-gradient(180deg, rgba(22,27,38,0.95), rgba(11,18,32,0.98));
  border: 1px solid rgba(167,139,250,.06);
  box-shadow: 0 14px 40px rgba(11,18,32,.6), 0 4px 12px rgba(124,58,237,.08);
  border-radius: .75rem;
  transform-origin: top center;
  transition: transform .18s ease, opacity .18s ease;
}
.dropdown.show > .mega-menu { transform: translateY(6px); }

.mega-header h6 { font-weight: 700; }
.mega-header p { opacity: .9; }

.mega-menu .row > div { padding: .25rem .5rem; }
.mega-menu .row > div:not(:last-child) { border-right: 1px solid rgba(255,255,255,.02); }

.mega-menu .dropdown-item { display: flex; align-items: center; gap: .75rem; padding: .4rem .6rem; border-radius: .5rem; transition: background .12s ease, transform .08s ease, box-shadow .12s ease; }
.mega-menu .dropdown-item .cat-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; background: linear-gradient(135deg, var(--primary), var(--primary-2)); box-shadow: 0 2px 6px rgba(124,58,237,.2); flex-shrink: 0; }
.mega-menu .dropdown-item:hover { background: linear-gradient(90deg, rgba(124,58,237,.08), rgba(167,139,250,.04)); transform: translateY(-2px); box-shadow: 0 6px 18px rgba(124,58,237,.08); }

.mega-menu a.dropdown-item { color: var(--text); }
.mega-menu a.dropdown-item .text-muted { color: rgba(255,255,255,.6); }

@media (max-width: 991.98px) {
  .mega-menu .row > div { border-right: none; }
}

/* Mobile-specific fixes for header & mega-menu */
@media (max-width: 767.98px) {
  /* Make dropdown act like a block inside the collapsed navbar */
  .dropdown-menu.mega-menu {
    position: static !important;
    float: none !important;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-shadow: none !important;
    border-radius: .5rem !important;
    margin-top: .5rem;
    padding: .75rem !important;
  }

  /* Stack columns vertically and remove extra separators */
  .mega-menu .container { padding: 0; }
  .mega-menu .row { display: block; }
  .mega-menu .col-md-4 { width: 100%; padding: .25rem 0; border-right: none; }

  /* Make nav buttons stretch full width in collapsed navbar */
  .navbar-collapse .discover-animated-btn,
  .navbar-collapse .animated-categories-btn,
  .navbar-collapse .btn-outline-light,
  .navbar-collapse .btn-primary {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
    margin-bottom: .5rem !important;
  }

  /* Reduce pill/button padding to avoid overflow */
  .animated-categories-btn { min-width: auto !important; padding-left: .75rem !important; padding-right: .75rem !important; }

  /* Hide decorative absolute badges that overflow on small screens */
  .animated-categories-btn .badge { display: none !important; }

  /* Ensure dropdown items are easy to tap */
  .mega-menu .dropdown-item { padding: .6rem .75rem !important; }

  /* Keep user avatar inline and collapse name on small screens */
  .user-name { display: none !important; }
}


/*Animation*/
@keyframes star-bounce {
  0% { transform: scale(1) rotate(-10deg);}
  50% { transform: scale(1.18) rotate(10deg);}
  100% { transform: scale(1) rotate(-10deg);}
}
@keyframes spin {
  0% { transform: rotate(-10deg) scale(1);}
  50% { transform: rotate(20deg) scale(1.15);}
  100% { transform: rotate(-10deg) scale(1);}
}
@keyframes bounceIn {
  0% { transform: scale(0.8); opacity: 0.5;}
  60% { transform: scale(1.15); opacity: 1;}
  100% { transform: scale(1); opacity: 1;}
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255,193,7,0.7);}
  70% { box-shadow: 0 0 0 10px rgba(255,193,7,0);}
  100% { box-shadow: 0 0 0 0 rgba(255,193,7,0);}
}