/* --------------- GLOBAL - Global --------------- */
html, body {
  height: 100%;
  margin: 0;
}

body {
  font-family: sans-serif;
  background-color: #121212;
}

.page-wrapper {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.main-content {
  flex: 1;
}

button.disabled {
    opacity: 0.5;
    pointer-events: none;
}




/* --------------- GLOBAL - Navbar --------------- */
.navbar {
  background-color: #121212;
  height: 64px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-bottom: 1px solid #C8AA6E;
}

.navbar-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 85%;
}

.nav-left,
.nav-right {
  display: flex;
  align-items: center;
}

.logo img {
  height: 33px;
}

.logo a {
  transition: opacity 0.3s ease;
}

.logo a:hover {
  opacity: 0.7;
}

.logo-top img {
  position: relative;
  top: 1px;
  right: 24px;
}

.navbar a:not(.logo a) {
  color: #f9f9f9;
  margin: 0 2px;
  text-decoration: none;
  font-size: 14px;
  padding: 5px 9px;
  border-radius: 6px;
  position: relative;
  transition: background 0.2s ease, color 0.2s ease;
}

.navbar a:not(.logo a):hover,
.navbar a.nav-active {
  background: #222;
}

.navbar i {
  font-size: 16px;
  position: relative;
  top: 2px;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 3.5px;
  cursor: pointer;
  border: 1px solid #C8AA6E;
  padding: 5px;
  border-radius: 6px;
}

.hamburger i {
  position: relative;
  top: 0px;
  font-size: 24px;
  color: #f9f9f9;
}

.side-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 460px;
  height: 100%;
  background: #1f1f1f;
  color: #f9f9f9;
  text-align: left;
  display: none;
  flex-direction: column;
  padding: 12px;
  z-index: 999;
  display: flex;
  transition: right 0.4s ease;
}

.side-menu.active {
  right: 0;
  transition: right 0.4s ease;
}

.side-menu a {
  margin-top: 12px;
  padding: 18px 8px;
  border-radius: 6px;
  color: #f9f9f9;
  text-decoration: none;
}

.side-menu i {
  position: relative;
  top: 2px;
}

.side-menu a:hover,
.side-menu a.nav-active {
    background: rgba(128,128,128,0.3);
}

.side-menu .close-btn {
  margin-right: 8px;
  margin-top: 5px;
  padding: 10px 12.5px;
  cursor: pointer;
  background: #272727;
  border-radius: 18px;
  align-self: flex-end;
}

.side-menu .close-btn i {
  font-size: 24px;
  color: #f9f9f9;
}

.side-menu .close-btn i:hover {
  color: #C8AA6E;
}

.side-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.side-menu {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.side-menu-bottom {
  margin-top: auto;
  margin-bottom: 25px;
  display: flex;
  flex-direction: column;
}

.side-logo {
  margin-left: 8px;
  margin-top: 3px;
}

@media (max-width: 1152px) {
  .navbar a:not(.logo a) {
    font-size: 12px;
  }
}

@media (max-width: 956px) {
  .logo-top {
    display: none;
  }
}

@media (max-width: 768px) {
  .nav-left a,
   .nav-right a {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .navbar-content .signup-btn {
    display: none;
  }
}

@media (max-width: 500px) {
  .side-menu {
    width: 95%;
  }
}

@media (max-width: 350px) {
  .side-menu {
    width: 93%;
  }
}




/* --------------- GLOBAL - Footer --------------- */
.footer {
  background: #121212;
  border-top: 1px solid #C8AA6E;
  padding: 18px 0;
}

.footer-container {
  width: 85%;
  margin: 0 auto;
  text-align: center;
}

.footer-logo img {
  width: 50px;
  margin: 8px 0;
}

.footer-logo a {
  transition: opacity 0.3s ease;
}

.footer-logo a:hover {
  opacity: 0.7;
}

.footer .disclaimer {
  font-size: 12px;
  color: #aaa;
  line-height: 1.5;
  margin: 16px auto;
  max-width: 600px;
}

.footer .disclaimer a {
  text-decoration: none;
  color: #aaa;
}

.footer .disclaimer a:hover {
  color: #eee;
  text-decoration: underline;
}

.footer-links {
  display: flex;
  font-size: 14px;
  letter-spacing: 1px;
  justify-content: center;
  gap: 32px;
  margin: 24px 0;
}

.footer-links a {
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: #C8AA6E;
}

@media (max-width: 768px) {
  .footer-links {
    flex-direction: column;
    gap: 20px;
  }
}




/* --------------- GLOBAL - Pagination --------------- */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 100px 0 50px
}

.pagination a {
  padding: 6px 12px;
  background: #222;
  color: #ccc;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.pagination a:hover {
  background: #333;
  color: #C8AA6E;
}

.pagination a.active {
  background: #C8AA6E;
  color: #111;
  pointer-events: none;
}

.pagination span {
  color: #aaa;
  position: relative;
  top: 4px;
  padding: 6px;
}




/* --------------- LANDING PAGE - Header --------------- */
.landing-header {
  position: relative;
  min-height: 700px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: url("../img/brand/back.jpg") center / cover no-repeat;
}

.header-overlay {
  position: absolute;
  inset: 0;
  background: rgb(21 31 43 / 80%);
}

.header-inner {
  position: relative;
  text-align: center;
  margin: 0 5%;
}

.site-tag {
  display: inline-block;
  margin-bottom: 16px;
  font-size: 12px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: #C8AA6E;
}

.header-inner h1 {
  margin: 0;
  font-size: 56px;
  font-weight: 900;
  line-height: 1.05;
  text-transform: uppercase;
  color: #fff;
}

.accent-outline {
  color: transparent;
  -webkit-text-stroke: 1.5px #fff;
  text-shadow: 0 0 18px rgba(255, 255, 255, 0.2);
}

.header-inner p {
  max-width: 650px;
  margin: 24px auto 36px;
  line-height: 1.6;
  color: #ccc;
}

.header-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
}

.landing-btn {
  padding: 12px 26px;
  border-radius: 6px;
  background: #C8AA6E;
  color: #111;
  font-size: 14px;
  font-weight: bold;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease;
}

.landing-btn:hover {
  background: #b89a5f;
  transform: translateY(-3px);
}

.header-news {
  margin-top: 5%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.header-news-badge {
  padding: 4px 8px;
  background: #C8AA6E;
  color: #111;
  font-weight: bold;
  font-size: 11px;
  border-radius: 4px;
  letter-spacing: 1px;
}

.header-news-link {
  color: #ddd;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.header-news-link:hover {
  color: #CC5500;
}

@media (max-width: 900px) {
  .header-inner h1 {
    font-size: 42px;
  }
}

@media (max-width: 600px) {
  .landing-header {
    min-height: 560px;
  }

  .site-tag {
    font-size: 10px;
  }

  .header-inner h1 {
    font-size: 32px;
  }

  .header-inner p {
    font-size: 14px;
  }

  .landing-btn {
    padding: 8px 20px;
  }

  .header-news-badge {
    font-size: 8px;
  }

  .header-news-link {
    font-size: 12px;
  }
}




/* --------------- LANDING PAGE - News --------------- */
.latest-news {
  width: 75%;
  margin: 50px auto;
  color: #fff;
  padding: 32px;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.news-card {
  background: #1a1a1a;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.6);
  background-color: #000;
}

.news-img {
  position: relative;
  width: 100%;
  height: 220px;
}

.news-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.news-content {
  padding: 14px;
}

.news-meta {
  font-size: 0.8rem;
  margin-bottom: 6px;
}

.news-meta .news-category {
  font-weight: bold;
  color: #C8AA6E;
  margin-right: 8px;
  text-transform: uppercase;
}

.news-meta .date {
  color: #aaa;
}

.news-title {
  font-size: 1.1rem;
  margin: 4px 0 8px;
  line-height: 1.3;
}

.news-summary {
  font-size: 0.85rem;
  color: #ccc;
  line-height: 1.4;
}

@media (max-width: 1152px) {
  .news-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .news-grid {
    grid-template-columns: 1fr;
  }

  .latest-news h2 {
    font-size: 1.4rem;
  }
}




/* --------------- NEWS - News --------------- */
.article-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 20px;
  color: #e0e0e0;
}

.article-category {
  color: #C8AA6E;
  text-transform: uppercase;
  font-weight: bold;
  font-size: 0.9rem;
  letter-spacing: 1px;
}

.article-title {
  font-size: 2.5rem;
  margin: 10px 0;
  line-height: 1.2;
  color: #fff;
}

.article-description {
  font-size: 1.2rem;
  color: #ccc;
  margin-bottom: 20px;
}

.article-banner img {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 40px;
}

.article-h2 {
  font-size: 1.8rem;
  margin: 40px 0 20px 0;
  color: #fff;
  border-left: 4px solid #C8AA6E;
  padding-left: 15px;
}

.article-p {
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 25px;
}

.article-p a {
  color: #C8AA6E;
  text-decoration: none;
  font-weight: 600;
  transition: 0.2s;
}

.article-p a:hover {
  border-bottom: 1px solid #C8AA6E;
}

.article-img {
  margin: 30px 0 0;
  max-width: 100%;
  height: auto;
}

.article-img-source {
  display: block;
  font-size: 12px;
  color: #888;
  margin-top: 2px;
  margin-bottom: 30px;
  text-align: right;
}

.article-img-source a {
  color: #C8AA6E;
  text-decoration: none;
}

.article-img-source a:hover {
  text-decoration: underline;
}

.article-list {
  padding-left: 20px;
  list-style-type: none;
}

.article-list li {
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 10px;
  color: #e0e0e0;
  position: relative;
  padding-left: 20px;
}

.article-list li::before {
  content: "•";
  color: #C8AA6E;
  font-weight: bold;
  position: absolute;
  left: 0;
}

.article-list li a {
  color: #C8AA6E;
  text-decoration: none;
  font-weight: 600;
  transition: 0.2s;
}

.article-list li a:hover {
  border-bottom: 1px solid #C8AA6E;
}

.article-table-container {
  margin: 30px 0;
  border: 1px solid #333;
  border-radius: 4px;
}

.article-table {
  width: 100%;
  border-collapse: collapse;
}

.article-table th {
  background-color: #1a1a1a;
  color: #fff;
  text-align: left;
  padding: 15px;
  border-bottom: 2px solid #C8AA6E;
  text-transform: uppercase;
  font-size: 0.9rem;
}

.article-table td {
  padding: 12px 15px;
  color: #ccc;
  border-bottom: 1px solid #222;
  font-size: 1rem;
}

.article-table tr:nth-child(even) {
  background-color: #1a1a1a;
}

.article-table td a {
  color: #C8AA6E;
  text-decoration: none;
  font-weight: 600;
  transition: 0.2s;
}

.article-table td a:hover {
  text-decoration: underline;
}

@media (max-width: 600px) {
  .article-title {
    font-size: 1.5rem;
  }

  .article-description {
    font-size: 1rem;
  }

  .article-h2 {
    font-size: 1.3rem;
    margin: 30px 0 15px 0;
  }

  .article-p {
    font-size: 0.9rem;
  }

  .article-img-source {
    font-size: 10px;
  }

  .article-list li {
    font-size: 0.9rem;
  }
}




/* --------------- COLLECTION - Filter --------------- */
.card-collection-filter {
  width: 75%;
  margin: 5% auto 2.5%;
  padding: 20px;
  border: 1px solid #333;
  border-radius: 12px;
  color: #fff;
}

.sets-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 28px;
  margin-bottom: 28px;
}

.set-item {
  border-radius: 12px;
  background-color: #222;
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow 0.2s ease;
}

.set-item:hover {
  background-color: #333;
  box-shadow: 0 0 0 1.5px #C8AA6E;
}

.set-item.active {
  background: #333;
  box-shadow: 0 0 0 1.5px #C8AA6E;
  color: #C8AA6E;
}

.set-thumb {
  position: relative;
  background: linear-gradient(180deg, #1f1f1f, #141414);
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  padding: 10px;
}

.set-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid #2e2e2e;
  color: #e8e8e8;
  font-weight: 700;
  letter-spacing: 1px;
  font-size: 12px;
  padding: 3px 7px;
  border-radius: 999px;
}

.set-body {
  padding: 10px 12px 12px 12px;
  font-weight: 600;
}

.set-name {
  font-size: 18px;
  margin: 0 0 6px;
}

.meta {
  color: #cfcfcf;
  font-size: 11px;
  margin-bottom: 6px;
  line-height: 1.4;
}

.set-count {
  color: #ccc;
  font-size: 0.8rem;
  margin-bottom: 6px;
}

.progress {
  height: 8px;
  background: #ccc;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid #1e1e1e;
}

.stats-grid {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  font-weight: 600;
}

.stat-column {
  flex: 1 1 250px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  background: #222;
  border-radius: 8px;
  padding: 6px 10px;
  border: 1px solid transparent;
}

.stat-item:hover {
  background: #333;
  border-color: #C8AA6E;
}

.stat-item.active {
  background: #333;
  border-color: #C8AA6E;
  color: #C8AA6E;
}

.icon-label {
  display: flex;
  align-items: center;
  gap: 6px;
}

.icon-label .icon {
  width: 18px;
  height: 18px;
  position: relative;
  top: -1px;
}

.stat-item .label {
  flex-grow: 1;
}

.stat-item .count {
  color: #ccc;
  display: flex;
  justify-content: flex-end;
}

.stat-item .percent {
  text-align: right;
  min-width: 60px;
}

.set-ogn.active {
  color: #fff09e;
}

.set-ogs.active {
  color: #eac266;
}

.set-arc.active {
  color: #cba688;
}

.set-sfd.active {
  color: #a29994;
}

.set-unl.active {
  color: #e193a4;
}

.rarity-common.active {
  color: #a3b7c4;
}

.rarity-uncommon.active {
  color: #73c0c4;
}

.rarity-rare.active {
  color: #9f307c;
}

.rarity-epic.active {
  color: #f4851d;
}

.rarity-overnumbered.active {
  color: #f2c709;
}

.color-fury.active {
  color: #cc212c;
}

.color-calm.active {
  color: #15aa71;
}

.color-mind.active {
  color: #23779b;
}

.color-body.active {
  color: #e2700d;
}

.color-chaos.active {
  color: #6b4890;
}

.color-order.active {
  color: #cea903;
}

.color-colorless.active {
  color: #5b5b5d;
}

@media (max-width: 1400px) {
  .set-name {
    font-size: 13px;
  }
}

@media (max-width: 1100px) {
  .badge {
    font-size: 10px;
  }

  .set-name {
    font-size: 11px;
  }
}

@media (max-width: 900px) {
  .set-name {
    font-size: 10px;
  }

  .meta {
    font-size: 10px;
  }

  .set-count {
    font-size: 0.75rem;
  }
}

@media(max-width: 868px){
  .sets-row {
    grid-template-columns: repeat(3, 1fr);
  }

  .stats-grid {
    flex-direction: column;
  }

  .stat-column {
    flex: 1 1 100%;
  }

  .badge {
    font-size: 8px;
  }

  .set-name {
    font-size: 16px;
  }

  .meta {
    font-size: 11px;
  }

  .set-count {
    font-size: 0.8rem;
  }
}

@media(max-width: 717px){
  .set-name {
    font-size: 12px;
  }
}

@media (max-width: 568px) {
  .sets-row {
    display: flex;
    padding: 4px 12px;
    padding-right: 10px;
    flex-direction: column;
    max-height: 275px;
    overflow-y: auto;
    gap: 10px;
  }

  .set-item {
    flex-shrink: 0;
  }

  .set-thumb {
    display: none;
  }

  .sets-row::-webkit-scrollbar {
    width: 8px;
  }

  .sets-row::-webkit-scrollbar-thumb {
    background-color: #333;
    border-radius: 6px;
  }

  .sets-row::-webkit-scrollbar-thumb:hover {
    background-color: #C8AA6E;
  }

  .sets-row {
    scrollbar-width: thin;
    scrollbar-color: #C8AA6E #1b1b1b;
  }
}



.collection-guest-notice {
  width: 75%;
  margin: 40px auto 10px auto;
  padding: 12px 20px;
  background-color: #1a1a1a;
  border: 1px solid #333;
  border-radius: 8px;
  color: #fff;
  font-size: 0.9rem;
  display: flex;
  justify-content: center;
}

.collection-guest-notice a {
  color: #C8AA6E;
  text-decoration: none;
  font-weight: 700;
  transition: 0.4s;
}

.collection-guest-notice a:hover {
  text-decoration: underline;
}

@media (max-width: 868px) {
    .collection-guest-notice {
        font-size: 0.8rem;
    }
}

@media (max-width: 600px) {
    .collection-guest-notice {
        font-size: 0.7rem;
        margin-top: 20px;
        justify-content: center;
        text-align: center;
    }
}



/* --------------- COLLECTION - Card Collection --------------- */
.card-collection {
  width: 75%;
  margin: 2.5% auto 5%;
  padding: 20px;
  border: 1px solid #333;
  border-radius: 12px;
  color: #fff;
}

.search-controls {
  display: flex;
  justify-content: space-between;
}

.collection-search {
  flex: 0 1 250px;
  min-width: 150px;
  max-width: 250px;
  padding: 7px 12px;
  border-radius: 6px;
  border: 1px solid #444;
  background: #222;
  color: #fff;
  font-size: 12px;
}

.collection-search input {
  width: 100%;
  border: none;
  background: transparent;
  color: inherit;
  font-size: inherit;
  outline: none;
}

.collection-search-mobile {
  display: none;
  width: calc(75% + 25px);
  padding: 7px 12px;
  margin: 20px auto;
  border-radius: 6px;
  border: 1px solid #444;
  background: #222;
  color: #fff;
  font-size: 12px;
  box-sizing: border-box;
}

.collection-search-mobile input {
  width: 100%;
  border: none;
  background: transparent;
  color: inherit;
  font-size: inherit;
  outline: none;
}

.collection-controls {
  display: flex;
  gap: 20px;
  font-size: 14px;
  color: #ccc;
}

.toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.toggle input {
  display: none;
}

.toggle .slider {
  width: 36px;
  height: 18px;
  background: #1a1a1a;
  border-radius: 18px;
  position: relative;
  transition: 0.3s;
}

.toggle .slider::before {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  background: #555;
  border-radius: 50%;
  top: 1px;
  left: 1px;
  transition: transform 0.3s, background 0.3s;
}

.toggle input:checked + .slider::before {
  transform: translateX(18px);
  background: #C8AA6E;
}

.collection-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 0;
}

.collection-line {
  flex: 1;
  height: 1px;
  background: #444;
  border: none;
}

.collection-title {
  font-size: 16px;
  font-weight: 600;
  color: #ccc;
  white-space: nowrap;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 15px;
}

.no-cards-message {
  display: none;
  text-align: center;
  font-size: 1.2rem;
  color: #ccc;
  padding: 30px 0;
}

.card {
  display: flex;
  width: 100%;
  height: 100%;
  flex-direction: column;
  gap: 6px;
}

.card-visual {
  position: relative;
  border-radius: 8px;
  transition: transform 0.2s ease, border 0.2s ease;
  border: 2px solid transparent;
  margin-top: 2px;
  cursor: pointer;
}

.card-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.card-visual:hover {
  border-color: #C8AA6E;
  transform: translateY(-2px);
}

.card .add-btn,
.card .delete-btn {
  position: absolute;
  bottom: 8px;
  right: 8px;
  border: none;
  border-radius: 50%;
  text-align: center;
  width: 32px;
  height: 32px;
  font-size: 18px;
  color: #fff;
  cursor: pointer;
  z-index: 3;
  transition: background 0.2s ease, transform 0.2s ease;
}

.card .add-btn i,
.card .delete-btn i {
  font-size: 22px;
  font-weight: bold;
  margin-top: 5px;
}

.card .add-btn {
  background: #28a745;
}

.card .delete-btn {
  background: #dc3545;
}

.card .add-btn:hover {
  background: #3ac25b;
  transform: translateY(-2px);
}

.card .delete-btn:hover {
  background: #e35a5a;
  transform: translateY(-2px);
}

.card .unowned img {
  opacity: 0.33;
}

.card-info {
  height: 66px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 8px;
  border: 1px solid #333;
  border-radius: 6px;
  background: rgba(20,20,20,0.85);
  box-shadow: 0 2px 4px rgba(0,0,0,0.4);
}

.card-name {
  font-weight: bold;
  font-size: 15px;
  color: #fff;
  letter-spacing: 0.5px;
  margin-bottom: 3px;
  text-transform: uppercase;
}

.card-id {
  font-size: 12px;
  font-weight: 600;
  color: #C8AA6E;
  letter-spacing: 0.3px;
}

@media (max-width: 1400px) {
  .card-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (max-width: 1100px) {
  .card-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 900px) {
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .collection-controls {
    gap: 15px;
    font-size: 10px;
    margin: auto;
  }

  .card-name {
    font-size: 13px;
  }

  .card-id {
    font-size: 11px;
  }
}

@media (max-width: 768px) {
  .collection-search {
    display: none;
  }

  .collection-search-mobile {
    display: block;
  }
}

@media (max-width: 650px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .card-name {
    font-size: 11px;
  }

  .card-id {
    font-size: 10px;
  }
}

@media (max-width: 500px) {
  .set-name {
    font-size: 11px;
  }

  .meta {
    font-size: 9px;
  }

  .set-count {
    font-size: 9px;
  }
}

@media (max-width: 350px) {
  .stat-item .label {
    display: none;
  }

  .card-name {
    font-size: 9px;
  }

  .card-id {
    font-size: 8px;
  }
}




/* --------------- COLLECTION - Modal --------------- */
.modal {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal.hidden {
  display: none;
}

.modal-content {
  position: relative;
  border: 2px solid #C8AA6E;
  border-radius: 8px;
  padding: 12px;
  background: #1a1a1a;
  box-shadow: 0 0 15px rgba(0,0,0,0.5);
}

.modal-content img {
  display: block;
  max-width: 75vw;
  max-height: 70vh;
  border-radius: 4px;
}

.modal-content .close-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: white;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: all 0.25s ease;
}

.modal-content .close-btn i {
  color: black;
  font-weight: bold;
  font-size: 1.2rem;
}

.modal-content .close-btn:hover {
  background: #e0e0e0;
  transform: scale(1.2);
}

.modal-content .view-card-btn {
  display: block;
  margin: 8px auto 0;
  padding: 6px 0;
  border-radius: 5px;
  font-weight: bold;
  text-decoration: none;
  text-align: center;
  color: white;
}

.modal-content.rotated .close-btn {
  right: auto;
}

.rotated {
  transform: rotate(90deg);
}




/* --------------- CARD PAGE INFO - Card --------------- */
.card-page {
  width: 75%;
  margin: 8% auto;
  color: #C8AA6E;
}

.card-layout {
  display: flex;
  gap: 40px;
}

.card-media {
  flex: 0 0 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.card-set-select {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card-set-select select {
  width: 100%;
  height: 38px;
  background: #222;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid #333;
  text-align: center;
  border-radius: 6px;
  font-weight: 700;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

.card-set-select select option {
  font-size: 13px;
  font-weight: 700;
}

.card-media img {
  width: 100%;
  border-radius: 8px;
}

.card-nav {
  display: flex;
  gap: 14px;
}

.card-nav .card-arrow {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  width: 125px;
  height: 36px;
  background: #222;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.2s ease, color 0.2s ease;
}

.card-nav .card-arrow i {
  font-size: 16px;
  line-height: 0;
}

.card-nav .card-arrow:hover {
  background: #333;
  color: #C8AA6E;
}

.card-nav .add-btn,
.card-nav .delete-btn {
  height: 34px;
  width: 34px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 6px;
  text-decoration: none;
  color: #fff;
  font-size: 18px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.card-nav .add-btn {
  background: #28a745;
}

.card-nav .delete-btn {
  background: #dc3545;
}

.card-nav .add-btn:hover {
  background: #3ac25b;
  transform: translateY(-2px);
}

.card-nav .delete-btn:hover {
  background: #e35a5a;
  transform: translateY(-2px);
}

.card-nav .add-btn i,
.card-nav .nav-delete-btn i {
  font-weight: bold;
  font-size: 22px;
}

.arrow-right {
  transform: rotate(180deg);
}

.card-nav .disabled {
  opacity: 0.3;
  pointer-events: none;
}

.card-details {
  width: 100%;
  text-align: center;
  margin: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.card-title {
  margin: 0;
  padding: 30px;
  background: #222;
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  border-radius: 8px;
  overflow-wrap: anywhere;
}

.card-divider {
  border: none;
  border-top: 1px solid #e8e8e8;
  margin: 4px;
}

.card-info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px 36px;
}

.card-info-item {
  background: #222;
  color: #C8AA6E;
  padding: 12px;
  border-radius: 8px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.04);
  min-height: 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.card-info-label {
  font-size: 12px;
  color: var(--accent);
  font-weight: 800;
  margin-bottom: 6px;
}

.card-info-value-effect {
  justify-content: center;
  font-size: 16px;
  color: #fff;
  font-weight: 800;
  align-items: center;
  gap: 8px;
}

.card-info-value-effect img {
  position: relative;
  top: 5px;
  height: 22px;
  width: 22px;
}

.card-info-value-effect .db-mana {
  display: inline-flex;
  height: 18px;
  width: 18px;
  position: relative;
  top: -2px;
}

.effect-keyword {
  display: inline-block;
  position: relative;
  color: #fff;
  font-weight: 800;
  padding: 2px 10px;
  margin: 0 3px;
  font-size: 14px;
  text-transform: uppercase;
  z-index: 1;
}

.effect-keyword::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--keyword-bg, #ff006e);
  transform: skewX(-15deg);
  z-index: -1;
  border-radius: 4px;
}

.effect-keyword-arrow {
  padding-right: 20px;
}

.effect-keyword-arrow::before {
  clip-path: polygon(
    0% 0%,
    calc(100% - 12px) 0%,
    100% 50%,
    calc(100% - 8px) 100%,
    0% 100%
  );
}

.bg-gray {
  --keyword-bg: #716c6b;
}

.bg-dark-green {
  --keyword-bg: #256c5b;
}

.bg-light-green {
  --keyword-bg: #8dac29;
}

.bg-pink {
  --keyword-bg: #d2356c;
}

.card-info-value {
  justify-content: center;
  font-size: 16px;
  color: #fff;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-stat-icon {
  width: 26px;
  height: 26px;
}

@media (max-width: 1400px) {
  .card-info-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .card-divider {
    margin: 0px;
  }
}

@media (max-width: 1024px) {
  .card-layout {
    flex-direction: column;
    align-items: center;
    gap: 18px;
    position: relative;
    padding-bottom: 60px;
  }

  .card-media {
    width: 320px;
    flex: none;
    margin: 42px;
  }

  .card-details {
    width: 100%;
    margin-top: 26px;
  }

  .card-info-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 18px;
  }
}

@media (max-width: 480px) {
  .card-info-grid {
    grid-template-columns: 1fr;
  }

  .card-media {
    width: 260px;
  }
}




/* --------------- DECK BUILDER - Deck List --------------- */
.db-container {
  display: flex;
  gap: 10px;
  margin: 10px;
}

.db-deck {
  flex: 1;
  max-width: 33%;
  margin: 0;
  padding: 20px;
  border: 1px solid #333;
  border-radius: 12px;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 20px;
  height: 87vh;
}

.db-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.db-row-top {
  display: flex;
  justify-content: flex-end;
}

.db-count-container {
  display: flex;
  justify-content: flex-end;
}

.db-count {
  border: 1px solid #444;
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: bold;
  color: #C8AA6E;
}

.db-details {
  display: grid;
  gap: 12px;
}

.db-title,
.db-description {
  padding: 6px 10px;
  border: 1px solid #444;
  border-radius: 6px;
  background: #222;
  color: #ccc;
  font-size: 14px;
  line-height: 1.4;
  height: 34px;
}

.db-title {
  flex: 0 0 25%;
}

.db-description {
  flex: 1;
}

.db-tags-wrapper {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.db-tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.db-tag {
  padding: 4px 8px;
  border: 1px solid #444;
  border-radius: 6px;
  background: #333;
  font-size: 12px;
  cursor: pointer;
  color: #ccc;
  transition: 0.2s;
}

.db-tag:hover {
  background: #C8AA6E;
  color: #111;
}

.db-tags-selected {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.db-tag-selected {
  padding: 4px 8px;
  background: #C8AA6E;
  color: #111;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
}

.db-tag-selected:hover {
  opacity: 0.7;
}

.db-list {
  overflow-y: auto;
  gap: 20px;
  padding-right: 15px;
  margin: 6px 0;
}

.db-section {
  display: flex;
  flex-direction: column;
  margin-bottom: 16px;
}

.db-title-label {
  font-size: 13px;
  font-weight: bold;
  color: #C8AA6E;
  border-bottom: 1px solid #444;
  display: flex;
  justify-content: space-between;
}

.db-section-count {
  font-size: 14px;
}

.db-card {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0px;
  background: #222;
  padding: 6px;
  border-radius: 6px;
  transition: 0.2s;
}

.db-card:hover {
  box-shadow: inset 0 0 0 2px #333;
}

.db-card,
.db-card * {
  cursor: default;
  user-select: none;
}

.db-mana {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #000;
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 12px;
}

.db-card-info {
  flex: 1;
  font-size: 12px;
  display: flex;
  flex-direction: column;
}

.db-card-name {
  font-weight: bold;
}

.db-card-type {
  font-size: 11px;
  color: #E9DCC9;
}

.card-preview {
  position: fixed;
  display: none;
  z-index: 9999;
  pointer-events: none;
  border: 2px solid #C8AA6E;
  border-radius: 8px;
  padding: 12px;
  background: #1a1a1a;
  box-shadow: 0 0 15px rgb(0 0 0 / 50%);
  transition: transform 0.2s, opacity 0.2s;
}

.card-preview img {
  display: block;
  max-width: 333px;
}

.db-qty {
  display: flex;
  align-items: center;
  gap: 4px;
}

.db-qty button {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  border: 1px solid #444;
  background: transparent;
  color: #fff;
  cursor: pointer;
  transition: 0.2s;
}

.db-qty button:hover {
  background: #333;
}

.db-qty .qty {
  min-width: 18px;
  text-align: center;
  font-weight: bold;
  color: #fff;
}

.db-card .db-qty button {
  cursor: pointer;
}

.db-card img {
  width: 40px;
  height: 35px;
  margin-left: 4px;
  object-fit: cover;
  object-position: top;
  border-radius: 4px;
}

.db-btns {
  display: flex;
  flex-direction: column;
  margin-top: auto;
  gap: 10px;
  width: 100%;
}

.db-btn-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.db-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 75px;
  gap: 4px;
  padding: 10px 20px;
  background: #333;
  border: 1px solid #444;
  border-radius: 6px;
  color: #ccc;
  cursor: pointer;
  text-align: center;
  font-size: 12px;
  white-space: nowrap;
  transition: 0.2s;
}

.db-btn i {
  font-size: 16px;
  position: relative;
  bottom: 1px;
}

.db-btn:hover {
  background: #2a2a2a;
}

.db-save {
  width: 100%;
  padding: 10px 20px;
  background: #C8AA6E;
  border: none;
  border-radius: 6px;
  color: #111;
  font-weight: bold;
  cursor: pointer;
  transition: 0.2s;
}

.db-save:hover {
  background: #a98c52;
  color: #000;
}

.db-save-info {
  display: block;
  color: #888;
  margin-top: 5px;
  font-size: 12px;
}

#clear-modal .modal-content {
  width: 100%;
  max-width: 440px;
  margin: 0 16px;
  padding: 24px;
  background: #1a1a1a;
  border: 2px solid #C8AA6E;
  border-radius: 8px;
  box-sizing: border-box;
  text-align: center;
  box-shadow: 0 0 15px rgba(0,0,0,0.5);
}

#clear-modal h3 {
  margin-bottom: 12px;
  font-size: 1.6rem;
  color: #C8AA6E;
}

#clear-modal p {
  margin-bottom: 22px;
  font-size: 1rem;
  color: #bbb;
}

#clear-modal .modal-content > div {
  display: flex;
  justify-content: center;
  gap: 16px;
}

#import-modal .modal-content {
  width: 100%;
  max-width: 440px;
  margin: 0 16px;
  padding: 24px;
  background: #1a1a1a;
  border: 2px solid #C8AA6E;
  border-radius: 8px;
  box-sizing: border-box;
  text-align: center;
  box-shadow: 0 0 15px rgba(0,0,0,0.5);
}

#import-modal h3 {
  margin-bottom: 12px;
  font-size: 1.6rem;
  color: #C8AA6E;
}

#import-modal p {
  margin-bottom: 16px;
  font-size: 1rem;
  color: #bbb;
}

#import-modal textarea {
  width: 100%;
  min-height: 120px;
  padding: 10px;
  border-radius: 6px;
  background: #121212;
  color: #eee;
  font-family: monospace;
  resize: none;
  box-sizing: border-box;
  margin-bottom: 20px;
}

#import-modal .modal-content > div:last-child {
  display: flex;
  justify-content: center;
  gap: 16px;
}

#export-modal .modal-content {
  width: 100%;
  max-width: 440px;
  margin: 0 16px;
  padding: 24px;
  background: #1a1a1a;
  border: 2px solid #C8AA6E;
  border-radius: 8px;
  box-sizing: border-box;
  text-align: center;
  box-shadow: 0 0 15px rgba(0,0,0,0.5);
}

#export-modal h3 {
  margin-bottom: 12px;
  font-size: 1.6rem;
  color: #C8AA6E;
}

#export-modal p {
  margin-bottom: 22px;
  font-size: 1rem;
  color: #bbb;
}

#export-modal .modal-content > div {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.export-code-container {
  background: #111;
  color: #eee;
  padding: 12px;
  border-radius: 6px;
  border: 1px solid #555;
  max-width: 100%;
  overflow-x: auto;
  margin-bottom: 16px;
}

#export-code {
  margin: 0;
  font-family: monospace;
  white-space: pre-wrap;
  word-break: break-word;
}

#preview-deck-name {
  color: #efefef;
  font-size: 26px;
  margin: 0;
}

#preview-deck-tags {
  color: #C8AA6E;
  font-size: 13px;
  font-weight: bold;
  margin: 5px 0 20px;
}

.preview-panel {
  background: #181818;
  border: 1px solid #2a2a2a;
  border-radius: 6px;
  padding: 20px;
  margin-bottom: 25px;
}

.block-label.high-contrast {
  color: #fff;
  font-size: 13px;
  font-weight: bold;
  text-transform: uppercase;
  border-left: 3px solid #C8AA6E;
  padding-left: 10px;
  margin-bottom: 15px;
  display: block;
}

.preview-top-row {
  display: flex;
  gap: 25px;
  width: 100%;
  flex-wrap: wrap;
}

.legend-box {
  flex: 1;
  min-width: 100px;
}

.runes-box {
  flex: 2;
  min-width: 200px;
}

.fields-box {
  flex: 3;
  min-width: 300px;
}

.preview-grid {
  display: grid;
  gap: 12px;
}

.grid-1 {
  grid-template-columns: 1fr;
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.main-deck-grid,
.sideboard-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 12px;
}

.preview-card {
  position: relative;
  width: 100%;
}

.preview-card img {
  width: 100%;
  aspect-ratio: 3 / 4.2;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid #444;
  image-rendering: -webkit-optimize-contrast;
}

.preview-qty {
  position: absolute;
  bottom: 5px;
  right: 5px;
  background: #C8AA6E;
  color: #000;
  font-weight: 700;
  font-size: 14px;
  padding: 6px 10px;
  border: 2px solid #000;
  border-radius: 32px;
}

.preview-actions {
  position: absolute;
  top: 20px;
  right: 40px;
  display: flex;
  gap: 12px;
}

.db-preview-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.96);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
}

.preview-content {
  background: #0a0a0a;
  border-radius: 8px;
  width: 90%;
  height: 80%;
  position: relative;
  overflow-y: auto;
  padding: 60px 40px 40px;
}

.preview-content::-webkit-scrollbar {
  width: 10px;
}

.preview-content::-webkit-scrollbar-thumb {
  background-color: #333;
  border-radius: 6px;
}

.preview-content::-webkit-scrollbar-thumb:hover {
  background-color: #C8AA6E;
}

.preview-content {
  scrollbar-width: thick;
  scrollbar-color: #C8AA6E #1b1b1b;
}

.db-cancel {
  padding: 10px 20px;
  min-width: 120px;
  font-size: 1rem;
  border-radius: 6px;
  border: 1px solid #444;
  background: #333;
  color: #ccc;
  cursor: pointer;
  transition: 0.2s;
}

.db-cancel:hover {
  background: #2a2a2a;
}

.db-confirm-clear,
.db-confirm-import,
.db-confirm-export,
.preview-screenshot {
  padding: 10px 20px;
  min-width: 120px;
  font-size: 1rem;
  border-radius: 6px;
  border: 1px solid #44475a;
  background: #44475a;
  color: #fff;
  cursor: pointer;
  transition: 0.2s;
}

.db-confirm-clear:hover,
.db-confirm-import:hover,
.db-confirm-export:hover,
.preview-screenshot:hover {
  background: #2f3240;
}

.constraints-popup {
  position: fixed;
  top: 33px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  color: #fff;
  text-align: center;
  padding: 10px 20px;
  border-radius: 6px;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 9999;
}

.constraints-popup.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 1100px) {
  .legend-box {
    flex: 1;
  }

  .runes-box {
    flex: 2;
  }

  .fields-box {
    flex: 1 1 100%;
  }
}

@media (max-width: 900px) {
  .db-list {
    flex-direction: column;
  }

  .db-title,
  .db-description {
    flex: unset;
  }

  .db-save {
    width: 100%;
  }

  .constraints-popup {
    font-size: 13px;
  }
}

@media (max-width: 800px) {
  .main-deck-grid,
  .sideboard-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 786px) {
  .card-title {
    font-size: 22px;
  }
  .card-preview img {
    max-width: 275px;
  }

  .constraints-popup {
    font-size: 11px;
  }
}

@media (max-width: 600px) {
  .card-title {
    font-size: 20px;
  }

  .card-p
  .legend-box,
  .runes-box {
    flex: 1 1 100%;
  }

  #preview-modal button {
    min-width: 60px;
    padding: 6px;
    font-size: 0.75rem;
  }

  .preview-actions {
    gap: 8px;
  }
}

@media (max-width: 444px) {
  .card-title {
    font-size: 18px;
  }

  .preview-deck-tags {
    font-size: 10px;
  }

  .legend-box,
  .runes-box,
  .fields-box {
    flex: 1 1 100%;
    min-width: 0;
  }

  #preview-runes,
  #preview-battlefields {
    grid-template-columns: repeat(1, 1fr);
    gap: 6px;
  }

  .main-deck-grid,
  .sideboard-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }

  .preview-qty {
    font-size: 12px;
    padding: 3px 6px;
    border-width: 1px;
  }
}

@media (max-width: 400px) {
  .db-card-name {
    display: none;
  }

  .db-card-type {
    font-size: 8px;
  }

  .db-extra {
    min-width: 0px;
  }

  #clear-modal .modal-content,
  #export-modal .modal-content,
  #import-modal .modal-content {
    padding: 16px;
  }

  #clear-modal h3,
  #export-modal h3,
  #import-modal h3, {
    font-size: 1rem;
  }

  #clear-modal p,
  #export-modal p,
  #import-modal p {
    font-size: 0.8rem;
  }

  #clear-modal button,
  #export-modal button,
  #import-modal button {
    min-width: 60px;
    padding: 6px;
    font-size: 0.75rem;
  }
}




/* --------------- DECK BUILDER - Deck Cards Browser --------------- */
.db-browser {
  flex: 2;
  max-width: 66%;
  margin: 0;
  padding: 20px;
  border: 1px solid #333;
  border-radius: 12px;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 20px;
  height: 87vh;
}

.db-browser-header {
  display: flex;
  gap: 6px;
}

.db-browser-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  background: #222;
  border: none;
  cursor: pointer;
  color: #ccc;
  font-weight: 600;
  font-size: 13px;
  border-radius: 6px;
  transition: background 0.2s ease, color 0.2s ease;
}

.db-browser-btn img {
  width: 20px;
  height: 20px;
}

.db-browser-btn:hover {
  background: #333;
  color: #fff;
}

.db-browser-btn.active {
  background: #C8AA6E;
  color: #111;
}

.db-browser-btn.active img {
  filter: brightness(0);
}

.db-browser-cards {
  overflow-y: auto;
}

.db-browser-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  padding-right: 15px;
}

.db-browser-cards::-webkit-scrollbar,
.db-list::-webkit-scrollbar {
  width: 10px;
}

.db-browser-cards::-webkit-scrollbar-track,
.db-list::-webkit-scrollbar-track {
  background: #1b1b1b;
  border-radius: 6px;
}

.db-browser-cards::-webkit-scrollbar-thumb,
.db-list::-webkit-scrollbar-thumb {
  background-color: #333;
  border-radius: 6px;
}

.db-browser-cards::-webkit-scrollbar-thumb:hover,
.db-list::-webkit-scrollbar-thumb:hover {
  background-color: #C8AA6E;
}

.db-browser-cards,
.db-list {
  scrollbar-width: thick;
  scrollbar-color: #C8AA6E #1b1b1b;
}

.db-browser-card {
  position: relative;
  border: 2px solid transparent;
  border-radius: 6px;
  transition: 0.2s;
  container-type: inline-size;
}

.db-browser-card:hover {
  border-color: #C8AA6E;
  cursor: pointer;
}

.is-banned::after {
  content: "BANNED";
  position: absolute;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-10deg);
  font-family: "Arial Black", sans-serif;
  font-size: 14cqi;
  color: #ff3333;
  background: rgba(0, 0, 0, 0.5);
  border: 2px solid #ff3333;
  padding: 2cqi 6cqi;
  border-radius: 4px;
}

.db-browser-card img {
  width: 100%;
  display: block;
  border-radius: 6px;
}

.db-browser-info {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border-radius: 100%;
  background: rgba(51, 51, 51, 0.8);
  text-align: center;
  line-height: 22px;
  font-weight: bold;
  font-size: 13px;
  cursor: pointer;
  transition: 0.2s;
  border: 1px solid #444;
  color: #fff;
}

.db-browser-info:hover {
  background: #C8AA6E;
  color: #111;
  box-shadow: 0 0 4px rgba(0,0,0,0.5);
}

.db-browser-qty {
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 4px;
  align-items: center;
  background: rgba(0, 0, 0, 0.6);
  padding: 3px 6px;
  border-radius: 4px;
  cursor: default;
}

.db-browser-qty button {
  width: 26px;
  height: 26px;
  border-radius: 4px;
  border: 1px solid #444;
  background: #333;
  color: #fff;
  cursor: pointer;
  transition: 0.2s;
}

.db-browser-qty button:hover {
  background: #C8AA6E;
  color: #111;
}

.db-browser-qty .qty {
  min-width: 20px;
  text-align: center;
  font-weight: bold;
  color: #fff;
}

@media (max-width: 1400px) {
  .db-browser-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (max-width: 1100px) {
  .db-container {
    display: inline-grid;
    margin: 25px 10px;
  }

  .db-deck {
    order: 1;
    max-width: 100%;
  }

  .db-browser {
    order: 2;
    max-width: 100%;
    height: 125vh;
  }

  .db-browser-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .db-browser-btn span {
    display: none;
  }

  .db-browser-btn {
    padding: 8px;
  }
}

@media (max-width: 900px) {
  .db-browser-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 674px) {
  .db-set-filter {
    margin: auto;
  }

  .db-color-filters {
    margin: auto;
  }

  .db-filters-section {
    display: grid;
  }

  .db-filter-group{
    margin: auto;
    justify-content: center;
  }
}

@media (max-width: 650px) {
  .db-browser-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 400px) {
  .db-browser-qty {
    padding: 0;
    gap: 0;
  }

  .db-browser-grid {
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  }

  .db-btn {
    min-width: 0;
    font-size: 0px;
    text-align: center;
  }

  img {
    max-width: 100%;
  }
}




/* --------------- DECK BUILDER - Filters Top Bar --------------- */
.db-filters-top {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.db-reset-filters {
  font-size: 16px;
  background: #333;
  color: #ccc;
  border: 1px solid #444;
  border-radius: 6px;
  padding: 5px;
  cursor: pointer;
  display: flex;
}

.db-reset-filters:hover {
  background: #2a2a2a;
}

.db-reset-filters i {
  transition: transform 0.3s ease;
}

.db-reset-filters:hover i {
  transform: rotate(180deg);
}

.db-search {
  flex: 1;
  padding: 7px 12px;
  border-radius: 6px;
  border: 1px solid #444;
  background: #222;
  color: #fff;
  font-size: 12px;
}

.set-btn {
  padding: 7px 12px;
  border-radius: 6px;
  border: 1px solid #444;
  background: #222;
  color: #fff;
  font-size: 12px;
  cursor: pointer;
  text-align: center;
  transition: 0.2s;
}

.set-btn:hover {
  background: #C8AA6E;
  color: #111;
  border-color: #C8AA6E;
}

.set-btn.active {
  background: #C8AA6E;
  color: #111;
  border-color: #C8AA6E;
}

.db-search:focus,
.db-set-filter:focus {
  outline: none;
  box-shadow: none;
}

.db-color-filters {
  display: flex;
  gap: 8px;
}

.db-color-filter {
  width: 24px;
  height: 24px;
  cursor: pointer;
  padding: 5px;
  background-color: transparent;
  opacity: 0.4;
  transition: transform 0.2s, opacity 0.2s;
}

.db-color-filter:hover {
  transform: scale(1.2);
  opacity: 1;
}

.db-color-filter img {
  width: 24px;
  height: 24px;
}

.db-color-filter.active {
  transform: scale(1.4);
  opacity: 1;
}

.db-filters-section {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.db-filters-hidden {
  display: none !important;;
}

.db-filters-section {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  padding: 0;
}

.db-filter-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.db-type-filter {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 2px solid #7a5230;
  border-radius: 999px;
  background: none;
  color: #ddd;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.db-type-filter img {
  width: 16px;
  height: 16px;
}

.db-type-filter:hover {
  border-color: #ad8461;
  background: rgba(200, 170, 110, 0.1);
  color: #ddd;
}

.db-type-filter.active {
  border-color: #ad8461;
  background: rgba(200, 170, 110, 0.2);
  color: #ddd;
}

.db-energy-filter {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  transition: transform 0.15s ease, border-color 0.15s ease;
  border: 2px solid #7a5230;
}

.db-energy-filter:hover {
  transform: scale(1.12);
  border-color: #C8AA6E;
}

.db-energy-filter.active {
  transform: scale(1.14);
  border: 3px solid #C8AA6E;
}

.db-energy-filter.active:hover {
  transform: scale(1.18);
  border-color: #C8AA6E;
}

@media (max-width: 1200px) {
  .db-type-filter {
    gap: 0;
    font-size: 0;
  }

  .db-type-filter img {
    width: 20px;
    height: 20px;
  }
}

@media (max-width: 768px) {
  .db-filters-section {
    justify-content: center;
    gap: 15px;
  }
}




/* --------------- DECK - Deck Filters --------------- */

.decks-filters {
  width: 75%;
  margin: 35px auto 25px auto;
}

.decks-filters-top {
  display: flex;
  gap: 14px;
}

.filters-row {
  display: flex;
  gap: 12px;
  align-items: center;
}

.filters-main {
  flex: 1;
}

.decks-reset {
  font-size: 18px;
  background: #333;
  color: #ccc;
  border: 1px solid #444;
  border-radius: 6px;
  padding: 7px;
  cursor: pointer;
  display: flex;
  align-items: center;
}

.decks-reset:hover {
  background: #2a2a2a;
}

.decks-reset i {
  transition: transform 0.3s ease;
}

.decks-reset:hover i {
  transform: rotate(180deg);
}

.decks-search {
  flex: 1;
  padding: 9px 14px;
  border-radius: 6px;
  border: 1px solid #444;
  background: #222;
  color: #fff;
  font-size: 13px;
}

.decks-dropdown {
  position: relative;
  width: 180px;
  font-size: 13px;
}

.decks-dropdown-selected {
  background: #222;
  border: 1px solid #444;
  border-radius: 6px;
  padding: 8px 12px;
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.decks-dropdown-selected:hover {
  border-color: #666;
}

.decks-dropdown-menu {
  position: absolute;
  top: 110%;
  left: 0;
  width: 100%;
  background: #1c2024;
  border: 1px solid #2a2f35;
  border-radius: 10px;
  max-height: 260px;
  overflow-y: auto;
  display: none;
  z-index: 1000;
}

.decks-dropdown.open .decks-dropdown-menu {
  display: block;
}

.decks-dropdown-menu::-webkit-scrollbar {
  width: 10px;
}

.decks-dropdown-menu::-webkit-scrollbar-track {
  background: #1b1b1b;
  border-radius: 6px;
}

.decks-dropdown-menu::-webkit-scrollbar-thumb {
  background-color: #333;
  border-radius: 6px;
}

.decks-dropdown-menu::-webkit-scrollbar-thumb:hover {
  background-color: #C8AA6E;
}

.decks-dropdown-option {
  padding: 8px 12px;
  color: #ccc;
  cursor: pointer;
}

.decks-dropdown-option:hover {
  background: #2a2f35;
}

@media (max-width: 1124px) {
  .decks-filters-top {
    flex-direction: column;
    align-items: stretch;
  }

  .filters-main {
    width: 100%;
  }

  .filters-dropdowns {
    width: 100%;
  }

  .filters-dropdowns .decks-dropdown {
    flex: 1;
  }
}

@media (max-width: 500px) {
  .filters-dropdowns {
    flex-direction: column;
  }

  .filters-dropdowns .decks-dropdown {
    width: 100%;
    flex: none;
  }
}

@media (max-width: 350px) {
  .filters-main {
    flex-direction: column;
    align-items: stretch;
  }

  .decks-reset {
    justify-content: center;
  }
}




/* --------------- DECK - Deck Collection --------------- */
.decks-list {
  width: 75%;
  margin: 50px auto;
  color: #fff;
}

.decks-list h2 {
  margin-bottom: 32px;
  font-size: 1.6rem;
  border-bottom: 2px solid #C8AA6E;
}

.deck-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  width: 100%;
}

.deck-card {
  display: flex;
  flex-direction: column;
  background: #1a1a1a;
  border-radius: 12px;
  padding: 14px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, background 0.2s ease;
}

.deck-card:hover {
  transform: translateY(-4px);
  background: #222;
}

.deck-top-row {
  display: flex;
  gap: 12px;
}

.deck-image img {
  height: 185px;
  border-radius: 8px;
}

.deck-details {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.deck-title {
  font-size: 1.2rem;
  font-weight: bold;
  white-space: normal;
  word-break: break-all;
  overflow-wrap: break-word;
  max-width: 100%;
}

.deck-description {
  font-size: 0.85rem;
  color: #ccc;
  margin: auto 0;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
}

.deck-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: auto;
}

.tag {
  background: #C8AA6E;
  color: #1a1a1a;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.8rem;
}

.decks-list hr {
  margin: 10px 0;
  border: 0;
  border-top: 1px solid #C8AA6E;
}

.deck-bottom-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.creator {
  display: flex;
  align-items: center;
  gap: 6px;
}

.user-img {
  width: 26px;
  height: 26px;
  border-radius: 50%;
}

.deck-time {
  font-size: 0.75rem;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: bold;
}

@media (max-width: 1452px) {
  .deck-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 1052px) {
  .tag {
    font-size: 0.6rem;
  }

  .deck-title {
    font-size: 1rem;
  }

  .deck-description {
    font-size: 0.75rem;
  }
}

@media (max-width: 768px) {
  .decks-list h2 {
    font-size: 1.2rem;
  }

  .deck-grid {
    grid-template-columns: 1fr;
  }

  .tag {
    font-size: 0.8rem;
  }

  .deck-title {
    font-size: 1.2rem;
  }

  .deck-description {
    font-size: 0.85rem;
  }
}

@media (max-width: 400px) {
  .deck-top-row {
    display: grid;
  }

  .deck-image img {
    width: 100%;
    height: 100%;
  }

  .deck-details {
    text-align: center;
  }

  .deck-tags {
    justify-content: center;
    margin-top: 12px;
  }

  .deck-bottom-row {
    display: grid;
    justify-content: center;
    gap: 14px;
    margin-top: 5px;
  }
}




/* --------------- DECK DETAILS - Deck Details --------------- */
.no-results-box {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
  background: #1a1a1a;
  border: 1px dashed rgba(200, 170, 110, 0.4);
  border-radius: 15px;
}

.no-results-box i {
  font-size: 50px;
  margin-bottom: 20px;
  display: block;
}

.no-results-box p {
  color: #888;
  margin-bottom: 25px;
}

.deck-view-page {
  width: 85%;
  margin: 60px auto;
  color: #fff;
}

.deck-view-page section {
  background: #181818;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 25px;
}

.deck-view-header {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  align-items: flex-start;
  margin-bottom: 50px;
}

.deck-view-header-left {
  flex: 1;
}

.deck-view-title {
  font-size: 34px;
  margin-bottom: 12px;
  overflow-wrap: break-word;
}

.deck-view-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.deck-view-tag {
  background: #C8AA6E;
  color: #111;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}

.deck-view-description {
  color: #bbb;
  margin-bottom: 18px;
  max-width: 700px;
  line-height: 1.5;
  overflow-wrap: break-word;
}

.deck-view-meta {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 13px;
  color: #888;
}

.deck-view-author {
  color: #C8AA6E;
  font-weight: bold;
  text-decoration: none;
}

.deck-view-author:hover {
  text-decoration: underline;
}

.deck-view-header-right {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex-wrap: wrap;
}

.deck-view-export,
.deck-view-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 6px;
  font-weight: 500;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  transition: 0.2s;
}

.deck-view-export {
  background: #7b5fb3;
  border: none;
  color: #fff;
}

.deck-view-export:hover {
  background: #624699;
}

.deck-view-link {
  color: #fff;
}

.deck-view-edit {
  background: #6abf6a;
}

.deck-view-edit:hover {
  background: #4f944f;
}

.deck-view-screenshot {
  color: #fff;
  background: #5a9bd8;
}

.deck-view-screenshot:hover {
  background: #3f7fbf;
}

.deck-view-delete {
  border: 0;
  background: #d85a5a;
}

.deck-view-delete:hover {
  background: #bf3f3f;
}

.deck-view-export i,
.deck-view-link i {
  font-size: 16px;
}

.deck-view-top {
  display: flex;
  gap: 30px;
  margin-bottom: 50px;
  flex-wrap: wrap;
}

.deck-view-legend {
  flex: 1;
}

.deck-view-runes {
  flex: 2;
}

.deck-view-battlefields {
  flex: 3;
}

.deck-view-block-title {
  font-size: 13px;
  text-transform: uppercase;
  font-weight: bold;
  margin-bottom: 15px;
  border-left: 3px solid #C8AA6E;
  padding-left: 10px;
}

.deck-view-legend-grid {
  display: grid;
  grid-template-columns: 1fr;
}

.deck-view-rune-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.deck-view-battlefield-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.deck-view-main-grid,
.deck-view-side-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 12px;
}

.deck-view-card {
  position: relative;
  container-type: inline-size;
  border: 2px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.deck-view-card img {
  width: 100%;
  aspect-ratio: 3 / 4.2;
  object-fit: cover;
  border-radius: 4px;
  transition: transform 0.2s ease, border-color 0.2s ease;
  image-rendering: -webkit-optimize-contrast;
}

.deck-view-card:hover {
  border-color: #C8AA6E;
}

.deck-view-qty {
  position: absolute;
  bottom: 5px;
  right: 5px;
  background: #C8AA6E;
  color: #000;
  font-weight: 700;
  font-size: 14px;
  padding: 6px 10px;
  border: 2px solid #000;
  border-radius: 32px;
}

#delete-modal .modal-content {
  width: 100%;
  max-width: 440px;
  margin: 0 16px;
  padding: 24px;
  background: #1a1a1a;
  border: 2px solid #C8AA6E;
  border-radius: 8px;
  box-sizing: border-box;
  text-align: center;
  box-shadow: 0 0 15px rgba(0,0,0,0.5);
}

#delete-modal h3 {
  margin-bottom: 12px;
  font-size: 1.6rem;
  color: #C8AA6E;
}

#delete-modal p {
  margin-bottom: 22px;
  font-size: 1rem;
  color: #bbb;
}

#delete-modal form {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap
}

#delete-modal .db-cancel,
#delete-modal .deck-view-delete {
  padding: 10px 20px;
  min-width: 120px;
  font-size: 1rem;
  border-radius: 6px;
  border: 1px solid #444;
  background: #333;
  color: #ccc;
  cursor: pointer;
  transition: 0.2s;
}

#delete-modal .db-cancel {
  background: #333;
  color: #ccc;
}

#delete-modal .db-cancel:hover {
  background: #2a2a2a;
}

#delete-modal .deck-view-delete {
  color: #fff;
  background: #d85a5a;
}

#delete-modal .deck-view-delete:hover {
  background: #bf3f3f;
}

@media (max-width: 1100px) {
  .deck-view-header {
    display: block;
  }

  .deck-view-header-right {
    margin-top: 16px;
  }

  .deck-view-battlefields {
    flex: 1 1 100%;
  }
}

@media (max-width: 1000px) {
  .deck-view-main-grid,
  .deck-view-side-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

@media (max-width: 800px) {
  .deck-view-main-grid,
  .deck-view-side-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 700px) {
  .deck-view-legend,
  .deck-view-runes {
    flex: 1 1 100%;
  }
}

@media (max-width: 600px) {
  .btn-text {
    display: none;
  }
}

@media (max-width: 550px) {
  .deck-view-main-grid,
  .deck-view-side-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .deck-view-title {
    font-size: 24px;
  }
}

@media (max-width: 444px) {
  .deck-view-legend,
  .deck-view-runes,
  .deck-view-battlefields {
    flex: 1 1 100%;
    max-width: 100%;
  }

  .deck-view-rune-grid,
  .deck-view-battlefield-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .deck-view-main-grid,
  .deck-view-side-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}





/* --------------- META - Tier List --------------- */
.meta-header {
  text-align: center;
  margin-top: 40px;
  padding: 0 10px;
}

.meta-overline {
  color: #C8AA6E;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 3px;
  display: block;
  margin-bottom: 8px;
}

.meta-title {
  font-size: 48px;
  font-weight: 900;
  color: #fff;
  margin: 0;
  text-transform: uppercase;
}

.meta-subtitle {
  color: #aaa;
  max-width: 600px;
  margin: 15px auto 40px;
  line-height: 1.6;
}

.analytics-stats {
  display: flex;
  gap: 20px;
  width: 80%;
  margin: 0 auto 30px;
}

.stat-card {
  flex: 1;
  background: #1a1a1a;
  border: 1px solid #333;
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  transition: transform 0.3s ease;
}

.stat-card:hover {
  border-color: #555;
  transform: translateY(-2px);
}

.stat-card-label {
  display: block;
  font-size: 11px;
  font-weight: 800;
  color: #777;
  letter-spacing: 1.5px;
  margin-bottom: 5px;
}

.stat-card-value {
  display: block;
  font-size: 20px;
  font-weight: 800;
  color: #C8AA6E;
}

.tab-navigation {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.tab-btn {
  background: transparent;
  color: #777;
  padding: 10px 25px;
  border-radius: 30px;
  cursor: pointer;
  font-weight: 700;
  text-transform: uppercase;
  transition: all 0.3s ease;
}

.tab-btn.active {
  background: #C8AA6E;
  color: #000;
}

.tab-btn:hover:not(.active) {
  background: #222;
  color: #fff;
}

.tab-btn .btn-icon {
  display: none;
  font-size: 20px;
}

.set-filter-navigation {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  justify-content: center;
}

.set-filter-navigation a {
  font-weight: 700;
  text-decoration: none;
}

.set-short {
    display: none;
}
.set-full {
    display: inline;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
  animation: fadeIn 0.4s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.meta-section {
  width: 80%;
  margin: 3% auto;
}

.tier-container {
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 12px;
  overflow: hidden;
}

.tier-row {
  display: flex;
  border-bottom: 1px solid #2a2a2a;
  transition: background 0.3s ease;
}

.tier-row:last-child {
  border-bottom: none;
}

.tier-row:hover {
  background: #222;
}

.tier-label {
  width: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  font-weight: 900;
  position: relative;
}

.tier-label::before {
  content: '';
  position: absolute;
  left: 0;
  top: 15%;
  bottom: 15%;
  width: 4px;
  border-radius: 0 4px 4px 0;
}

.tier-s {
  color: #ff4655;
}

.tier-s::before {
  background: #ff4655; box-shadow: 0 0 15px #ff4655;
}

.tier-a {
  color: #ffb01f;
}

.tier-a::before {
  background: #ffb01f; box-shadow: 0 0 15px #ffb01f;
}

.tier-b {
  color: #ffff7f;
}

.tier-b::before {
  background: #ffff7f; box-shadow: 0 0 15px #ffff7f;
}

.tier-c {
  color: #00ff88;
}

.tier-c::before {
  background: #00ff88; box-shadow: 0 0 15px #00ff88;
}

.tier-d {
  color: #a0a5b5;
}

.tier-d::before {
  background: #a0a5b5; box-shadow: 0 0 15px #a0a5b5;
}

.tier-content {
  flex: 1;
  padding: 20px;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  align-items: center;
}

.meta-legend-link {
  display: block;
  text-decoration: none;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.legend-circle {
  width: 65px;
  height: 65px;
  border-radius: 50%;
  border: 2px solid #333;
  object-fit: cover;
  display: block;
  transition: all 0.2s ease;
  filter: grayscale(20%);
}

.meta-legend-link:hover {
  transform: translateY(-3px);
}

.tier-row:has(.tier-s) .meta-legend-link:hover .legend-circle {
  border-color: #ff4655; box-shadow: 0 0 15px #ff4655; filter: grayscale(0%);
}

.tier-row:has(.tier-a) .meta-legend-link:hover .legend-circle {
  border-color: #ffb01f; box-shadow: 0 0 15px #ffb01f; filter: grayscale(0%);
}

.tier-row:has(.tier-b) .meta-legend-link:hover .legend-circle {
  border-color: #ffff7f; box-shadow: 0 0 15px #ffff7f; filter: grayscale(0%);
}

.tier-row:has(.tier-c) .meta-legend-link:hover .legend-circle {
  border-color: #00ff88; box-shadow: 0 0 15px #00ff88; filter: grayscale(0%);
}

.tier-row:has(.tier-d) .meta-legend-link:hover .legend-circle {
  border-color: #a0a5b5; box-shadow: 0 0 15px #a0a5b5; filter: grayscale(0%);
}

@keyframes status-glow {
  0% {
    transform: scale(1); opacity: 0.8;
  }

  100% {
    transform: scale(3); opacity: 0;
  }
}

@media (max-width: 1156px) {
  .meta-section {
    margin: 7.5% auto;
  }
}

@media (max-width: 700px) {
  .meta-section {
    width: 90%;
    margin: 12.5% auto;
  }

  .set-full {
    display: none;
  }

  .set-short {
    display: inline;
  }

  .tier-label {
    width: 50px;
    font-size: 30px;
  }

  .tier-label::before {
    width: 3px;
  }

  .tier-content {
    padding: 15px;
    gap: 15px;
    justify-content: center;
    margin-right: 25px;
  }

  .legend-circle {
    width: 50px;
    height: 50px;
  }

  .meta-status-bar {
    justify-content: center;
    margin-right: 0;
  }
}

@media (max-width: 450px) {
  .meta-section {
    margin: 17.5% auto;
  }

  .tier-label {
    width: 40px;
    font-size: 24px;
  }

  .tier-content {
    padding: 10px;
    gap: 10px;
    margin-right: 20px;
  }

  .legend-circle {
    width: 40px;
    height: 40px;
    border-width: 1px;
  }

  .last-updated {
    font-size: 9px;
    gap: 6px;
  }
}




/* --------------- META - Tournaments --------------- */
.results-table-wrapper {
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 12px;
  overflow-x: auto;
  scrollbar-width: thick;
  scrollbar-color: #333 #1b1b1b;
}

.results-table-wrapper::-webkit-scrollbar {
  height: 10px;
}

.results-table-wrapper::-webkit-scrollbar-track {
  background: #1b1b1b;
  border-radius: 6px;
}

.results-table-wrapper::-webkit-scrollbar-thumb {
  background-color: #333;
  border-radius: 6px;
}

.results-table-wrapper::-webkit-scrollbar-thumb:hover {
  background-color: #C8AA6E;
}
.results-table {
  width: 100%;
  border-collapse: collapse;
  color: #ddd;
  font-size: 14px;
}

.results-table thead th {
  background: #222;
  color: #C8AA6E;
  font-size: 11px;
  letter-spacing: 1.5px;
  padding: 15px 35px;
  border-bottom: 1px solid #333;
  text-align: center;
}

.results-table tbody td {
  padding: 15px 35px;
  border-bottom: 1px solid #2a2a2a;
  text-align: center;
}

.results-table tbody tr:last-child td {
  border-bottom: none;
}

.clickable-row {
  cursor: pointer;
  transition: background 0.2s ease;
}

.clickable-row:hover {
  background: #222;
}

.col-date {
  color: #777;
  font-family: monospace;
  white-space: nowrap;
}

.col-event {
  color: #fff;
}

.col-player {
  color: #eee;
}

.legend-info {
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
  min-width: 220px;
  justify-content: center;
}

.table-legend-img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid #444;
  object-fit: cover;
}

.legend-name {
  line-height: 1.2;
}

.pos-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  min-width: 45px;
  text-align: center;
}

.pos-1 {
  background: rgba(212, 175, 55, 0.15);
  color: #D4AF37;
  border: 1px solid rgba(212, 175, 55, 0.4);
}

.pos-2 {
  background: rgba(192, 192, 192, 0.15);
  color: #C0C0C0;
  border: 1px solid rgba(192, 192, 192, 0.4);
}

.pos-3 {
  background: rgba(205, 127, 50, 0.15);
  color: #CD7F32;
  border: 1px solid rgba(205, 127, 50, 0.4);
}

.pagination-meta {
  margin: 50px 0;
}

@media (max-width: 1000px) {
  .results-table {
    min-width: 900px;
  }
}

@media (max-width: 600px) {
  .tab-btn {
    padding: 8px 14px;
  }

  .tab-btn .btn-text {
    display: none;
  }

  .tab-btn .btn-icon {
    display: inline-block;
    vertical-align: middle;
  }

  .analytics-stats {
    gap: 10px;
  }

  .stat-card-value {
    font-size: 16px;
  }

  .results-table thead th {
    padding: 15px 8px;
    font-size: 10px;
  }

  .results-table tbody td {
    padding: 15px 8px;
  }

  .pos-badge {
    min-width: 22px;
    font-size: 10px;
    padding: 4px 8px;
  }
}

@media (max-width: 700px) {
  .analytics-stats {
    flex-direction: column;
    width: 90%;
  }
  .meta-title {
    font-size: 32px;
  }
}




/* --------------- PROFILE - Profile --------------- */
.profile-header {
  width: 75%;
  margin: 35px auto 25px auto;
}

.profile-banner {
  position: relative;
  height: 200px;
  border-radius: 12px;
  background: url("../img/brand/back.jpg") bottom / cover;
  border: 1px solid #333;
  display: flex;
  align-items: center;
  padding: 0 40px;
  overflow: hidden;
}

.profile-header-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
}

.profile-info-content {
  position: relative;
  z-index: 5;
  display: flex;
  gap: 25px;
}

.profile-avatar-wrapper {
  position: relative;
  width: 100px;
  height: 100px;
}

.profile-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 3px solid #1a1a1a;
  object-fit: cover;
  border: 2px solid #C8AA6E;
  box-shadow: 0 0 15px rgba(200, 170, 110, 0.4);
}

.profile-site-tag {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 12px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: #C8AA6E;
}

.profile-text-info .site-tag {
  font-weight: bold;
}

.profile-name {
  color: #fff;
  margin: 5px 0;
  font-size: 32px;
}

.member-since {
  color: #aaa;
  font-size: 12px;
  letter-spacing: 1px;
}

.profile-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 30px;
  width: 75%;
  margin: 0 auto 50px;
}

.profile-card {
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}

.profile-collection-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0px 0px 20px;
}

.set-item-progress {
  margin-bottom: 20px;
}

.progress {
  background: #333;
  border-radius: 10px;
  height: 6px;
  width: 100%;
  overflow: hidden;
}

.progress span {
  display: block;
  height: 100%;
  background: #C8AA6E;
}

.profile-line {
  flex: 1;
  height: 1px;
  background: #444;
  border: none;
  margin: 20px 0;
  opacity: 0.2;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 14px;
}

.stat-label {
  color: #ccc;
}

.stat-value {
  color: #C8AA6E;
  font-weight: bold;
}

.set-progress-list {
  margin-bottom: 15px;
}

.set-info {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 5px;
}

.set-code {
  color: #eee;
  font-weight: bold;
}

.settings-list {
  list-style: none;
  padding: 0;
}

.settings-list li a {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  color: #eee !important;
  text-decoration: none;
  font-size: 14px;
  transition: 0.2s;
  border-bottom: 1px solid #2a2a2a;
}

.settings-list li a i {
  color: #C8AA6E;
  font-size: 16px;
  width: 20px;
}

.settings-list li a:hover {
  color: #C8AA6E !important;
  padding-left: 5px;
}

.settings-list li a.danger:hover i {
  color: #FF6B6B !important;
}

.settings-list li a.danger:hover {
  color: #FF6B6B !important;
}

.decks-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.profile-btn {
  padding: 6px 15px;
  font-size: 12px;
  text-decoration:none;
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 0;
  background: #1a1a1a;
  border-radius: 8px;
  border: 2px dashed rgba(255, 255, 255, 0.1);
}

.empty-state i {
  font-size: 3rem;
  display: block;
  margin-bottom: 15px;
}

.empty-state p {
  margin-bottom: 20px;
  opacity: 0.7;
}

#decks-list-profile {
  margin: 5px 0;
}

.profile-decks {
  grid-template-columns: repeat(2, 1fr) !important;
}

#flash-data {
  display: none;
}

@media (max-width: 1250px) {
  .profile-grid {
    grid-template-columns: 1fr;
  }

  .profile-header, .profile-grid {
     width: 90%;
   }
}

@media (max-width: 900px) {
  .profile-info-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    gap: 15px;
  }

  .profile-name {
    font-size: 24px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    line-height: 1.2;
  }

  .profile-site-tag {
    font-size: 10px;
    letter-spacing: 2px;
  }

  .profile-banner {
    height: auto;
    padding: 30px 15px;
    justify-content: center;
  }

  .profile-text-info {
    width: 100%;
    padding: 0 10px;
  }

  .profile-decks {
    grid-template-columns: repeat(1, 1fr) !important;
  }
}




/* --------------- PROFILE - Avatar Modal --------------- */
.avatar-selection-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.avatar-selection-modal.hidden {
  display: none;
}

.avatar-modal-container {
  width: 33%;
  background: #1a1a1a;
  border: 2px solid #C8AA6E;
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 0 20px rgba(0,0,0,0.7);
  transition: width 0.3s ease;
}

.avatar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(65px, 1fr));
  gap: 15px;
  margin-bottom: 24px;
  max-height: 500px;
  overflow-y: auto;
  padding: 8px;
  scrollbar-width: thick;
  scrollbar-color: #C8AA6E #1b1b1b;
}

.avatar-grid::-webkit-scrollbar {
  width: 10px;
}

.avatar-grid::-webkit-scrollbar-thumb {
  background-color: #333;
  border-radius: 6px;
}

.avatar-grid::-webkit-scrollbar-thumb:hover {
  background-color: #C8AA6E;
}

.avatar-item {
  display: flex;
  justify-content: center;
  align-items: center;
}

.avatar-item input {
  display: none;
}

.avatar-img-choice {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid #1a1a1a;
  object-fit: cover;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.avatar-img-choice:hover {
  border-color: rgba(200, 170, 110, 0.5);
  transform: scale(1.1);
}

.avatar-item input:checked + .avatar-img-choice {
  border: 2px solid #C8AA6E;
  box-shadow: 0 0 12px rgba(200, 170, 110, 0.6);
}

.avatar-modal-footer {
  display: flex;
  justify-content: center;
  gap: 16px;
}

@media (max-width: 1356px) {
  .avatar-modal-container {
    width: 50%;
  }

  .avatar-grid {
    max-height: 400px;
  }

  .avatar-img-choice {
    width: 55px;
    height: 55px;
  }
}

@media (max-width: 768px) {
  .avatar-modal-container {
    width: 80%;
    padding: 16px;
  }

  .avatar-grid {
    grid-template-columns: repeat(auto-fill, minmax(55px, 1fr));
    gap: 10px;
    max-height: 300px;
  }

  .avatar-img-choice {
    width: 45px;
    height: 45px;
  }

  .avatar-modal-footer {
    gap: 10px;
  }

  .avatar-modal-footer button {
    padding: 8px 16px;
    font-size: 0.85rem;
  }
}

@media (max-width: 450px) {
  .avatar-grid {
    grid-template-columns: repeat(auto-fill, minmax(48px, 1fr));
    gap: 8px;
  }

  .avatar-img-choice {
    width: 40px;
    height: 40px;
  }

  .avatar-modal-footer button {
    padding: 6px 10px;
    min-width: 80px;
  }
}




/* --------------- FORM CONTAINER - Login, Register, Logout --------------- */
.form-container {
  width: 400px;
  margin: 8% auto;
  padding: 30px;
  border: 1px solid #333;
  border-radius: 12px;
  background: #1a1a1a;
  color: #fff;
  display: grid;
}

.form-logout {
  margin: 200px auto;
}

.form-container form {
  display: grid;
  gap: 18px;
}

.form-title {
  text-align: center;
  font-size: 24px;
  color: #C8AA6E;
  margin-bottom: 16px;
}

#form-title-delete {
  color: #ff6b6b;
}

.form-info {
  text-align: center;
  margin-top: 0px;
  margin-bottom: 30px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-field label {
  font-size: 14px;
  color: #aaa;
}

.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="password"],
.form-field select,
.form-field textarea {
  padding: 12px;
  border-radius: 6px;
  border: 1px solid #444;
  background: #222;
  color: #fff;
  font-size: 15px;
  width: 100%;
  box-sizing: border-box;
  font-family: inherit;
}

.form-field textarea {
  resize: none;
  min-height: 150px;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: #C8AA6E;
}

.password-wrapper {
  position: relative;
}

.password-wrapper input {
  width: 100%;
  box-sizing: border-box;
  padding-right: 40px;
}

.toggle-eye {
  position: absolute;
  top: 1px;
  right: 1px;
  bottom: 1px;
  width: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #aaa;
  border-left: 1px solid #444;
  border-radius: 0 5px 5px 0;
  transition: background 0.2s, color 0.2s;
}

.toggle-eye:hover {
  background-color: #333;
  color: #C8AA6E;
}

.toggle-eye.active {
    color: #C8AA6E;
}

.form-remember {
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.form-remember input[type="checkbox"] {
  accent-color: #C8AA6E;
}

.form-btn, .google-btn {
  width: 100%;
  padding: 12px;
  border-radius: 6px;
  border: none;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.25s;
}

.form-btn {
  background: #C8AA6E;
  color: #111;
}

.form-btn:hover {
  background: #b49658;
}

.danger-btn {
  background: #dc3545 !important;
  color: #fff !important;
}

.danger-btn:hover {
  background: #a71d2a !important;
}

.google-btn {
  display: flex;
  width: 100%;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #222;
  border: 1px solid #444;
  color: #fff;
  text-decoration: none;
}

.google-btn img {
  width: 20px;
  height: 20px;
}

.google-btn:hover {
  background: #333;
}

.form-footer {
  text-align: center;
  font-size: 13px;
  color: #aaa;
  line-height: 1.6;
}

.form-footer a {
  color: #C8AA6E;
  text-decoration: none;
}

.form-footer a:hover {
  text-decoration: underline;
}

.err {
  color: #ff6b6b;
  font-size: 12.5px;
  margin: 3px;
  line-height: 17px;
}

.success {
  color: #559358;
  font-size: 12.5px;
  margin: 3px;
  line-height: 17px;
}

@media (max-width: 650px) {
  .form-container {
    width: 66%;
  }
}

@media (max-width: 450px) {
  .form-container {
    width: 74%;
  }
}




/* --------------- ERRORS - 401/403/404/500  --------------- */
.error-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 90vh;
}

.error-box {
  max-width: 350px;
  width: 60%;
  padding: 30px;
  text-align: center;
  background: #1a1a1a;
  border: 1px solid rgba(200, 170, 110, 0.2);
  border-radius: 12px;
}

.error-img-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: 30px;
}

.error-icon {
  width: 100px;
  height: 100px;
  border: 2px solid #C8AA6E;
  border-radius: 50%;
  padding: 8px;
}

.error-code {
  position: absolute;
  bottom: 2px;
  right: 5px;
  background: #C8AA6E;
  color: #111;
  font-weight: bold;
  font-size: 14px;
  padding: 2px 8px;
  border-radius: 4px;
}

.error-title {
  color: #C8AA6E;
  font-size: 28px;
  margin: 0 0 15px 0;
}

.error-message {
  color: #a0a0a0;
  font-style: italic;
  font-size: 16px;
  line-height: 1.5;
}

.error-message span {
  font-weight: 800;
  color: #C8AA6E;
}

.error-nav {
  margin-top: 30px;
}

.error-btn {
  display: inline-block;
  width: 80%;
  padding: 12px 20px;
  background: #C8AA6E;
  border-radius: 6px;
  color: #111;
  font-weight: bold;
  text-decoration: none;
  transition: 0.2s;
}

.error-btn:hover {
  background: #a98c52;
  color: #000;
}




/* --------------- VERIFY - Verify Email Page  --------------- */
.page-wrapper-white {
  background-color: #fff;
}

.verify-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 80vh;
  padding: 20px;
}

.verify-h {
  font-size: 2.5rem;
  color: #333;
  margin-bottom: 10px;
  font-weight: 500;
}

.verify-p {
  font-size: 1.1rem;
  color: #666;
  margin-bottom: 5px;
}

.verify-a {
  color: #C8AA6E;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.verify-a:hover {
  color: #b49658;
  text-decoration: underline;
}

@media (max-width: 768px) {
  .verify-h {
    font-size: 1.8rem;
  }
}




/* --------------- ABOUT - About Page  --------------- */
.about-container {
  max-width: 800px;
  margin: 60px auto;
  padding: 0 20px;
  color: #ccc;
  line-height: 1.6;
}

.about-title {
  text-align: center;
  margin-bottom: 50px;
}

.about-title h1 {
  font-size: 48px;
  color: #fff;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.about-title span {
  color: #C8AA6E;
}

.about-title p {
  font-size: 15px;
  color: #888;
}

.about-section {
  margin-bottom: 40px;
  border-top: 1px solid #333;
  padding-top: 30px;
}

.about-features {
  padding: 25px 25px 25px 40px;
  background: #1a1a1a;
  border-radius: 8px;
}

.about-features li {
  margin-bottom: 12px;
  color: #ccc;
  font-size: 15px;
}

.about-features li::marker {
  color: #C8AA6E;
  font-size: 1.2rem;
}

.about-features li:last-child {
  margin-bottom: 0;
}

.about-features li strong {
  color: #fff;
}

.about-footer {
  margin-top: 60px;
  text-align: center;
  font-size: 13px;
  color: #666;
  border-top: 1px solid #222;
  padding-top: 20px;
}

@media (max-width: 600px) {
  .about-title h1 {
    font-size: 32px;
  }
  .about-container {
    margin: 30px auto;
  }
}




/* --------------- Privacy - Privacy Page  --------------- */
.ul-privacy {
  margin-left: 20px;
  margin-top: 10px;
}

.div-privacy {
  list-style-type: none;
  border-top: 1px solid #333;
  padding-top: 20px;
}

.p-privacy {
  margin-top: 10px;
}