/*-----------------------------------*\
  #CUSTOM PROPERTY
\*-----------------------------------*/

:root {
  /* Colors */
  --prussian-blue: #1d283a;
  --oxford-blue-2: #0f1729;
  --oxford-blue: #1a2233;
  --blue-violet: #000000;
  --blue-violet_a5: #7c3bed0d;
  --blue-violet_a10: #7c3bed1a;
  --alice-blue: #e1e7ef;
  --alice-blue-2: #e4eaf1;
  --cultured: #f3f4f6;
  --gainsboro: #e5e7eb;
  --light-gray: #d1d5db;
  --white: #ffffff;
  --white_a10: #ffffff1a;
  --manatee: #9ca3b0;
  --green-cyan: #059467;
  --cadet-grey: #94a3b8;
  --sienna: #896042;
  --maximum-red: #dc2828;
  --black: #000000;
  --gunmetal: #1f2937;
  --gold: #ffd700;

  /* Gradients */
  --linear-gradient-1: linear-gradient(to top left, #ffffff 0%, #000000);
  --linear-gradient-2: linear-gradient(to right, #c7c7c7, #dab290);

  /* Typography */
  --ff-primary: "Montserrat", sans-serif;
  --headline-lg: 3.6rem;
  --headline-md: 2.6rem;
  --title-lg: 2rem;
  --title-md: 1.8rem;
  --title-sm: 1.7rem;
  --body-lg: 2rem;
  --body-md: 1.7rem;
  --label-lg: 1.5rem;
  --label-md: 1.4rem;
  --fw-700: 700;
  --fw-600: 600;
  --fw-500: 500;

  /* Spacing */
  --section-padding: 32px;

  /* Box shadow */
  --shadow-1: 0 0 3px hsl(215, 28%, 17%);
  --shadow-2: 0 5px 13px hsl(215, 28%, 17%);
  --shadow-3: 0 5px 13px hsl(217, 19%, 27%);
  --shadow-4: 0 0 3px hsl(217, 19%, 27%);
  --shadow-5: 0 5px 13px hsla(214, 19%, 29%, 0.2);

  /* Border radius */
  --radius-circle: 50%;
  --radius-pill: 100px;
  --radius-12: 12px;
  --radius-8: 8px;
  --radius-6: 6px;

  /* Transitions */
  --transition-1: 0.25s ease;
  --transition-2: 0.5s ease;
}

/*-----------------------------------*\
  #RESET
\*-----------------------------------*/

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

li {
  list-style: none;
}

a,
img,
span,
input,
button,
ion-icon {
  display: block;
}

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

img {
  height: auto;
  max-width: 100%; /* Make images responsive */
}

input,
button {
  background: none;
  border: none;
  font: inherit;
}

input {
  width: 100%;
}

button {
  cursor: pointer;
}

ion-icon {
  pointer-events: none;
  color: var(--white);
}

html {
  font-family: var(--ff-primary);
  font-size: 10px;
  scroll-behavior: smooth;
}

body {
  background: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)),
    url("../images/background.png") repeat-y center top;
  background-size: 100%;
  color: var(--cadet-grey);
  font-size: 1.6rem;
  line-height: 1.5;
  z-index: 1;
}

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background-color: hsl(0, 0%, 98%);
}

::-webkit-scrollbar-thumb {
  background-color: hsl(0, 0%, 80%);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background-color: hsl(0, 0%, 70%);
}

/*-----------------------------------*\
  #REUSED STYLE
\*-----------------------------------*/

.container {
  padding-inline: 12px;
}

.body-bg-shape {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background-image: var(--linear-gradient-1);
  border-radius: var(--radius-circle);
  filter: blur(200px);
  z-index: -1;
}

.headline-lg {
  color: var(--white);
  font-size: var(--headline-lg);
  font-weight: var(--fw-700);
}

.headline-md {
  font-size: var(--headline-md);
  color: var(--white);
  font-weight: var(--fw-600);
}

.headline-lg,
.headline-md {
  line-height: 1.35;
}

.title-lg {
  font-size: var(--title-lg);
  color: var(--white);
  font-weight: var(--fw-600);
}

.title-md {
  font-size: var(--title-md);
  color: var(--white);
  font-weight: var(--fw-600);
}

.title-sm {
  font-size: var(--title-sm);
  color: var(--white);
  font-weight: var(--fw-600);
}

.body-lg {
  font-size: var(--body-lg);
}

.body-md {
  font-size: var(--body-md);
}

.label-lg {
  font-size: var(--label-lg);
}

.label-md {
  font-size: var(--label-md);
}

.btn-icon {
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-circle);
  border: 1px solid var(--blue-violet);
}

.btn-icon ion-icon {
  --ionicon-stroke-width: 50px;
}

.btn-icon.primary {
  background-color: var(--blue-violet);
  transition: var(--transition-1);
}

.btn-icon.primary:is(:hover, :focus-visible) {
  background-color: var(--sienna);
  border-color: var(--sienna);
}

#walletConnectBtn {
  width: auto; /* Remove fixed width */
  height: auto; /* Remove fixed height */
  padding: 8px 20px;
  border-radius: var(--radius-pill);
  background-color: rgba(255, 255, 255, 0.2); /* Transparent white */
  backdrop-filter: blur(10px); /* Glass effect */
  color: var(--white);
  display: flex;
  align-items: center;
  font-size: var(--body-md);
  font-weight: var(--fw-600);
  border: none;
  transition: var(--transition-1);
}

/* Hover/Focus State */
#walletConnectBtn:is(:hover, :focus-visible) {
  background-color: var(--sienna);
}

.link\:hover:is(:hover, :focus-visible) {
  color: var(--blue-violet);
}

.section {
  padding-block: var(--section-padding);
}

.btn {
  background-color: var(--blue-violet);
  color: var(--white);
  max-width: max-content;
  font-size: var(--body-md);
  font-weight: var(--fw-600);
  padding: 8px 20px;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition-1);
}

.btn:is(:hover, :focus-visible) {
  background-color: var(--sienna);
}

.text-center {
  text-align: center;
}

.section-title {
  margin-block-end: 44px;
}

.card {
  background-color: var(--oxford-blue-2);
  border-radius: var(--radius-8);
}

.card-banner {
  border-radius: var(--radius-8);
}

.img-holder {
  aspect-ratio: var(--width) / var(--height);
  background-color: var(--oxford-blue);
  overflow: hidden;
}

.img-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-2);
}

.btn-link {
  display: flex;
  align-items: center;
  gap: 4px;
  max-width: max-content;
  color: var(--white);
  font-weight: var(--fw-600);
  letter-spacing: 0.5px;
}

.btn-link ion-icon {
  color: inherit;
}

.grid-list {
  display: grid;
  gap: 32px;
}

/*-----------------------------------*\
  #HEADER
\*-----------------------------------*/

.header .logo {
  display: none;
}

.header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--oxford-blue-2);
  box-shadow: var(--shadow-1);
  padding-block: 16px;
  z-index: 4;
}

.header.active {
  position: fixed;
  animation: slideIn 0.5s ease forwards;
}

@keyframes slideIn {
  0% {
    transform: translateY(-100%);
  }
  100% {
    transform: translateY(0);
  }
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-action {
  display: flex;
  gap: 8px;
}

.nav-toggle-btn.active .default-icon,
.nav-toggle-btn .active-icon {
  display: none;
}

.nav-toggle-btn .default-icon,
.nav-toggle-btn.active .active-icon {
  display: block;
}

.header .nav-toggle-btn {
  font-size: 3.5rem;
}

.navbar {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 0;
  background-color: var(--oxford-blue-2);
  padding-inline: 16px;
  box-shadow: var(--shadow-1);
  z-index: 1;
  overflow: hidden;
}

.navbar.active {
  height: max-content;
}

.navbar-link {
  color: var(--white);
  font-weight: var(--fw-600);
  padding: 10px 13px;
}

/*-----------------------------------*\
  #HERO
\*-----------------------------------*/

.hero {
  position: relative;
  --section-padding: 180px 64px;
  text-align: center;
}

.hero-title .span {
  display: inline;
  background-image: var(--linear-gradient-2);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero .section-text {
  color: var(--white);
  opacity: 0.7;
  margin-block: 16px 32px;
}

.hero .btn {
  margin-inline: auto;
}

.countdown-section {
  padding: var(--section-padding);
  border-radius: var(--radius-12);
  color: var(--white);
  padding: 0%;
}

.countdown-timer {
  font-size: var(--title-md);
  border-radius: var(--radius-8);
  display: inline-block;
}

#timer {
  font-size: var(--headline-md);
  font-weight: var(--fw-700);
  display: block;
}

.mint-schedule p {
  margin: 4px 0;
  font-size: var(--label-lg);
}

/*-----------------------------------*\
  #MORPH EXAMPLE (If applicable)
\*-----------------------------------*/

.morph .btn {
  margin-inline: auto;
  margin-bottom: 40px;
  min-width: 160px;
  max-height: 40px;
  justify-content: center;
}

.morph .btn-container {
  display: flex;
  max-width: 800px;
  margin: auto;
}

.morph-card {
  padding: 8px;
  border: 1px solid var(--gunmetal);
  box-shadow: var(--shadow-5);
  transition: var(--transition-1);
}

.selected-card {
  outline: 5px solid #96a7d6;
  outline-offset: -3px;
}

.morph-card:is(:hover, :focus-within) {
  box-shadow: var(--shadow-3);
  transform: translateY(-8px);
}

.morph-card .card-banner {
  position: relative;
}

.morph-card:is(:hover, :focus-within) .img-cover {
  transform: scale(1.1);
}

.morph-card .btn {
  padding: 8px 16px;
  font-size: var(--label-md);
  position: absolute;
  top: calc(100% + 50px);
  left: 50%;
  transform: translate(-50%, -50%);
  transition: var(--transition-2);
}

.morph-card:is(:hover, :focus) .btn {
  top: 50%;
}

.morph-card .card-profile {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-block-start: 12px;
}

.morph-card .card-profile .img {
  border-radius: var(--radius-circle);
}

.morph-card .card-title {
  margin-block: 12px;
}

.morph-card .card-meta {
  background-color: var(--prussian-blue);
  display: flex;
  justify-content: space-between;
  padding: 8px;
  border-radius: var(--radius-8);
}

.morph-card .card-price {
  color: var(--white);
  display: flex;
  gap: 4px;
  font-weight: var(--fw-500);
}

.morph-card .countdown {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  min-width: max-content;
  background-image: var(--linear-gradient-2);
  color: var(--white);
  font-weight: var(--fw-700);
  padding: 4px 16px;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  gap: 4px;
}

.morph-card .countdown ion-icon {
  --ionicon-stroke-width: 50px;
  font-size: 2.2rem;
}

.morph .btn-link {
  margin-inline: auto;
  margin-block-start: 32px;
}

/*-----------------------------------*\
  #QNA
\*-----------------------------------*/

.qna .section-title {
  margin-block-end: 16px;
}

.qna-list {
  margin-block-start: 60px;
  display: grid;
  gap: 20px;
}

.qna-card {
  background-color: var(--oxford-blue-2);
  border-radius: var(--radius-12);
  box-shadow: var(--shadow-2);
  overflow: hidden;
  transition: var(--transition-1);
}

.qna-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-3);
}

.qna-btn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 20px;
  color: var(--white);
  font-weight: var(--fw-600);
  border-radius: var(--radius-8);
  transition: var(--transition-1);
}

.qna-btn ion-icon {
  flex-shrink: 0;
  font-size: 2rem;
}

.qna-card.active .qna-btn {
  color: var(--oxford-blue);
}

.qna-card.active .qna-btn ion-icon {
  transform: rotate(0.5turn);
}

.qna-content {
  display: none;
  padding: 20px;
  background-color: var(--oxford-blue);
  color: var(--white);
}

.qna-card.active .qna-content {
  display: block;
}

.qna-content .body-md {
  line-height: 1.8;
}

/*-----------------------------------*\
  #CONTACT
\*-----------------------------------*/

.contact .section-title {
  margin-block-end: 16px;
}

.contact .btn {
  margin-inline: auto;
  margin-block-start: 24px;
}

/*-----------------------------------*\
  #FOOTER
\*-----------------------------------*/

.footer {
  background-color: var(--oxford-blue);
}

.footer-bottom {
  padding-block: 30px;
  color: var(--light-gray);
  text-align: center;
}

.copyright .span {
  display: inline;
  color: var(--maximum-red);
}

/*-----------------------------------*\
  #BACK TO TOP
\*-----------------------------------*/

.back-to-top {
  background-color: var(--blue-violet);
  position: fixed;
  bottom: 10px;
  right: 20px;
  z-index: 4;
  visibility: hidden;
  opacity: 0;
  transition: var(--transition-1);
}

.back-to-top.active {
  visibility: visible;
  opacity: 1;
  transform: translateY(-10px);
}

/*-----------------------------------*\
  #MINT OPTIONS
\*-----------------------------------*/

.mint-options {
  padding: 40px 0;
}

.mint-grid {
  display: grid;
  grid-template-columns: 1fr; /* Single column on mobile */
  gap: 20px;
  margin-top: 20px;
}

.mint-card {
  border-radius: var(--radius-12);
  padding: 20px;
  text-align: center;
  box-shadow: var(--shadow-2);
  transition: var(--transition-1);
  color: var(--white);
}

.obsidian-card {
  background: linear-gradient(135deg, #2c2c2c, #4b4b4b);
  border: 2px solid #4b4b4b;
}

.obsidian-card .mint-tier {
  color: #6a6a6a;
}

.obsidian-card .mint-one-btn {
  background-color: #6a6a6a;
  color: #fff;
}

.jade-card {
  background: linear-gradient(135deg, #008a4c, #00a860);
  border: 2px solid #00a860;
}

.jade-card .mint-tier {
  color: #00c976;
}

.jade-card .mint-five-btn {
  background-color: #00c976;
  color: #fff;
}

.turquoise-card {
  background: linear-gradient(135deg, #008b8b, #00cccc);
  border: 2px solid #00cccc;
}

.turquoise-card .mint-tier {
  color: #20e0e0;
}

.turquoise-card .mint-ten-btn {
  background-color: #20e0e0;
  color: #fff;
}

.mint-card button {
  display: block;
  margin: 15px auto 0;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-pill);
  font-size: var(--label-lg);
  font-weight: bold;
  cursor: pointer;
  transition: var(--transition-1);
}

.mint-card button:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

.mint-card:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-3);
}

.mint-description {
  font-size: var(--body-md);
  margin-top: 15px;
  color: inherit;
}

button:disabled {
  background-color: #ccc;
  color: #666;
  cursor: not-allowed;
  box-shadow: none;
  border: 1px solid #aaa;
  opacity: 0.7;
}

/*-----------------------------------*\
  #RANKS, NOBLE, DEITY (Default)
\*-----------------------------------*/

.ranks,
.noble-order,
.royal-deity {
  padding: var(--section-padding);
  text-align: center;
  margin-top: 48px;
}

.grid-3,
.grid-2 {
  display: grid;
  gap: 24px;
}

.rank-card,
.noble-card,
.deity-card {
  border-radius: var(--radius-8);
  box-shadow: var(--shadow-3);
  padding: 16px;
  text-align: center;
  transition: var(--transition-1);
  background-color: var(--oxford-blue);
}

.deity-card {
  background: linear-gradient(135deg, var(--blue-violet), var(--sienna));
  color: var(--white);
}

.rank-card:hover,
.noble-card:hover,
.deity-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-2);
}

.rank-card img,
.noble-card img,
.deity-card img {
  border-radius: var(--radius-8);
  margin-bottom: 16px;
}

.rank-description,
.noble-description {
  font-size: var(--body-md);
  color: var(--white);
  margin-bottom: 16px;
}

.deity-description {
  font-size: var(--body-md);
  color: var(--alice-blue);
  margin-bottom: 16px;
}

/*-----------------------------------*\
  #CHAT INTERFACE
\*-----------------------------------*/

.chat-container {
  display: flex;
  flex-direction: column;
  height: 70vh;
  max-width: 600px;
  margin: 0 auto;
  background-color: var(--oxford-blue-2);
  border-radius: var(--radius-12);
  box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.chat-history {
  flex-grow: 1;
  position: relative;
  padding: 20px;
  overflow-y: auto;
  background: linear-gradient(to bottom, var(--oxford-blue), var(--cadet-grey));
  color: var(--white);
  font-size: var(--body-md);
}

.chat-history:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("./assets/images/aztec-pattern.png");
  opacity: 0.1;
  pointer-events: none;
  z-index: 0;
}

.chat-message {
  display: flex;
  align-items: flex-end;
  margin-bottom: 15px;
  position: relative;
  z-index: 1;
}

.chat-message.user {
  flex-direction: row-reverse;
}

.chat-message.montezuma {
  flex-direction: row;
}

.chat-message span {
  display: inline-block;
  max-width: 75%;
  word-wrap: break-word;
  padding: 10px 15px;
  border-radius: 15px;
  line-height: 1.4;
  position: relative;
}

.user-bubble {
  background-color: var(--gold);
  color: var(--oxford-blue);
  text-align: right;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
}

.ai-bubble {
  background-color: var(--oxford-blue);
  color: var(--gold);
  text-align: left;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
}

.chat-message img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  margin: 0 10px;
}

.chat-input-container {
  display: flex;
  align-items: center;
  padding: 10px;
  background-color: var(--oxford-blue-2);
}

.chat-input {
  flex-grow: 1;
  padding: 10px;
  font-size: var(--body-md);
  border: 2px solid var(--blue-violet);
  border-radius: var(--radius-8);
  background-color: var(--oxford-blue);
  color: var(--white);
  transition: 0.3s;
}

.chat-input::placeholder {
  color: var(--cadet-grey);
}

.chat-input:focus {
  outline: none;
}

.send-btn {
  margin-left: 10px;
  padding: 10px 20px;
  background-color: var(--blue-violet);
  color: var(--white);
  border-radius: var(--radius-pill);
  transition: 0.3s;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
}

.send-btn:hover {
  background-color: var(--sienna);
  color: var(--gold);
  box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.3);
}

.chat-history::-webkit-scrollbar {
  width: 8px;
}

.chat-history::-webkit-scrollbar-thumb {
  background-color: var(--cadet-grey);
  border-radius: 5px;
}

.chat-history::-webkit-scrollbar-thumb:hover {
  background-color: var(--sienna);
}

#thinking-animation {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 18px;
  color: var(--gold);
  background: var(--oxford-blue-2);
  padding: 10px;
  margin: 10px;
  border: 2px solid var(--gold);
  border-radius: var(--radius-8);
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
}

#thinking-animation.hidden {
  display: none;
}

#thinking-animation::after {
  content: "";
  width: 10px;
  height: 10px;
  margin-left: 10px;
  border-radius: 50%;
  background-color: var(--gold);
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 0.5;
  }
  50% {
    transform: scale(1.5);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 0.5;
  }
}

/* Range input (if needed) */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 5px;
  background: linear-gradient(90deg, var(--gold) 0%, var(--blue-violet) 100%);
  outline: none;
  opacity: 0.9;
  transition: opacity 0.2s;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--gold);
  cursor: pointer;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
}

input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--gold);
  cursor: pointer;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
}

/*-----------------------------------*\
  #MEDIA QUERIES
\*-----------------------------------*/

/* 
  For screens up to 575px (mobile):
  - The default styles above already cater to mobile with single columns, etc.
*/

/* Larger than 575px */
@media (min-width: 575px) {
  .container {
    max-width: 480px;
    margin-inline: auto;
  }
}

/* Larger than 768px */
@media (min-width: 768px) {
  :root {
    --headline-md: 3rem;
    --section-padding: 48px;
  }

  .container,
  .header .container {
    max-width: 768px;
  }

  .grid-list {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }

  .section-text {
    max-width: 575px;
    margin-inline: auto;
  }

  .hero {
    --section-padding: 180px 40px;
  }

  /* Expand .mint-grid to multiple columns from tablet upwards */
  .mint-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}

/* Larger than 992px */
@media (min-width: 992px) {
  :root {
    --headline-lg: 6rem;
  }

  .container,
  .header .container {
    max-width: 950px;
  }

  .header {
    background: none;
    box-shadow: none;
  }

  .header.active {
    background: var(--oxford-blue-2);
    box-shadow: var(--shadow-1);
  }

  /* Disable hamburger menu at large screens */
  .nav-toggle-btn {
    display: none;
  }

  .header-action {
    gap: 12px;
  }

  .navbar,
  .navbar.active {
    all: unset;
    display: block;
    margin-inline: auto 24px;
  }

  .navbar-list {
    display: flex;
    gap: 12px;
  }

  .grid-list {
    grid-template-columns: repeat(3, 1fr);
  }

  /* 3 columns for ranks 1–6, 2 columns for noble/deity */
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }

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

/* Larger than 1200px */
@media (min-width: 1200px) {
  :root {
    --section-padding: 56px;
  }

  .container,
  .header .container {
    max-width: 1000px;
  }
}

@media (max-width: 1200px) {
  .montezuma-text {
    display: none;
  }

  .montezuma-title {
    margin-top: 40px;
  }
}
