/* DailyWalls - Minimal Aesthetic Stylesheet */
:root {
  --bg-color: #faf8f4;
  --bg-surface: #ffffff;
  --bg-surface-subtle: #f5f2ec;
  --text-main: #1c1b18;
  --text-muted: #6e6962;
  --text-light: #9c958c;
  --border-color: rgba(28, 27, 24, 0.08);
  --border-focus: #1c1b18;
  --accent-warm: #d4a373;
  --shadow-subtle: 0 4px 20px rgba(0, 0, 0, 0.03);
  --shadow-hover: 0 12px 32px rgba(28, 27, 24, 0.08);
  --shadow-dropdown: 0 16px 40px rgba(28, 27, 24, 0.12);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-pill: 9999px;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  background-color: var(--bg-color);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-family);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-color);
}

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

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Header & Navigation */
.site-header {
  padding: 20px 24px;
  max-width: 1240px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 100;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-main);
  transition: var(--transition);
}

.brand:hover {
  opacity: 0.8;
}

.brand-symbol {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--text-main);
  display: inline-block;
}

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

/* Navigation Dropdown */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-main);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.nav-dropdown-btn:hover,
.nav-dropdown:focus-within .nav-dropdown-btn {
  background: var(--bg-surface-subtle);
  border-color: var(--border-focus);
}

.nav-dropdown-btn svg {
  transition: transform 0.2s ease;
}

.nav-dropdown:hover .nav-dropdown-btn svg,
.nav-dropdown:focus-within .nav-dropdown-btn svg {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 290px;
  max-height: 480px;
  overflow-y: auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-dropdown);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: var(--transition);
  z-index: 200;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-main);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.dropdown-item:hover {
  background: var(--bg-surface-subtle);
  color: var(--text-main);
  transform: translateX(3px);
}

.dropdown-badge {
  font-size: 0.7rem;
  color: var(--text-muted);
  background: var(--bg-surface-subtle);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

.nav-tag {
  font-size: 0.85rem;
  color: var(--text-muted);
  background: var(--bg-surface-subtle);
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  letter-spacing: 0.02em;
}

/* Breadcrumbs */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--text-muted);
  transition: var(--transition);
}

.breadcrumb a:hover {
  color: var(--text-main);
}

.crumb-sep {
  color: var(--text-light);
  font-size: 0.8rem;
}

.crumb-current {
  color: var(--text-main);
  font-weight: 500;
}

/* Category Badge Link */
.category-badge-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  background: var(--bg-surface-subtle);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-color);
  margin-bottom: 12px;
  transition: var(--transition);
}

.category-badge-link:hover {
  color: var(--text-main);
  border-color: var(--text-main);
  background: var(--bg-surface);
}

/* Hero Section */
.hero {
  text-align: center;
  max-width: 780px;
  margin: 36px auto 44px;
  padding: 0 20px;
}

.hero-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  margin-bottom: 18px;
}

.hero h1 {
  font-size: 2.75rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 16px;
  color: var(--text-main);
}

.hero p {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* Section Header */
.section-header-block {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.section-heading {
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.section-subtext {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Category Grid Section */
.categories-section {
  max-width: 1240px;
  margin: 0 auto 60px;
  padding: 0 20px;
  width: 100%;
}

.category-tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.category-tile {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px 22px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-subtle);
  min-height: 130px;
  transition: var(--transition);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.category-tile:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(28, 27, 24, 0.2);
}

.tile-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.tile-badge {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(4px);
}

.category-tile.tile-light-text .tile-badge {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.category-tile.tile-light-text {
  color: #ffffff;
}

.tile-name {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.tile-arrow {
  display: inline-flex;
  align-items: center;
  transition: transform 0.2s ease;
}

.category-tile:hover .tile-arrow {
  transform: translateX(4px);
}

/* Wallpaper Gallery Grid */
.gallery-container {
  max-width: 1240px;
  margin: 0 auto 70px;
  padding: 0 20px;
  width: 100%;
}

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

.wallpaper-card {
  display: block;
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-subtle);
  border: 1px solid var(--border-color);
  transition: var(--transition);
  text-decoration: none;
  position: relative;
}

.wallpaper-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(28, 27, 24, 0.15);
}

.card-image-wrap {
  aspect-ratio: 9 / 16;
  width: 100%;
  overflow: hidden;
  background-color: var(--bg-surface-subtle);
  position: relative;
}

.card-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.wallpaper-card:hover .card-image-wrap img {
  transform: scale(1.03);
}

.card-meta {
  padding: 16px 18px 20px;
  background: var(--bg-surface);
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-main);
  margin-bottom: 4px;
}

.card-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-badge {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-surface-subtle);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

/* Empty State Card for Pending Categories */
.empty-state-card {
  grid-column: 1 / -1;
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px dashed rgba(28, 27, 24, 0.15);
  box-shadow: var(--shadow-subtle);
  padding: 70px 24px;
  text-align: center;
  max-width: 720px;
  margin: 10px auto 40px;
  width: 100%;
}

.empty-icon-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--bg-surface-subtle);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--text-muted);
}

.empty-title {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  color: var(--text-main);
}

.empty-desc {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 540px;
  margin: 0 auto 28px;
}

.empty-pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 32px;
}

.empty-pill {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-surface-subtle);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-color);
}

/* Wallpaper Detail Page */
.detail-container {
  max-width: 1100px;
  margin: 20px auto 80px;
  padding: 0 20px;
  width: 100%;
}

.detail-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: start;
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-subtle);
  padding: 40px;
  margin-bottom: 70px;
}

.preview-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.preview-stage {
  width: 100%;
  max-width: 380px;
  aspect-ratio: 9 / 16;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--border-color);
  background-color: var(--bg-surface-subtle);
  transition: var(--transition);
}

.preview-stage.mode-desktop {
  max-width: 100%;
  aspect-ratio: 16 / 9;
}

.preview-stage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-toggles {
  display: inline-flex;
  background: var(--bg-surface-subtle);
  padding: 4px;
  border-radius: var(--radius-pill);
  gap: 4px;
}

.preview-btn {
  border: none;
  background: transparent;
  padding: 6px 16px;
  font-size: 0.8rem;
  font-weight: 500;
  border-radius: var(--radius-pill);
  cursor: pointer;
  color: var(--text-muted);
  transition: var(--transition);
  font-family: inherit;
}

.preview-btn.active {
  background: var(--bg-surface);
  color: var(--text-main);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.info-column {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 10px;
}

.wallpaper-title {
  font-size: 2.2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 16px;
  color: var(--text-main);
}

.wallpaper-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 24px;
}

.wallpaper-seo {
  font-size: 0.92rem;
  opacity: 0.88;
}

.specs-box {
  background: var(--bg-surface-subtle);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 30px;
  border: 1px solid var(--border-color);
}

.specs-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-light);
  margin-bottom: 6px;
}

.specs-line {
  font-size: 0.9rem;
  color: var(--text-main);
  font-weight: 500;
  line-height: 1.5;
}

.download-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: var(--radius-pill);
  font-size: 0.95rem;
  font-weight: 600;
  transition: var(--transition);
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--text-main);
  color: #ffffff;
}

.btn-primary:hover {
  background: #33312e;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(28, 27, 24, 0.15);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-main);
  border-color: var(--border-color);
}

.btn-secondary:hover {
  border-color: var(--text-main);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.04);
}

.btn svg {
  width: 18px;
  height: 18px;
}

.share-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Related Wallpapers Section */
.related-section {
  margin-top: 60px;
}

/* Site Footer */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  background: var(--bg-surface);
  padding: 44px 20px;
  text-align: center;
}

.footer-content {
  max-width: 800px;
  margin: 0 auto;
}

.footer-brand {
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
  font-size: 1.1rem;
}

.footer-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--text-main);
}

/* Horizontal Category Pill Bar (Swipeable on Mobile) */
.category-pill-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 6px 20px 18px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  max-width: 1240px;
  margin: -14px auto 26px;
}

.category-pill-bar::-webkit-scrollbar {
  display: none;
}

.cat-pill {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-main);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 7px 15px;
  border-radius: var(--radius-pill);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
  transition: var(--transition);
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.cat-pill:hover,
.cat-pill:active {
  background: var(--text-main);
  color: #ffffff;
  border-color: var(--text-main);
}

.cat-pill.active {
  background: var(--text-main);
  color: #ffffff;
  border-color: var(--text-main);
}

/* Touch targets and feedback */
.btn {
  min-height: 48px;
  -webkit-tap-highlight-color: transparent;
}

.btn:active {
  transform: scale(0.98);
}

.wallpaper-card {
  content-visibility: auto;
  contain-intrinsic-size: 0 420px;
  -webkit-tap-highlight-color: transparent;
}

.category-tile {
  -webkit-tap-highlight-color: transparent;
}

.category-tile:active {
  transform: scale(0.98);
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .detail-layout {
    grid-template-columns: 1fr;
    gap: 36px;
    padding: 28px;
  }
  
  .preview-stage {
    max-width: 320px;
  }
}

@media (max-width: 640px) {
  .site-header {
    padding: 16px 20px;
  }

  .brand {
    font-size: 1.25rem;
  }

  .hero {
    margin: 20px auto 28px;
    padding: 0 16px;
  }

  .hero h1 {
    font-size: 1.95rem;
    letter-spacing: -0.02em;
    line-height: 1.2;
  }

  .hero p {
    font-size: 0.98rem;
    line-height: 1.55;
  }
  
  .nav-tag {
    display: none;
  }

  .nav-dropdown-menu {
    right: 0;
    width: min(280px, calc(100vw - 32px));
    max-height: 65vh;
  }

  .category-pill-bar {
    padding: 4px 16px 14px;
    margin-bottom: 20px;
  }

  .section-header-block {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 18px;
  }

  .section-heading {
    font-size: 1.35rem;
  }

  .gallery-container,
  .categories-section {
    padding: 0 16px;
    margin-bottom: 50px;
  }

  .category-tile-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .category-tile {
    padding: 16px 14px;
    min-height: 105px;
    border-radius: var(--radius-md);
  }

  .tile-name {
    font-size: 0.92rem;
  }

  .tile-badge {
    font-size: 0.65rem;
    padding: 2px 7px;
  }

  .wallpaper-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .wallpaper-card {
    border-radius: var(--radius-md);
  }

  .card-meta {
    padding: 10px 12px 14px;
  }

  .card-title {
    font-size: 0.88rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .card-subtitle {
    font-size: 0.75rem;
  }

  .card-badge {
    display: none; /* Keep cleaner layout on tight 2-column mobile screens */
  }

  .detail-container {
    padding: 0 16px;
    margin: 14px auto 60px;
  }

  .detail-layout {
    padding: 24px 16px;
    border-radius: var(--radius-md);
    gap: 28px;
  }

  .preview-stage {
    max-width: min(300px, 80vw);
  }

  .wallpaper-title {
    font-size: 1.65rem;
  }

  .wallpaper-desc {
    font-size: 0.95rem;
  }

  .specs-box {
    padding: 12px 16px;
  }

  .specs-line {
    font-size: 0.82rem;
  }

  .download-actions .btn {
    width: 100%;
    font-size: 0.92rem;
    padding: 13px 18px;
  }

  .empty-state-card {
    padding: 44px 16px;
  }

  .empty-title {
    font-size: 1.28rem;
  }

  .empty-desc {
    font-size: 0.92rem;
  }

  .empty-pill-list {
    gap: 6px;
  }

  .empty-pill {
    font-size: 0.72rem;
    padding: 4px 10px;
  }
}

@media (max-width: 360px) {
  .wallpaper-grid {
    gap: 8px;
  }

  .card-meta {
    padding: 8px 10px 12px;
  }

  .category-tile-grid {
    grid-template-columns: 1fr;
  }
}

