/* RESET + GLOBAL */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, sans-serif;
  background-image: url("../images/other/bg.png");
  background-repeat: repeat;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Keeps the duck and title side-by-side, but centered as a unit */
.brand-header {
  display: flex;
  align-items: center;   
  justify-content: center; /* Centers the inner content of the header row */
  gap: 15px;             
  margin-bottom: 20px;   
}

.brand-header h1 {
  margin: 0;              /* Reset default spacing first */
  margin-top: 15px;       /* Manually nudges the text lower down to align with the duck */
}

/* Main wrapper box */
.home-box {
  display: flex;           /* FIX: Added display flex so inner elements center properly */
  flex-direction: column; 
  align-items: center;     /* Centers both the header and the nav links horizontally */
  justify-content: center; /* Centers vertically if the container has height */
  width: min(500px, 90%);
  background: #303030;
  color: #fff;
  padding: 40px;
  text-align: center;
  outline: 5px solid black;
  border-radius: 8px;
  box-shadow: 0 0 0 3px black; 
}

/* REMOVED: .home-box h1 style block deleted to let .brand-header h1 handle layout cleanly */

.home-text {
  display: flex;
  flex-direction: column; /* Keeps H1 and Nav stacked vertically */
  gap: 10px;              /* Adds space between the H1 and the navigation links */
}

.home-nav {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;            /* Keeps navigation blocks uniform */
}

.home-nav a {
  display: block;
  background: #555;
  color: #fff;
  text-decoration: none;
  padding: 16px;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: bold;
  transition: background 0.2s ease, transform 0.2s ease;
}

.home-nav a:hover {
  background: #6b6b6b;
  transform: translateY(-2px);
}

.home-nav2 {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;            /* Keeps navigation blocks uniform */
}

.home-nav2 a {
  display: block;
  background: #555;
  color: #fff;
  text-decoration: none;
  padding: 16px;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: bold;
}


footer {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: transparent;
  margin: 0;
  padding: 0;
  color: #666;
}

/* FILTERS + SEARCH */
.filters {
  display: flex;
  gap: 1rem;
  background: #f7f7f7;
  padding: 1rem;
  border-radius: 8px;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.filters label {
  font-size: 0.9rem;
  display: flex;
  flex-direction: column;
}

.filters select,
#searchInput {
  padding: 0.4rem;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 14px;
}

#searchInput {
  padding: 6px 10px;
  margin-right: 10px;
}

/* GRID + CARDS */
.themes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
  align-items: start;
}

.theme-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  height: 100%;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.theme-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 22px rgba(0,0,0,0.18);
}

.theme-card a {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

/* Image preview (dynamic height) */
.theme-card img {
  width: 100%;
  height: auto;             /* let images scale naturally */
  object-fit: contain;      /* no cropping */
  background: #fafafa;      /* subtle backdrop for smaller images */
  display: block;
  flex-shrink: 0;
  transition: transform 0.3s ease; /* smooth zoom effect */
}

/* Zoom-in on hover */
.theme-card:hover img {
  transform: scale(1.05);
}

/* Card content */
.card-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 auto;
}

.card-top h3 {
  margin: 0 0 6px 0;
  font-size: 1.05rem;
  line-height: 1.2;
  color: #111;
}

.card-top .meta {
  margin: 0;
  color: #666;
  font-size: 0.9rem;
}

/* Badges section at bottom */
.card-bottom {
  margin-top: auto;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  font-size: 12px;
  line-height: 1;
  border-radius: 999px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  transition: box-shadow 0.2s ease;
}

.badge:hover {
  box-shadow: 0 0 8px rgba(0,0,0,0.25);
}

/* Badge colors */
.badge.model { background: #0078d7; }
.badge.platform { background: #444; }
.badge.resolution { background: #28a745; }
.badge.home-type { background: #8e44ad; } /* purple for home type */

/* THEME DETAIL PAGE */
.theme-details {
  max-width: 800px;
  margin: 2rem auto;
  padding: 1rem;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.theme-details h2 {
  margin-top: 2rem;
}

.screenshots {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;      /* ✅ center vertically */
  justify-content: center;  /* ✅ center horizontally */
}

.screenshots img {
  max-width: 300px;
  height: auto;
  border-radius: 8px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  cursor: pointer;
  display: block;
}

.screenshots img:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* Lightbox */
#lightbox {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(10px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  overflow: hidden;
}

#lightbox .content {
  position: relative;
  display: flex;
  align-items: center;
}

#lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 8px;
  transition: transform 0.2s ease;
  transform-origin: center center;
}

#lightbox .arrow {
  font-size: 3rem;
  color: white;
  cursor: pointer;
  user-select: none;
  padding: 0 10px;
  transition: color 0.2s;
}
#lightbox .arrow:hover {
  color: #ccc;
}

.download-btn {
  display: inline-block;
  margin-top: 2rem;
  padding: 0.8rem 1.2rem;
  background: #0066cc;
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  transition: background 0.2s;
}

.download-btn:hover {
  background: #004a99;
}

.badge.type.preloaded { background-color: #2e8b57; color: #fff; }
.badge.type.user-made { background-color: #800080; color: #fff; }
.badge.type.carrier { background-color: #1e90ff; color: #fff; }
.badge.flash { background-color: #dd7d0f; color: #fff; }

/* Custom model select */
.custom-select {
  position: relative;
  display: inline-block;
  width: 180px;
}

.select-btn {
  width: 100%;
  padding: 6px 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.select-options {
  position: absolute;
  z-index: 20;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  max-height: 480px;
  overflow-y: auto;
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: none;
}

.select-options li {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  cursor: pointer;
  transition: background 0.15s;
}

.select-options li:hover {
  background: #f0f0f0;
}

.select-options img {
  width: 28px;
  height: auto;
  flex-shrink: 0;
}

/* Model dropdown images */
.custom-select .select-options li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  cursor: pointer;
}

.custom-select .select-options li img {
  width: 80px;   /* bigger phones */
  height: auto;
  flex-shrink: 0;
}

.alt-flash-menus {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 20px;
}
.alt-flash-menu {
  flex: 1 1 250px;
  max-width: 300px;
  text-align: center;
}
.alt-flash-menu img {
  max-width: 100%;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  margin-bottom: 8px;
}

.header-top {
  display: flex;
  justify-content: space-between; 
  align-items: center;
  padding: 10px 20px;
}

.left-side {
  display: flex;
  flex-direction: column; 
  justify-content: center; 
  align-items: center;     
  gap: 20px;	
  display: block;
}
.left-side h1 {
  margin: 0;
}

.left-side nav a {
  margin-left: 10px;
  text-decoration: none;
}

.header-e {
  background: #3f3f3f;
  color: #fff;
  padding: 1rem;
  text-align: center;
}

