/* ===== Base Body Layout ===== */
body {
  background: radial-gradient(circle at 0% -50%, #f8d367 20%, transparent 60%),
              radial-gradient(circle at 100% -50%, #f8d367 20%, transparent 60%),
              linear-gradient(180deg, var(--green) 0%, var(--green-dark) 100%);
  background-blend-mode: screen, screen, normal;
  background-attachment: fixed;
  background-repeat: no-repeat;
  background-size: cover;
  background-color: var(--green-dark); /* fallback color */
  font-family: 'Segoe UI', sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* ===== Wrapper and Card ===== */
.wrapper {
  width: 80%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
}
.card {
  margin-top: 2rem;
  border-radius: 20px;
  background: var(--white);
  box-shadow: 0 10px 20px rgba(111, 111, 111, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* ===== Header Section ===== */
.header h1 {
  margin: 0 0 1rem;
  padding: 20px;
  font-size: 1rem;
  line-height: 1.5;
  border-radius: 20px 20px 0 0;
  background-color: var(--green-dark);
}

/* ===== Banner Section ===== */
.banner-slider {
  width: 100%;
  max-width: 400px;
  margin-top: 2rem;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

.slides {
  display: flex;
  transition: transform 0.5s ease;
  width: 100%;
}

.slide {
  flex: 0 0 100%;
  max-width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.banner-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
}

.navigation-dots {
  display: flex;
  justify-content: center;
  margin-top: 0.5rem;
  gap: 0.5rem;
}
.navigation-dots label {
  width: 12px;
  height: 12px;
  background: #ccc;
  border-radius: 50%;
  cursor: pointer;
}
.navigation-dots label:hover {
  background: #999;
}

#slide1:checked ~ .slides {
  transform: translateX(0%);
}
#slide2:checked ~ .slides {
  transform: translateX(-100%);
}

#slide1:checked ~ .navigation-dots label:nth-child(1),
#slide2:checked ~ .navigation-dots label:nth-child(2) {
  background: #ffffff;
}


/* ===== Gauge Chart ===== */
.gauge-chart svg {
  max-width: 100%;
  height: auto;
}

/* ===== Text/Colour Sections ===== */

.fixed-text, details {
  font-size: 0.95rem;
  text-align: justify;
  color: var(--green-dark);
}

.welcomimg h1{
  color: var(--white);
  background: var(--green-dark);
}

.warning h1{
  color: var(--white);
  background: var(--red-dark);
}

.success li, .success summary {
  color: var(--green-dark);
  background: var(--green-white);
}

.failure li, .failure summary {
  color: var(--red-dark);
  background: var(--red-light);
}

.rank-info {
  font-size: 25px;
  fill: var(--green-dark);
  font-weight: bold;
}

/* ===== Journey Button ===== */
.journey-button {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 0.75rem 1.25rem;
  background-color: var(--yellow-dark);
  color: var(--white);
  text-decoration: none;
  border-radius: 12px;
  font-weight: bold;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: background 0.3s ease;
}
.journey-button:hover {
  background-color: var(--yellow);
}

/* ===== Tabs Navigation ===== */
.nav-buttons {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
}
.nav-button {
  padding: 0.75rem;
  flex: 1;
  aspect-ratio: 1 / 1;
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--white);
  color: var(--green-dark);
  text-decoration: none;
  border-radius: 20px;
  font-weight: bold;
  font-size: 1rem;
  transition: background 0.3s ease;
}
.nav-button:hover {
  background-color: #e2e4e9;
}

.fixed-text {
  list-style: none;
  margin: 0;
  padding: 0 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.fixed-text li {
  padding: 0.75rem 1rem;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-sizing: border-box;
}

details {
  list-style: none;
  margin: 0;
  padding: 0 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

summary {
  padding: 0.75rem 1rem;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  cursor: pointer;
}

details[open] summary {
  color: var(--yellow-dark);
  border-radius: 12px 12px 0 0;
}
details p {
  margin: 0;
  background: var(--white);
  color: black;
  padding: 0.75rem 1rem;
  border-radius: 0 0 12px 12px;
  border-top: 1px solid #eee;
  box-shadow: 0 2px 2px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  box-sizing: border-box;
}

/* ===== Tab Container (for multiple tabs) ===== */
.tab-container {
  position: relative;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.tab-container input[type="radio"] {
  display: none;
}
.tab-content {
  display: none;
  animation: fadein 0.3s ease;
}

/* Active tab button style */
#tab1:checked ~ .nav-buttons label[for="tab1"],
#tab2:checked ~ .nav-buttons label[for="tab2"],
#tab3:checked ~ .nav-buttons label[for="tab3"] {
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
  background-color: var(--green-dark);
  color: var(--white);
}

/* Active tab content display */
#tab1:checked ~ .tab-container .tab1,
#tab2:checked ~ .tab-container .tab2,
#tab3:checked ~ .tab-container .tab3 {
  display: block;
}

/* ===== Animations ===== */
@keyframes fadein {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* ===== Accessibility: Reduced Motion Support ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ===== Responsive Breakpoints ===== */
@media (max-width: 768px) {
  .wrapper {
    width: 90%;
  }
}

@media (max-width: 480px) {
  .wrapper {
    width: 95%;
  }
  .header h1 {
    font-size: 0.95rem;
    padding: 1rem;
  }
  .rank-info {
    font-size: 20px;
  }
  .nav-button {
    font-size: 0.9rem;
  }
  .tab-content {
    font-size: 0.95rem;
  }
  .nav-buttons {
    gap: 0.5rem;
  }
}
