/* Vibe Wallpaper – web dashboard (uygulama temasına uyumlu) */
:root {
  --bg: #0f0f14;
  --surface: #14111e;
  --text: #e8e8ec;
  --text-muted: #a0a0b0;
  --accent: #ffd934;
  --accent-hover: #e6c412;
  --card-radius: 12px;
  --header-height: 56px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header – uygulama header gibi */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  padding: 0 20px;
  background: var(--bg);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
}

.nav {
  display: flex;
  gap: 16px;
}

.nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
}

.nav a:hover {
  color: var(--accent);
}

/* Main */
.main {
  flex: 1;
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
  padding: 24px 20px 48px;
}

.tagline {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin: 0 0 16px;
}

.download-cta {
  margin: 0 0 20px;
}

.download-cta-inline {
  margin-top: 8px;
  margin-bottom: 20px;
  padding-left: 20px;
}

.app-store-link {
  display: inline-block;
  padding: 10px 20px;
  background: var(--accent);
  color: #000;
  font-weight: 600;
  text-decoration: none;
  border-radius: 10px;
  font-size: 1rem;
}

.app-store-link:hover {
  background: var(--accent-hover);
  color: #000;
}

.intro-text {
  margin-bottom: 28px;
}

.intro-text p {
  color: var(--text-muted);
  margin: 0 0 12px;
}

.intro-text a {
  color: var(--accent);
  text-decoration: none;
}

.intro-text a:hover {
  text-decoration: underline;
}

.category-intro {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0 0 16px;
  padding: 0 20px;
}

.cta {
  display: inline-block;
  background: var(--accent);
  color: #0d0d0f;
  padding: 14px 24px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  margin-bottom: 28px;
}

.cta:hover {
  background: var(--accent-hover);
  text-decoration: none;
  color: #0d0d0f;
}

.section {
  margin-bottom: 32px;
}

.section-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 16px;
}

.loading, .error {
  padding: 24px;
  text-align: center;
  color: var(--text-muted);
}

.error {
  color: #f08080;
}

.error[hidden], .categories-grid[hidden],
#categories-loading.hidden, #wallpapers-loading.hidden,
.loading.hidden {
  display: none !important;
}

.lightbox[hidden] {
  display: none !important;
  pointer-events: none;
}

/* Kategori grid – 3 sütun (uygulama CategoryGrid3Columns gibi) */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.category-card {
  display: block;
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--card-radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}

.category-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.category-card .placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(100,80,180,0.5), rgba(60,40,120,0.5));
}

.category-card .label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 10px 8px;
  background: linear-gradient(transparent, rgba(0,0,0,0.85));
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255,255,255,0.95);
}

/* Footer */
.footer {
  margin-top: auto;
  padding: 24px 20px;
  border-top: 1px solid rgba(255,255,255,0.06);
  font-size: 0.9rem;
}

.footer a {
  color: var(--accent);
  text-decoration: none;
  margin-right: 20px;
}

.footer a:hover {
  text-decoration: underline;
}

/* Category sayfası (category.html) */
.page-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--bg);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.back-link {
  color: #fff;
  text-decoration: none;
  font-size: 1.1rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.back-link:hover {
  color: var(--accent);
}

.page-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0;
}

/* Wallpapers grid – Pinterest tarzı (2 sütun mobil, 3+ masaüstü) */
.wallpapers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  padding: 20px;
}

.wallpaper-card {
  display: block;
  border-radius: var(--card-radius);
  overflow: hidden;
  background: var(--surface);
  color: inherit;
  cursor: default;
}

.wallpaper-card img {
  width: 100%;
  display: block;
  aspect-ratio: 9/16;
  object-fit: cover;
}

.wallpaper-card .placeholder {
  aspect-ratio: 9/16;
  background: linear-gradient(135deg, rgba(80,60,140,0.4), rgba(40,30,80,0.4));
}

.wallpaper-card-title {
  display: block;
  padding: 6px 8px;
  font-size: 0.8rem;
  color: var(--text-muted, #999);
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: rgba(0,0,0,0.4);
}

/* Lightbox / full image */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  cursor: pointer;
}

.lightbox img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

.lightbox .close-hint {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
}

@media (min-width: 600px) {
  .categories-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
  }
  .wallpapers-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
}

@media (min-width: 900px) {
  .wallpapers-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}