﻿@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Thai:wght@100..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Rowdies:wght@300;400;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');

@font-face {
  font-family: 'Unblocker';
  src: url(../font/Unblocker.ttf) format('truetype');
  font-weight: normal;
  font-style: normal;
}

/* Base Body Styles */
body {
  font-family: 'Mitr', sans-serif;
  background-color: #fff;
  color: #333;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

section {
  padding: 20px 0;
}

:not(.btn-check)+.btn:active {
  border-color: transparent;
}

/* Back Button */
.btn-back-all-chars {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  position: relative;
  height: 39px;
  padding: 0 20px 0 36px;
  background: url(../images/btn-orage.svg) center / 100% 100% no-repeat;
  color: #fff;
  font-family: 'Mitr', sans-serif;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  min-width: 159px;
  margin-bottom: 16px;
}

.btn-back-all-chars::before {
  content: '';
  position: absolute;
  right: 2px;
  top: 0;
  width: 20px;
  height: 20px;
  background: url(../images/btn-orage-tr.svg) center / contain no-repeat;
}

/* Hero Section */
.character-hero {
  position: relative;
  min-height: 300px;
  width: 100%;
  background: url(../images/main-tournament-cover.webp);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  padding-top: 30px;
}

.character-hero::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 120px;
  background: linear-gradient(0deg, #FFF 0%, rgba(255, 255, 255, 0.99) 6.67%, rgba(255, 255, 255, 0.96) 13.33%, rgba(255, 255, 255, 0.92) 20%, rgba(255, 255, 255, 0.85) 26.67%, rgba(255, 255, 255, 0.77) 33.33%, rgba(255, 255, 255, 0.67) 40%, rgba(255, 255, 255, 0.56) 46.67%, rgba(255, 255, 255, 0.44) 53.33%, rgba(255, 255, 255, 0.33) 60%, rgba(255, 255, 255, 0.23) 66.67%, rgba(255, 255, 255, 0.15) 73.33%, rgba(255, 255, 255, 0.08) 80%, rgba(255, 255, 255, 0.04) 86.67%, rgba(255, 255, 255, 0.01) 93.33%, rgba(255, 255, 255, 0.00) 100%);
}

.character-title {
  font-weight: 700;
  color: #ffffff;
  font-size: 40px;
  line-height: 1em;
  overflow: hidden;
  color: var(--Color-5, #FFF);
  text-overflow: ellipsis;
  text-shadow: 0 0px 10px #36A5FC;
  font-family: Unblocker;
  font-style: normal;
  font-weight: 400;
  text-align: center;
  letter-spacing: 5px;
}

.character-subtitle {
  font-size: 17px;
  font-weight: 500;
  color: #fff;
  text-align: center;
  text-shadow: 0 0px 10px #00589b;
}

/* Main Category Section */
.character-main {
  padding-bottom: 100px;
  background: #e9f2f6 url(../images/character-lg-bg.webp) no-repeat;
  background-size: 1920px;
  background-position: top center;
  position: relative;
}

.character-main::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 120px;
  background: linear-gradient(180deg, #FFF 0%, rgba(255, 255, 255, 0.99) 6.67%, rgba(255, 255, 255, 0.96) 13.33%, rgba(255, 255, 255, 0.92) 20%, rgba(255, 255, 255, 0.85) 26.67%, rgba(255, 255, 255, 0.77) 33.33%, rgba(255, 255, 255, 0.67) 40%, rgba(255, 255, 255, 0.56) 46.67%, rgba(255, 255, 255, 0.44) 53.33%, rgba(255, 255, 255, 0.33) 60%, rgba(255, 255, 255, 0.23) 66.67%, rgba(255, 255, 255, 0.15) 73.33%, rgba(255, 255, 255, 0.08) 80%, rgba(255, 255, 255, 0.04) 86.67%, rgba(255, 255, 255, 0.01) 93.33%, rgba(255, 255, 255, 0.00) 100%);
  pointer-events: none;
  z-index: 0;
}

/* ===== Stats Section (moved from style.css) ===== */
.warper-all-state {
  display: grid;
  grid-template-columns: 1fr 1fr;
  row-gap: 15px;
  column-gap: 30px;
  position: relative;
  z-index: 10;
  margin-bottom: 20px;
}

.progress-container {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 412px;
  margin: 0;
  justify-content: flex-start;
}

.col-icon-state {
  background: url(../../../asset/images/bg-ic-state.webp?v=3.6) center/contain no-repeat;
  width: 68px;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}

.col-icon-state img {
  width: 52%;
  object-fit: contain;
}

.warper-col-progress {
  width: 100%;
  margin-left: -50px;
}

.col-text-state {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 124px;
  height: 24px;
  padding-left: 8px;
  background: #ffffffa3;
  border-radius: 0;
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 100%, 0 100%);
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
  color: #758698;
}

.warper-col-progress .progress-bar {
  width: 100%;
  height: 20px;
  background: #DDF3FF;
  border: 1px solid #ffffff;
  border-radius: 0;
  overflow: hidden;
  position: relative;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 100%, 0 100%);
  margin-top: -2px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #33bbff, #a077ff);
  border-radius: 0;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 100%, 0 100%);
}

.progress-fill.progress-1 {
  width: 10%;
}

.progress-fill.progress-2 {
  width: 20%;
}

.progress-fill.progress-3 {
  width: 30%;
}

.progress-fill.progress-4 {
  width: 40%;
}

.progress-fill.progress-5 {
  width: 50%;
}

.progress-fill.progress-6 {
  width: 60%;
}

.progress-fill.progress-7 {
  width: 70%;
}

.progress-fill.progress-8 {
  width: 80%;
}

.progress-fill.progress-9 {
  width: 90%;
}

.progress-fill.progress-10 {
  width: 100%;
}

.progress-value {
  font-family: "Rowdies", sans-serif;
  font-size: 24px;
  font-weight: 400;
  line-height: 1;
  color: #3692C8;
  text-align: right;
  flex-shrink: 0;
  margin: auto auto 9px auto;
}

/* ===== Character Name (Right Column) ===== */
.char-name-en {
  font-family: 'Rowdies', sans-serif;
  font-size: 72px;
  line-height: 50px;
  background: linear-gradient(180deg, #38A8FF 0%, #006EC3 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
  text-transform: uppercase;
}

.char-name-th {
  font-family: 'Mitr', sans-serif;
  font-size: 40px;
  color: #758698;
  -webkit-text-fill-color: #758698;
  background: none;
  margin-left: 10px;
  line-height: 0;
}

.char-tagline {
  font-size: 20px;
  color: #E3B44F;
  font-weight: 400;
  margin-bottom: 20px;
}

.char-description {
  font-size: 19px;
  color: #666;
  line-height: 1.6;
  margin-bottom: 30px;
}

/* ===== Personality & Job ===== */
.personality-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  width: 100%;
}

.personality-item {
  display: flex;
  align-items: center;
  background: transparent;
  width: 100%;
  max-width: 408px;
  height: 43px;
  border-radius: 12px;
  overflow: hidden;
  gap: 0;
  margin-bottom: 8px;
  justify-content: flex-start;
  position: relative;
}


.personality-label-box {
  background: url(../images/info-tag.svg) center / 100% 100% no-repeat;
  color: #fff;
  flex: 0 0 156px;
  height: 100%;
  display: flex;
  align-items: center;
  padding-left: 18px;
  font-size: 16px;
  font-weight: 400;
  gap: 8px;
  white-space: nowrap;
  position: relative;
  z-index: 2;
  /* Label on top */
}

.personality-label-box img,
.personality-label-box i {
  width: 26px;
  height: 26px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.personality-value {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(8px);
  font-weight: 400;
  font-size: 16px;
  color: #72879d;
  flex: 1;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 35px 0 55px;
  margin-left: -35px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 1;
  clip-path: polygon(30px 0, 100% 0, calc(100% - 20px) 100%, 0 100%);
}

/* ===== V2 Layout: 3-column ===== */
.character-container-v2 {
  max-width: 1440px;
  margin: 0 auto;
  padding: 40px 30px 180px;
  /* Increased bottom padding for sticky nav */
  position: relative;
  z-index: 1;
}

/* Main 3-column grid */
.char-v2-grid {
  display: grid;
  grid-template-columns: 516px 1fr 420px;
  grid-template-rows: auto;
  gap: 0 30px;
  align-items: start;
}

/* Left column */
.char-col-left {
  grid-column: 1;
  grid-row: 1;
}

/* Center column */
.char-col-center {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

/* Right column */
.char-col-right {
  grid-column: 3;
  grid-row: 1;
}

/* Bottom full-width */
.char-bottom-full {
  grid-column: 1 / -1;
  grid-row: 2;
  margin-top: 30px;
}

/* ===== Left column: stats 2x2 grid ===== */
.char-col-left .warper-all-state {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  row-gap: 12px;
  column-gap: 10px;
  margin-bottom: 24px;
}

.char-col-left .progress-container {
  width: 100% !important;
  max-width: 100%;
  gap: 8px;
}

.char-col-left .col-icon-state {
  width: 52px;
  height: 48px;
  flex-shrink: 0;
}

.char-col-left .col-icon-state img {
  width: 55%;
}

.char-col-left .warper-col-progress {
  margin-left: -28px;
  width: 100%;
}

.char-col-left .col-text-state {
  width: 90px;
  font-size: 16px;
  height: 20px;
}

/* .char-col-left .warper-col-progress .progress-bar {
  width: 130px; Increased to 130px
  height: 16px;
} */

.char-col-left .progress-value {
  font-size: 19px;
  margin-bottom: 6px;
  white-space: nowrap;
}

/* ===== Section Title Styling ===== */
.info-section-title {
  font-size: 24px;
  font-weight: 500;
  color: #3679C8;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ===== Left column: basic info cards v2 (Using SVG Assets) ===== */
.char-col-left .info-grid-3 {
  margin: 0 -4px;
  max-width: 516px;
}

.char-col-left .info-grid-3 .col-4 {
  padding: 6px;
  max-width: none;
}

.char-col-left .info-card {
  background: url(../images/info-frame.svg) center / 100% 100% no-repeat;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 162px;
  aspect-ratio: 162 / 143;
  /* Maintain frame proportions */
  margin: 0 auto;
  border: none;
  overflow: visible;
  position: relative;
  transition: transform 0.25s ease;
  box-shadow: none;
  padding: 0;
}

.char-col-left .info-card:hover {
  transform: translateY(-5px);
}

.char-col-left .info-card-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 62%;
  /* Space above the 38% height tag */
  width: 100%;
  z-index: 2;
  gap: 4px;
  margin-left: 2px;
  margin-top: 4px;

}

.char-col-left .info-card-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2px;
}

.char-col-left .info-card-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.char-col-left .info-card-label {
  color: #798C9F;
  font-size: 16px;
  font-weight: 400;
  margin: -4px 0 0;
  background: none;
}

.char-col-left .info-card-bottom {
  position: absolute;
  bottom: 4px;
  left: 50%;
  /* Center it precisely */
  transform: translateX(-50%);
  width: 82%;
  /* Use percentage to scale with card frame accurately */
  height: 38%;
  background: url(../images/info-tag.svg) bottom center / 100% 100% no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 19px;
  font-weight: 500;
  padding: 5px 0 4%;
  z-index: 1;
}

/* Ensure no conflicts with style.css */
.char-col-left .info-card::before,
.char-col-left .info-card::after {
  display: none !important;
}

/* ===== Center: character visual ===== */
.char-col-center .character-visual {
  flex: unset;
  min-width: unset;
  left: 0;
  width: 352px;
  /* Set to 352px as requested */
  height: 110%;
  /* Set to 669px as requested */
  max-width: 100%;
  margin: 0 auto;
}

.char-col-center .character-visual img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* Ensure no distortion */
  object-position: bottom center;
}

/* ===== Right column: personality items ===== */
.char-col-right .personality-item {
  width: 100%;
  max-width: 100%;
}

/* ===== Bottom Details Grid (Modern Refined) ===== */
.char-bottom-full .bottom-details-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  background: rgba(255, 255, 255, 0.6);
  padding: 10px 0;
  border-radius: 20px;
}

.char-bottom-full .detail-box {
  width: 100%;
  border-right: 1px solid #e0e0e0;
  padding: 10px 40px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.char-bottom-full .detail-box:last-child {
  border-right: none;
}

.char-bottom-full .detail-box-header {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 18px;
  font-weight: 400;
  margin-bottom: 10px;
}

/* Icons styling to match image */
.char-bottom-full .detail-box-header i {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

/* Specific icon colors & shapes to match design */
.char-bottom-full .detail-box:nth-child(1) .detail-box-header {
  color: #40B84F;
}

.char-bottom-full .detail-box:nth-child(1) .detail-box-header i {
  background: #40B84F;
  color: #fff;
}

.char-bottom-full .detail-box:nth-child(2) .detail-box-header {
  color: #FF5252;
}

.char-bottom-full .detail-box:nth-child(2) .detail-box-header i {
  background: #FF5252;
  color: #fff;
}

.char-bottom-full .detail-box:nth-child(3) .detail-box-header {
  color: #A461D8;
}

.char-bottom-full .detail-box:nth-child(3) .detail-box-header i {
  background: transparent;
  color: #A365EA;
  font-size: 22px;
  width: auto;
  height: auto;
}

.char-bottom-full .detail-box-content {
  color: #798C9F;
  font-size: 19px;
  font-weight: 400;
  line-height: 1.4;
  padding-left: 0;
  /* Align with icon text */
}

@media (max-width: 911px) {
  .char-bottom-full .bottom-details-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .char-bottom-full .detail-box {
    border-right: none;
    border-bottom: 1px solid #eee;
    padding: 20px;
    align-items: center;
    text-align: center;
  }

  .char-name-en {
    line-height: 40px;
  }
}

/* ===== Character Sticky Navbar ===== */
.char-sticky-nav {
  position: fixed;
  bottom: -7px;
  left: 0;
  right: 0;
  z-index: 99;
  height: 164px;
  display: flex;
  justify-content: center;
  pointer-events: none;
  transition: transform 0.4s ease-in-out;
}

.char-sticky-nav.nav-hidden {
  transform: translateY(100%);
}

.char-sticky-inner {
  display: flex;
  align-items: flex-end;
  padding-bottom: 23px;
  padding-left: 170px;
  padding-right: 170px;
  width: 100%;
  max-width: 1324px;
  position: relative;
  pointer-events: all;
  overflow: visible;
}

/* Background trapezoid */
.char-sticky-inner::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 23px;
  right: 23px;
  height: 122px;
  background: #F5FCFF;
  clip-path: url(#nav-trapezoid);
  z-index: 0;
  pointer-events: none;
}

.char-nav-arrow {
  background: none;
  border: none;
  padding: 0px 8px;
  cursor: pointer;
  opacity: 0.35;
  flex-shrink: 0;
  transition: opacity 0.2s;
  z-index: 1;
  margin-bottom: 26px;
}

.char-nav-arrow:hover {
  opacity: 0.85;
}

.char-nav-arrow img {
  width: 24px;
  height: 24px;
  display: block;
}

.char-nav-scroll {
  flex: 1;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  z-index: 1;
}

.char-nav-scroll::-webkit-scrollbar {
  display: none;
}

.char-nav-track {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.char-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.char-nav-item:hover:not(.active) {
  transform: translateY(-4px);
}

.char-nav-avatar {
  width: 74px;
  height: 99px;
  border-radius: 10px 10px 0 0;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.char-nav-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.char-nav-item.active .char-nav-avatar {
  width: 116px;
  height: 153px;
  border-radius: 14px 14px 0 0;
  filter: drop-shadow(0 11px 5px rgba(255, 255, 255, 0.9)) drop-shadow(0 0 3px rgba(100, 190, 245, 0.55));
}

.char-nav-divider {
  width: 1px;
  height: 67px;
  background: rgba(0, 0, 0, 0.15);
  flex-shrink: 0;
  z-index: 1;
  margin-bottom: 3px;
  margin-left: 4px;
  margin-right: 12px;
}

.char-nav-expand {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
  z-index: 1;
  transition: transform 0.2s;
  margin-bottom: 10px;
  margin-right: 10px;
}

.char-nav-expand:hover {
  transform: scale(1.05);
}

.char-nav-expand img {
  width: 52px;
  height: 52px;
  display: block;
}

/* Character Expand Panel */
@keyframes charPanelIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.char-expand-panel {
  position: absolute;
  bottom: 110px;
  right: 23px;
  width: 820px;
  max-width: calc(100vw - 46px);
  height: 480px;
  background: url(../images/bg-expand-character.svg) no-repeat center / 100% 100%;
  padding: 45px 35px 55px 35px;
  display: none;
  z-index: 500;
  filter: drop-shadow(0 15px 45px rgba(54, 121, 200, 0.25));
  pointer-events: all;
  overflow: hidden;
}

.char-expand-panel.show {
  display: flex;
  flex-direction: column;
  animation: charPanelIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.char-expand-title {
  text-align: center;
  font-size: 24px;
  font-weight: 400;
  color: #003459;
  font-family: 'Mitr', sans-serif;
  margin-bottom: 14px;
  flex-shrink: 0;
}

.char-expand-grid-wrapper {
  height: 337px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 15px;
  margin-right: -5px;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.char-expand-grid-wrapper::-webkit-scrollbar {
  width: 8px;
}

.char-expand-grid-wrapper::-webkit-scrollbar-track {
  background: #69C0FF;
  border-radius: 16px;
}

.char-expand-grid-wrapper::-webkit-scrollbar-thumb {
  background: #3872AA;
  border-radius: 16px;
}

.char-expand-grid {
  --bs-gutter-x: 12px;
  --bs-gutter-y: 12px;
  padding-bottom: 10px;
}

.char-expand-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  height: 154px;
  padding-top: 34%;
  cursor: pointer;
  transition: transform 0.2s ease;
  position: relative;
}

.char-expand-item:hover {
  transform: scale(1.05);
}

.char-expand-thumb {
  width: 100%;
  aspect-ratio: 94 / 66;
  border-radius: 12px 12px 0 0;
  position: relative;
  overflow: visible;
}

.char-expand-thumb img {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  height: 148%;
  object-fit: contain;
  object-position: bottom center;
}

.char-expand-name {
  width: 100%;
  background: linear-gradient(to bottom, #ebf5fe, #f5fbff);
  border-radius: 0 0 12px 12px;
  padding: 4px 4px 6px;
  text-align: center;
  font-size: 14px;
  font-weight: 400;
  color: #003459;
  font-family: 'Mitr', sans-serif;
  line-height: 1.4;
  white-space: nowrap;
}

/* ===== Responsive ===== */
@media (min-width: 1200px) {
  .character-hero {
    background: url(../images/main-tournament-cover-lg.webp);
    background-size: 1920px;
    background-position: center;
    background-repeat: no-repeat;
    height: 420px;
    padding-top: 20px;
    margin: 0 auto;
    max-width: 1920px;
  }

  .character-title {
    font-size: 70px;
  }

  .character-subtitle {
    font-size: 32px;
  }
}

@media (max-width: 1440px) {
  .char-v2-grid {
    grid-template-columns: minmax(340px, 516px) 1fr 420px;
  }
}

@media (max-width: 1320px) and (min-width: 1201px) {
  .char-col-left .info-grid-3 {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    max-width: 380px;
    margin: 0 auto;
    gap: 15px;
  }

  .char-col-left .info-grid-3 .col-4 {
    flex: 0 0 100%;
    max-width: 100%;
    width: 100%;
    padding: 0;
  }

  .char-col-left .info-card {
    max-width: 162px;
    margin: 0 auto;
  }
}

@media (max-width: 1200px) {
  .btn-back-all-chars {
    margin-top: 60px;
  }
}

@media (max-width: 768px) {
  .btn-back-all-chars {
    background: url(../images/btn-orage-sm.svg) center / 100% 100% no-repeat;
    width: 49px;
    height: 38px;
    min-width: 0;
    padding: 0;
    font-size: 0;
    color: transparent;
    justify-content: center;
    margin-top: 0px;
  }

  .btn-back-all-chars::before {
    content: '';
    position: static;
    width: 9px;
    height: 18px;
    background: url(../images/ic-back.svg) center / contain no-repeat;
    flex-shrink: 0;
  }
}

@media (max-width: 1200px) and (min-width: 912px) {
  .char-v2-grid {
    display: grid;
    grid-template-columns: 1fr 440px;
    grid-template-areas:
      "name    image"
      "stats   image"
      "basic   personality"
      "deep    deep";
    gap: 30px 40px;
    align-items: start;
    text-align: left;
  }

  .char-col-left,
  .char-col-center,
  .char-col-right {
    display: contents;
  }

  .char-name-group {
    grid-area: name;
    align-self: center;
    padding-top: 20px;
  }

  .char-col-center .character-visual {
    grid-area: image;
    width: 352px;
    max-width: 100%;
    height: auto;
    justify-self: center;
    margin: 0;
  }

  .section-stats {
    grid-area: stats;
    width: 100%;
  }

  .section-basic {
    grid-area: basic;
    width: 100%;
  }

  .section-personality {
    grid-area: personality;
    width: 100%;
    margin-top: 10px;
  }

  .char-bottom-full {
    grid-area: deep;
    margin-top: 30px;
  }

  /* Stats: 1-column stacked layout as per image */
  .char-col-left .warper-all-state {
    grid-template-columns: 1fr !important;
    gap: 12px;
    max-width: 440px;
  }

  .char-col-left .progress-container {
    width: 100% !important;
  }

  /* Basic info cards scaling */
  .char-col-left .info-grid-3 {
    max-width: 100%;
  }

  .char-col-left .info-card {
    max-width: 162px;
  }

  /* personality items stacking */
  .char-col-right .personality-item {
    width: 100%;
    max-width: 408px;
    margin-bottom: 8px;
  }

  /* Deep Info: 3-column across as per image */
  .char-bottom-full .bottom-details-grid {
    grid-template-columns: repeat(3, 1fr);
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(8px);
    border-radius: 20px;
    padding: 20px 0;
  }

  .char-bottom-full .detail-box {
    border-right: 1px solid rgba(0, 0, 0, 0.05);
    border-bottom: none;
    padding: 10px 30px;
  }

  .char-bottom-full .detail-box:last-child {
    border-right: none;
  }

  .char-name-en {
    font-size: 70px;
  }

  .char-name-th {
    font-size: 36px;
  }

  .char-tagline {
    font-size: 20px;
  }

  /* Nav */
  .char-sticky-nav {
    height: 140px;
  }

  .char-sticky-inner::before {
    height: 118px;
  }

  .char-sticky-inner {
    padding-left: 94px;
    padding-right: 94px;
    padding-bottom: 20px;
  }

  .char-nav-avatar {
    width: 66px;
    height: 88px;
  }

  .char-nav-item.active .char-nav-avatar {
    width: 104px;
    height: 137px;
  }
}

@media (max-width: 991px) {
  .char-col-left .info-card-top {
    padding-top: 7%;
  }

  .char-sticky-nav {
    bottom: 50px;
  }
}

@media (max-width: 911px) {
  .info-section-title {
    justify-content: center;
  }

  .char-v2-grid {
    display: flex;
    flex-direction: column;
    gap: 30px;
    align-items: center;
    text-align: center;
  }

  .char-col-left,
  .char-col-center,
  .char-col-right {
    display: contents;
  }

  .section-stats,
  .section-basic,
  .section-personality,
  .char-col-center .character-visual,
  .char-name-group {
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .char-name-group {
    order: 1;
    margin-top: -20%;
    z-index: 2;
    padding-top: 20px;
  }

  .char-col-center .character-visual {
    order: 0;
    z-index: 0;
  }

  .section-stats {
    order: 2;
    width: 100%;
    padding: 0 10px;
  }

  .warper-all-state {
    justify-content: center;
    width: 100%;
    gap: 10px 20px;
  }

  .section-basic {
    order: 3;
    width: 100%;
    padding: 0 10px;
  }

  .section-basic .info-grid-3 {
    justify-content: center;
    max-width: 516px;
    margin: 0 auto;
    width: 100%;
  }

  /* Responsive Cards: allow scaling but keep proportions */
  .char-col-left .info-card {
    max-width: 156px;
    width: 100%;
  }

  .char-col-left .info-card-label {
    font-size: 14px;
  }

  .char-col-left .info-card-bottom {
    font-size: 17px;
    height: 36%;
    bottom: 2px;
  }

  .char-col-left .info-card-icon {
    width: 30px;
    height: 30px;
    margin-bottom: 2px;
  }

  .char-col-left .info-card-top {
    padding-top: 18%;
    margin-top: 0px;
  }

  .char-col-left .info-card-label {
    font-size: 13px;
  }

  .section-personality {
    order: 4;
    width: 100%;
    padding: 0 10px;
  }

  .personality-item {
    margin: 5px auto;
    width: 100%;
    max-width: 408px;
    height: 38px;
  }

  .char-sticky-inner::before {
    bottom: 0;
    left: 23px;
    right: 23px;
    height: 125px;
  }

  .char-sticky-inner {
    padding-left: 30px;
    padding-right: 30px;
    padding-bottom: 12px;
  }

  .personality-list {
    gap: 0px;
  }

  .personality-label-box {
    flex: 0 0 clamp(110px, 35vw, 156px);
    font-size: clamp(14px, 3vw, 17px);
    padding-left: 24px;
  }

  .personality-value {
    font-size: clamp(14px, 3vw, 18px);
    padding-left: 15px;
    padding-right: 10px;
  }

  .char-bottom-full {
    order: 5;
    margin-top: 0;
    width: 100%;
    max-width: 500px;
  }

  .char-name-en {
    font-size: 55px;
  }

  .char-name-th {
    font-size: 28px;
  }

  
}

@media (max-width: 768px) {
  .char-v2-grid {
    gap: 40px;
  }

  .char-col-center .character-visual {
    width: 100%;
    height: auto;
    max-width: 280px;
  }

  .char-bottom-full .bottom-details-grid {
    grid-template-columns: 1fr;
    padding: 10px 0;
  }

  .char-bottom-full .detail-box {
    border-right: none;
    border-bottom: 1px solid #f0f0f0;
    border-top: none;
  }

  .char-bottom-full .detail-box:last-child {
    border-bottom: none;
  }

  .character-container-v2 {
    padding: 0px 16px 140px;
  }

  .char-col-left .info-card {
    max-width: 140px;
  }

  .char-col-left .info-card-bottom {
    font-size: 15px;
  }

  .char-col-left .info-card-icon {
    width: 26px;
    height: 26px;
  }

  .char-col-left .info-card-label {
    font-size: 12px;
  }

  .char-col-left .info-card-top {
    padding-top: 18%;
  }
  
}

@media (max-width: 540px) {
  .section-basic .info-grid-3 {
    margin: 0 -4px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .char-name-group {
    margin-top: -40%;
  }

  .personality-item {
    height: 34px;
  }

  .personality-value {
    font-size: 13px;
    padding-left: 45px;
  }

  .personality-label-box {
    flex: 0 0 105px;
    font-size: 12px;
    padding-left: 14px;
    gap: 4px;
  }

  .personality-label-box img {
    width: 20px;
    height: 20px;
  }

  .char-name-en {
    font-size: 45px;
  }

  .char-name-th {
    font-size: 24px;
  }

  .char-col-left .info-card {
    max-width: 110px;
  }

  .char-col-left .info-card-icon {
    width: 22px;
    height: 22px;
  }

  .char-col-left .info-card-label {
    font-size: 11px;
  }

  .char-col-left .info-card-bottom {
    font-size: 14px;
    height: 34% !important;
  }
}

@media (max-width: 420px) {
  .char-col-left .info-card-top {
    padding-top: 12%;
  }

  .personality-label-box {
    flex: 0 0 95px;
    font-size: 11px;
    padding-left: 13px;
    gap: 2px;
    margin-left: 10px;
  }

  .personality-label-box img {
    width: 18px;
    height: 18px;
  }

  .personality-value {
    font-size: 13px;
    padding-left: 40px;
  }
}

/* ===== Character Index (all-characters grid) ===== */
.char-grid-container {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(8.9px);
  -webkit-backdrop-filter: blur(8.9px);
  border-radius: 44.5px;
  padding: 60px 38px 40px;
  max-width: 1118px;
  margin: 0 auto 100px;
  position: relative;
  box-shadow: 0 4px 24px rgba(54, 165, 252, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  z-index: 10;
  overflow: hidden;
}

.char-grid-deco-l {
  position: absolute;
  top: 100px;
  left: -2px;
  width: 115px;
  opacity: 0.15;
  pointer-events: none;
  z-index: -1;
}

.char-grid-deco-r {
  position: absolute;
  top: 0;
  right: 0;
  width: 200px;
  opacity: 0.15;
  pointer-events: none;
  z-index: -1;
}

.fa-table-cells::before,
.fa-th::before {
  display: none !important;
  content: none !important;
}

.char-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 15px;
  justify-items: center;
}

.char-card-link {
  text-decoration: none;
  transition: transform 0.2s ease;
  display: block;
}

.char-card-link:hover {
  transform: translateY(-8px);
}

.char-card {
  width: 115px;
  height: 154px;
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.2s ease;
}

.char-card-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

@media (max-width: 1200px) {
  .char-grid-container {
    width: 95%;
    padding: 40px 25px;
  }

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

@media (max-width: 991px) {
  .char-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 768px) {
  .char-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }

  .char-card {
    width: 100px;
    height: 134px;
  }
}

@media (max-width: 480px) {
  .char-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}

/* Visually hidden but accessible to screen readers/SEO */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}