@import url('https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@600;700&family=Inter:wght@400;600&display=swap');

:root {
  --bg-dark: #0d1117;
  --bg-gradient: radial-gradient(circle at top, #1f2937 0%, #0d1117 100%);
  --card-bg: #161b22;
  --card-border: #30363d;
  --accent: #f4a261;
  --accent-hover: #e76f51;
  --text-main: #f0f6fc;
  --text-muted: #8b949e;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', Arial, sans-serif;
  background: var(--bg-gradient);
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  padding-top: 100px; /* Prevents fixed header from overlapping top content */
  padding-bottom: 60px;
  line-height: 1.6;
}

/* Header & Navigation */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 80px;
  background-color: rgba(13, 17, 23, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--card-border);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5%;
}

.header .title a {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 1px;
  text-shadow: 0 0 12px rgba(244, 162, 97, 0.35);
  transition: color 0.2s ease;
}

.header .title a:hover {
  color: var(--accent-hover);
}

nav {
  display: flex;
  gap: 24px;
}

nav a {
  color: var(--text-main);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  padding: 6px 12px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

nav a:hover {
  background-color: rgba(244, 162, 97, 0.15);
  color: var(--accent);
}

/* Layout Containers */
.content,
.battles-grid,
.contact-section,
.about-container {
  max-width: 1000px;
  margin: 20px auto;
  padding: 0 20px;
}

/* Typography */
h1, h2, h3 {
  font-family: 'Chakra Petch', sans-serif;
  letter-spacing: 0.5px;
}

.headinger {
  text-align: center;
  margin: 20px 0 10px;
  font-size: 2.2rem;
  color: var(--accent);
}

p.headinger {
  font-family: 'Inter', sans-serif;
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 30px;
}

/* Cards (FAQ, Battles, Recent Battle, MAN, About) */
.FAQ,
.The-Recent-Battle,
.MAN,
.Battle,
.contact-section,
.about-card {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 28px;
  margin-bottom: 24px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.Battle:hover,
.about-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

/* FAQ Styling */
.FAQ h1 {
  color: var(--accent);
  margin-bottom: 20px;
  border-bottom: 1px solid var(--card-border);
  padding-bottom: 10px;
}

.question {
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--card-border);
}

.question:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.question h2 {
  font-size: 1.2rem;
  color: var(--text-main);
  margin-bottom: 6px;
}

.question p {
  color: var(--text-muted);
}

/* Media & Embeds */
.syoimage {
  width: 100%;
  max-width: 560px;
  height: auto;
  display: block;
  margin: 20px auto;
  border-radius: 12px;
  border: 2px solid var(--card-border);
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.syoimage:hover {
  transform: scale(1.02);
  border-color: var(--accent);
  box-shadow: 0 0 20px rgba(244, 162, 97, 0.3);
}

.centerification {
  display: block;
  margin: 15px auto;
  width: 100%;
  max-width: 600px;
  height: 460px;
  border-radius: 10px;
  border: 2px solid var(--card-border);
  background-color: #000;
}

.The-Recent-Battle,
.MAN,
.Battle {
  text-align: center;
}

.down {
  text-align: center;
  color: var(--text-main);
  margin-top: 12px;
}

p.down {
  color: var(--text-muted);
  max-width: 600px;
  margin: 8px auto 0;
}

/* Forms & Buttons */
.contact-section {
  max-width: 650px;
  margin-top: 40px;
  text-align: center;
}

.contact-section .title {
  font-size: 1.8rem;
  color: var(--accent);
  margin-bottom: 20px;
}

form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

label {
  font-weight: 600;
  color: var(--text-main);
  align-self: flex-start;
  margin-left: 10%;
}

input[type="text"],
input[type="email"],
textarea {
  width: 80%;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--card-border);
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.2s ease;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
}

button,
.submit-btn,
.cta-btn {
  display: inline-block;
  margin-top: 12px;
  padding: 12px 28px;
  border-radius: 8px;
  border: none;
  background-color: var(--accent);
  color: #0d1117;
  font-family: 'Chakra Petch', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.15s ease;
}

button:hover,
.submit-btn:hover,
.cta-btn:hover {
  background-color: var(--accent-hover);
  color: #fff;
  transform: translateY(-2px);
}

/* Modal Fix (Changed from visibility: hidden to display: none so your JS works!) */
.modal-container {
  background-color: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 200;
}

.modal {
  position: relative;
  max-width: 450px;
  width: 90%;
  padding: 36px 24px;
  border-radius: 12px;
  border: 2px solid var(--accent);
  text-align: center;
  background-color: var(--card-bg);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
}

.modal h3 {
  color: var(--text-main);
  font-size: 1.4rem;
}

.modal span {
  position: absolute;
  top: 10px;
  right: 16px;
  font-size: 1.5rem;
  font-weight: bold;
  cursor: pointer;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.modal span:hover {
  color: var(--accent);
}

/* About Page Specifics */
.lore-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.lore-item {
  background-color: var(--bg-dark);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 20px;
}

.lore-item h3 {
  color: var(--accent);
  margin-bottom: 8px;
}

/* Mobile Responsiveness */
@media (max-width: 650px) {
  .header {
    flex-direction: column;
    height: auto;
    padding: 12px;
    gap: 8px;
  }
  body {
    padding-top: 115px;
  }
  .centerification {
    height: 340px;
  }
  label {
    margin-left: 5%;
  }
  input[type="text"],
  input[type="email"],
  textarea {
    width: 90%;
  }
}

.battles-grid {
  max-width: 1200px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.battles-grid .Battle {
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
}

.battles-grid .centerification {
  height: 360px; 
}

@media (max-width: 850px) {
  .battles-grid {
    grid-template-columns: 1fr;
  }
}

/* Tier List Styles */
.tierlist-container {
  max-width: 1050px;
  margin: 20px auto;
  padding: 0 20px;
}

.tier-board {
  background-color: var(--card-bg);
  border: 2px solid var(--card-border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.tier-row {
  display: flex;
  min-height: 96px;
  border-bottom: 2px solid var(--card-border);
}

.tier-row:last-child {
  border-bottom: none;
}

.tier-label {
  width: 90px;
  min-width: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Chakra Petch', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: #0d1117;
  user-select: none;
}

.tier-s { background-color: #ff7f7f; }
.tier-a { background-color: #ffbf7f; }
.tier-b { background-color: #ffdf7f; }
.tier-c { background-color: #ffff7f; }
.tier-d { background-color: #bfff7f; }
.tier-f { background-color: #7fbfff; }

.tier-dropzone {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background-color: #12161c;
  transition: background-color 0.15s ease;
}

.tier-dropzone.drag-over {
  background-color: rgba(244, 162, 97, 0.15);
}

.tier-bank-wrapper {
  margin-top: 28px;
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 20px;
}

.tier-bank-wrapper h3 {
  color: var(--accent);
  margin-bottom: 12px;
}

.tier-bank {
  min-height: 110px;
  border-radius: 8px;
  border: 1px dashed var(--card-border);
}

.boss-token {
  width: 108px;
  background-color: var(--card-bg);
  border: 2px solid var(--card-border);
  border-radius: 8px;
  overflow: hidden;
  cursor: grab;
  text-align: center;
  transition: transform 0.15s ease, border-color 0.15s ease;
  user-select: none;
}

.boss-token:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.boss-token.selected {
  border-color: var(--accent);
  box-shadow: 0 0 12px rgba(244, 162, 97, 0.6);
  transform: scale(1.04);
}

.boss-token.dragging {
  opacity: 0.5;
}

.boss-token img {
  width: 100%;
  height: 76px;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.boss-token span {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}