/* --- GLOBAL STYLES --- */
body {
  margin: 0;
  font-family: "Comic Neue", Arial, sans-serif;
  background: #0b0c0a;
  color: #fff;
}

h1, h2, h3, h4 {
  color: #89ff83;
  text-shadow: 1px 1px 2px #000;
}

a {
  color: #7eff6c;
  text-decoration: none;
}

a:hover {
  color: #b2ff9d;
}

/* --- HEADER STYLING (No Hamburger) --- */
.site-header {
  background: linear-gradient(145deg, #0e1e0a 0%, #1f3b1a 100%);
  padding: 15px 30px;
  color: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.4);
  position: relative;
  z-index: 999;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.logo img {
  height: 60px;
  width: auto;
}

/* --- NAVIGATION --- */
.nav-buttons {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.nav-btn {
  background: #2f5e27;
  color: #e8ffe3;
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.3s ease, transform 0.2s ease;
}

.nav-btn:hover {
  background: #3d8b34;
  transform: scale(1.05);
}

/* --- HEADER RIGHT SIDE --- */
.header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.user-info {
  font-size: 0.9em;
}

.user-info a {
  color: #b5ffae;
  font-weight: bold;
}

.search-container {
  position: relative;
}

#searchBox {
  padding: 8px 10px;
  border-radius: 6px;
  border: none;
  outline: none;
  width: 200px;
}

.search-results {
  display: none;
  position: absolute;
  background: #fff;
  color: #000;
  width: 100%;
  top: 38px;
  left: 0;
  border-radius: 5px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.3);
  z-index: 10;
}

/* --- PAGE WRAPPER --- */
.content-wrapper {
  padding: 40px 60px;
}

/* --- YEAR / SERIES TILES --- */
.year-grid, .series-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 25px;
  justify-content: center;
  align-items: stretch;
  margin-top: 40px;
}

.year-tile, .series-tile {
  background: linear-gradient(145deg, #1e3a20 0%, #345d2c 100%);
  border-radius: 12px;
  text-align: center;
  color: #f5f5f5;
  font-size: 1.8em;
  font-weight: bold;
  box-shadow: 0 6px 10px rgba(0,0,0,0.4);
  transition: all 0.25s ease-in-out;
  padding: 40px 0;
  border: 2px solid #3a7034;
}

.year-tile:hover, .series-tile:hover {
  transform: scale(1.08);
  box-shadow: 0 8px 16px rgba(0,0,0,0.6);
  border-color: #5acb47;
}

.year-tile a, .series-tile a {
  text-decoration: none;
  color: #e8ffe3;
  display: block;
  width: 100%;
  height: 100%;
}

/* --- CARD GRID LAYOUT (8 → 2 responsive) --- */
.cardback-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 18px;
  justify-content: center;
  align-items: stretch;
}

@media (max-width: 1800px) { .cardback-grid { grid-template-columns: repeat(7, 1fr); } }
@media (max-width: 1600px) { .cardback-grid { grid-template-columns: repeat(6, 1fr); } }
@media (max-width: 1400px) { .cardback-grid { grid-template-columns: repeat(5, 1fr); } }
@media (max-width: 1200px) { .cardback-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 950px)  { .cardback-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px)  { .cardback-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 450px)  { .cardback-grid { grid-template-columns: repeat(2, minmax(150px, 1fr)); } }

/* --- TMNT CARD (perfect aspect ratio + positioning) --- */
.tmnt-card {
  position: relative;
  background: url('images/cardback-bg.jpg') top center / cover no-repeat;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 12px rgba(0,0,0,0.5);
  text-align: center;
  color: #fff;
  transition: transform 0.2s ease, box-shadow 0.3s ease;
  width: 100%;
  aspect-ratio: 3 / 4.8;
}

.tmnt-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.7);
}

/* --- LOCK IMAGE SIZE AND POSITION --- */
.card-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
}

/* Figure bubble placement */
.card-image {
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translateX(-50%);
  width: 83%;
  height: 60%;
  background: #21491f;
  border: 2px solid #000;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.6), 0 2px 4px rgba(0, 0, 0, 0.4);
  z-index: 1;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Name bar */
.card-name {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.85);
  font-family: 'Bangers', sans-serif;
  font-size: 1.15rem;
  color: #fff;
  text-shadow: 2px 2px 3px #000;
  padding: 6px 12px;
  border-radius: 6px;
  letter-spacing: 1px;
  text-align: center;
  width: 85%;
  white-space: normal;
  line-height: 1.2;
  z-index: 2;
}

/* --- SERIES HEADER / YEAR HEADER --- */
.series-header {
  color: #9aff7e;
  border-left: 6px solid #5acb47;
  padding-left: 10px;
  margin: 38px 0 14px;
  text-shadow: 1px 1px 2px #000;
}

/* --- AUTH FORMS (Login / Register / Forgot / Reset) --- */
.auth-container {
  max-width: 420px;
  margin: 80px auto;
  padding: 35px 25px;
  text-align: center;
  background: linear-gradient(145deg, #1b3117, #2f5e27);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.auth-container h2 {
  color: #89ff83;
  margin-bottom: 10px;
  text-shadow: 1px 1px 2px #000;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  text-align: left;
  margin-top: 20px;
}

.auth-form label {
  font-weight: bold;
  color: #a9f6a0;
}

.auth-form input,
.auth-form select {
  padding: 10px;
  border-radius: 6px;
  border: none;
  outline: none;
  font-size: 1rem;
  background: #222;
  color: #fff;
}

.auth-form button {
  background: #3d8b34;
  color: #fff;
  padding: 10px;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s ease;
}

.auth-form button:hover {
  background: #4dc94d;
}

.auth-alt {
  margin-top: 25px;
  color: #e8ffe3;
  font-size: 0.95rem;
}

.auth-alt a {
  color: #b8ffad;
  font-weight: bold;
}

.error-box {
  background: #b63c3c;
  color: #fff;
  padding: 10px;
  border-radius: 6px;
  margin-bottom: 15px;
}

.success-box {
  background: #2d7c3b;
  color: #fff;
  padding: 10px;
  border-radius: 6px;
  margin-bottom: 15px;
}

/* --- RESPONSIVE HEADER STACKING --- */
@media (max-width: 900px) {
  .header-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .nav-buttons {
    flex-direction: column;
    align-items: center;
  }
  .nav-btn {
    margin: 5px 0;
    width: 80%;
  }
  .header-right {
    align-items: center;
  }
  .search-container {
    width: 100%;
  }
  #searchBox {
    width: 90%;
  }
}

/* --- PREVENT HORIZONTAL SCROLL --- */
html, body {
  max-width: 100%;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
}
