/* Base styling for dark and light themes with improved backgrounds and interactive design */
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@500&family=Montserrat:wght@600&display=swap'");

/* Utility class for hidden elements */
.hidden {
  display: none;
}

body {
  font-family: "Roboto", sans-serif;
  margin: 20px;
  padding: 0;
  transition:
    background 0.3s,
    color 0.3s;
}

/* Dark Mode (default) with futuristic blue metal gradient */
.dark-mode {
  background: linear-gradient(135deg, #1c1f3b 0%, #303a66 100%);
  color: #c8d1dc;
}

/* Light Mode with soft futuristic blue gradient */
.light-mode {
  background: linear-gradient(135deg, #eef5fa, #d9e6f2);
  color: #2c3e50;
}

/* Header Styles */
.header {
  text-align: center;
  margin-bottom: 20px;
}

.logo-container {
  margin-bottom: 10px;
}

.logo {
  width: 50px;
  height: auto;
}

.page-title {
  font-size: 1.8rem;
  margin: 0;
  color: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-title svg {
  margin-left: 0px;
}

.page-title:hover svg {
  fill: red;
}

h1 {
  font-size: 3rem;
  font-weight: bold;
  text-transform: uppercase;
  color: #ffffff;
  text-shadow:
    0 0 5px #ffffff,
    0 0 15px #00ffff,
    0 0 25px #00ffff;
  animation: glitch 1.5s infinite alternate;
}

@keyframes glitch {
  0% {
    text-shadow:
      2px 2px 0px #ff00ff,
      -2px -2px 0px #00ffff;
  }
  50% {
    text-shadow:
      -2px -2px 0px #ff00ff,
      2px 2px 0px #00ffff;
  }
  100% {
    text-shadow:
      2px 2px 0px #ff00ff,
      -2px -2px 0px #00ffff;
  }
}

@keyframes changeColor {
  0% {
    fill: #dac5c5d1;
  }
  35% {
    fill: #e9a5a5a1;
  }
  50% {
    fill: #f97171c1;
  }
  100% {
    fill: #ff2828c5;
  }
}

.page-title svg path {
  animation: changeColor 1.5s infinite alternate;
}

.page-title i {
  margin-right: 8px;
}

.page-subtitle {
  font-size: 0.8rem;
  margin-top: 15px;
  color: inherit;
  align-items: center;
  justify-content: center;
}

.theme-toggle {
  padding: 6px 12px;
  margin-top: 10px;
  font-size: 0.8rem;
  cursor: pointer;
  border: 1px solid #3e5367;
  border-radius: 4px;
  background: transparent;
  color: inherit;
  display: inline-flex;
  align-items: center;
  transition:
    background 0.2s ease,
    border 0.2s ease;
}

.theme-toggle:hover {
  background: rgba(100, 150, 200, 0.15);
  border-color: #669bbc;
}

.theme-toggle i {
  margin-right: 6px;
}

/* Category Section */
.category-section {
  text-align: center;
  margin: 15px 0;
}

.category-label {
  font-size: 0.9rem;
  margin-right: 8px;
}

.category-label i {
  margin-right: 4px;
}

.category-select {
  padding: 6px 10px;
  font-size: 0.9rem;
  border: 1px solid #5c7a99;
  border-radius: 4px;
  background: inherit;
  color: inherit;
  transition: border 0.2s ease;
}

.category-select:hover {
  border-color: #87aacc;
}

/* API Container */
#api-container {
  max-width: 800px;
  margin: 0 auto;
}

/* Section Style */
.section {
  border: 1px solid #324a5f;
  border-radius: 5px;
  padding: 12px 18px;
  margin-bottom: 15px;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

/* Category Titles */
.category-title {
  font-size: 1.2rem;
  margin-bottom: 8px;
  color: #66a3d2;
  font-family: 'Poppins', sans-serif;
}

/* Card Style */
.card {
  border: 1px solid #506a87;
  border-radius: 5px;
  padding: 12px;
  margin-bottom: 12px;
  background: rgba(255, 255, 255, 0.07);
  cursor: pointer;
  transition:
    background 0.2s ease,
    border 0.2s ease;
}

.card:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #7faed8;
}

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

.card-title {
  font-size: 1rem;
  font-weight: 500;
}

.card-title i {
  margin-right: 4px;
}

.method-label {
  background: #66a3d2;
  color: #1e1e1e;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  cursor: pointer;
}

/* Card Description */
.card-description {
  font-size: 0.85rem;
  margin: 6px 0;
  line-height: 1.5;
}

/* Buttons */
.try-api-button,
.view-endpoint-button,
.toggle-schema-button {
  margin: 6px 4px 6px 0;
  padding: 5px 10px;
  font-size: 0.8rem;
  cursor: pointer;
  border: 1px solid #66a3d2;
  border-radius: 4px;
  background: transparent;
  color: inherit;
  transition:
    background 0.2s ease,
    border 0.2s ease;
}

.try-api-button:hover,
.view-endpoint-button:hover,
.toggle-schema-button:hover {
  background: rgba(102, 163, 210, 0.2);
  border-color: #87c2e5;
}

/* Response Schema & Response Box */
.response-schema,
.response-box {
  font-family: monospace;
  font-size: 0.8rem;
  background: #1c2b3a;
  padding: 10px;
  border-radius: 4px;
  overflow-x: auto;
  margin-top: 6px;
  max-width: 100%;
  white-space: pre-wrap;
}

.response-schema {
  background: linear-gradient(
    90deg,
    #c5a3ff,
    /* Ungu pastel */ #87e8de,
    /* Biru toska */ #a1cf6b,
    /* Hijau lembut */ #f7d86c /* Kuning pastel */
  );
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: bold;
  animation: gradientShift 5s infinite linear;
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.response-box {
  color: #c8d4e0;
}

.error {
  color: #ff7070;
  font-weight: bold;
}

/* Footer Styles */
.footer {
  text-align: center;
  font-size: 0.8rem;
  margin-top: 30px;
}

/* Overlay/Announcement Styles */
.overlay {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(20, 30, 40, 0.95);
  padding: 10px 0;
  text-align: center;
  z-index: 100;
  transition: opacity 0.5s ease;
  opacity: 1;
}

/* Fade in animation */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.fade-in {
  animation: fadeIn 0.5s ease forwards;
}

.overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.overlay iframe {
  width: 90%;
  max-width: 600px;
  height: 40px;
  border: none;
}

/* Overlay Close Button */
.overlay-close {
  position: absolute;
  top: 2px;
  right: 2px;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}
