@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;700&display=swap');

:root {
  --background-color: #121212;
  --background-gradient-start: #1f1f1f;
  --surface-color: #1E1E1E;
  --primary-text-color: #E0E0E0;
  --secondary-text-color: #B0B0B0;
  --accent-color: #0077B6;
  --white: #FFFFFF;
  --black: #000000;
  --brown: #A0522D;
  --purple: #6A0DAD;
  --gray: #808080;
  --yellow: #FFD700;
  --orange: #FFA500;
  --green: #008000;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Roboto', sans-serif;
  background-color: var(--background-color);
  background-image: linear-gradient(180deg, var(--background-gradient-start), var(--background-color));
  background-attachment: fixed;
  color: var(--primary-text-color);
  line-height: 1.6;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem;
}

/* --- Header and Navigation --- */
.main-header {
  background-color: rgba(30, 30, 30, 0.9);
  backdrop-filter: blur(10px);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 100;
  border-bottom: 1px solid #333;
}

.main-nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.main-nav li {
  margin: 5px 10px;
}

.main-nav a {
  color: var(--primary-text-color);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  transition: color 0.3s ease;
  padding: 5px 10px;
  border-radius: 5px;
}

.main-nav a:hover {
  color: var(--white);
  background-color: var(--accent-color);
}

/* --- Hero Section --- */
#hero {
  position: relative;
  height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white);
  background: url('img/fundo1.webp') no-repeat center center/cover;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-content h1 {
  font-size: 3.5rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
}

.hero-content p {
  font-size: 1.5rem;
  font-weight: 300;
}

/* --- Graduation Titles --- */
.graduation-title {
    font-size: 2.5rem;
    text-align: center;
    margin: 3rem 0 2rem 0;
    color: var(--white);
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 0.5rem;
    display: inline-block;
    left: 50%;
    position: relative;
    transform: translateX(-50%);
}

/* --- Belt Sections --- */
.belt-section {
  background-color: var(--surface-color);
  padding: 2.5rem;
  margin-bottom: 2rem;
  border-radius: 8px;
  border: 1px solid #2a2a2a;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.belt-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* Alternating layout for images */
.belt-section:nth-of-type(even) {
  flex-direction: row-reverse;
}

.belt-content {
  flex: 1;
}

.belt-image {
  flex-basis: 400px;
  width: 400px;
  height: 350px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 4px 10px rgba(0,0,0,0.4);
  transition: transform 0.3s ease;
}

.belt-section:hover .belt-image {
    transform: scale(1.03);
}

.belt-color-display {
  height: 10px;
  width: 150px;
  margin: 0 0 1.5rem 0;
  border-radius: 5px;
  border: 1px solid #555;
}

.sub-belt-container {
    display: flex;
    justify-content: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.sub-belt-container .belt-color-display {
    margin: 0;
    width: 100px;
    position: relative;
}

.belt-color-display.belt-stripe--white::after,
.belt-color-display.belt-stripe--black::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    border-radius: 5px;
}

.belt-color-display.belt-stripe--white::after {
    background: linear-gradient(to right, transparent 45%, var(--white) 45%, var(--white) 55%, transparent 55%);
}

.belt-color-display.belt-stripe--black::after {
    background: linear-gradient(to right, transparent 45%, var(--black) 45%, var(--black) 55%, transparent 55%);
}

.belt-section h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--white);
}

.belt-section p {
  color: var(--secondary-text-color);
  margin-bottom: 1.5rem;
}

.tech-button {
  background-color: var(--accent-color);
  color: var(--white);
  border: none;
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.tech-button:hover {
  background-color: #005f8a;
  transform: translateY(-2px);
}

/* --- Modal --- */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.8);
  animation: fadeIn 0.3s;
}

.modal-content {
  background-color: var(--surface-color);
  margin: 10% auto;
  padding: 2rem;
  border: 1px solid #333;
  width: 90%;
  max-width: 700px;
  border-radius: 8px;
  position: relative;
  animation: slideIn 0.4s;
}

.close-button {
  color: var(--secondary-text-color);
  position: absolute;
  top: 15px;
  right: 25px;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s;
}

.close-button:hover,
.close-button:focus {
  color: var(--white);
}

#modal-title {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 1.8rem;
}

.modal-body {
  display: flex;
  gap: 2rem;
}

.modal-body > div {
  flex: 1;
}

.modal-body h4 {
  font-size: 1.2rem;
  color: var(--accent-color);
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--accent-color);
  padding-bottom: 0.5rem;
}

#modal-attacks-list, #modal-defenses-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.modal-body details {
    background-color: var(--background-color);
    border-radius: 4px;
}

.modal-body summary {
    padding: 12px;
    cursor: pointer;
    font-weight: bold;
    list-style: none; /* Remove default marker */
    position: relative;
    transition: background-color 0.2s;
}

.modal-body summary:hover {
    background-color: #2a2a2a;
}

.modal-body summary::-webkit-details-marker {
    display: none; /* Chrome */
}

.modal-body summary::after {
    content: '+';
    position: absolute;
    right: 15px;
    font-size: 1.2em;
    font-weight: normal;
    transition: transform 0.2s;
}

.modal-body details[open] summary::after {
    transform: rotate(45deg);
}

.modal-body details > div {
    padding: 0 12px 12px 12px;
    font-size: 0.9rem;
    color: var(--secondary-text-color);
}


/* --- Footer --- */
.main-footer-credits {
    text-align: center;
    padding: 2rem;
    margin-top: 2rem;
    color: var(--secondary-text-color);
    font-size: 0.9rem;
    border-top: 1px solid #2a2a2a;
}

/* --- Animations --- */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideIn {
  from { transform: translateY(-50px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
  .hero-content h1 {
    font-size: 2.5rem;
  }
  .hero-content p {
    font-size: 1.2rem;
  }
  .main-nav li {
    margin: 5px;
  }
  .modal-body {
    flex-direction: column;
  }
  .modal-content {
      margin: 20% auto;
  }
  .belt-section, .belt-section:nth-of-type(even) {
    flex-direction: column;
    text-align: center;
  }
  .belt-image {
    width: 100%;
    height: auto;
    flex-basis: auto;
    margin-bottom: 1.5rem;
  }
  .belt-color-display {
    margin: 0 auto 1.5rem auto;
  }
  .sub-belt-container {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 1rem;
  }
  .belt-section {
    padding: 2rem 1.5rem;
  }
  .hero-content h1 {
    font-size: 2rem;
  }
  .hero-content p {
    font-size: 1rem;
  }
  .modal-content {
      margin: 15% auto;
      width: 95%;
      padding: 1.5rem;
  }
  #modal-title {
      font-size: 1.5rem;
  }
  .sub-belt-container {
      flex-direction: column;
      align-items: center;
  }
}
