:root {
  /* Vibrant Color Palette */
  --primary: hsl(220, 100%, 60%);
  --primary-dark: hsl(220, 100%, 50%);
  --accent: hsl(280, 100%, 65%);
  --accent-glow: hsl(280, 100%, 75%);
  --cyan: hsl(190, 100%, 60%);
  --success: hsl(150, 80%, 50%);

  /* Dark Theme */
  --bg-dark: hsl(220, 25%, 8%);
  --bg-card: hsl(220, 20%, 12%);
  --bg-elevated: hsl(220, 18%, 16%);

  /* Text */
  --text-primary: hsl(0, 0%, 98%);
  --text-secondary: hsl(220, 15%, 65%);
  --text-muted: hsl(220, 15%, 50%);

  /* Gradients */
  --gradient-primary: linear-gradient(
    135deg,
    hsl(220, 100%, 60%) 0%,
    hsl(280, 100%, 65%) 100%
  );
  --gradient-accent: linear-gradient(
    135deg,
    hsl(280, 100%, 65%) 0%,
    hsl(320, 100%, 70%) 100%
  );
  --gradient-cyan: linear-gradient(
    135deg,
    hsl(190, 100%, 60%) 0%,
    hsl(220, 100%, 60%) 100%
  );

  /* Effects */
  --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 30px rgba(138, 80, 255, 0.4);
  --shadow-glow-strong: 0 0 50px rgba(138, 80, 255, 0.6);
  --blur: 20px;
}

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

body {
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
  background: var(--bg-dark);
  background-image:
    radial-gradient(
      circle at 20% 30%,
      rgba(138, 80, 255, 0.15) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 70%,
      rgba(51, 153, 255, 0.15) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 50% 50%,
      rgba(0, 204, 255, 0.08) 0%,
      transparent 70%
    );
  background-attachment: fixed;
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== HEADER ===== */
.site-header {
  background: rgba(20, 20, 30, 0.7);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.2rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  transition: all 0.3s ease;
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(138, 80, 255, 0.05) 50%,
    transparent 100%
  );
  pointer-events: none;
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 1;
}

.logo a {
  font-size: 1.75rem;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-decoration: none;
  position: relative;
  transition: transform 0.3s ease;
  display: inline-block;
}

.logo a:hover {
  transform: translateY(-2px);
}

.main-nav ul {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.main-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  position: relative;
  transition: all 0.3s ease;
  padding: 0.5rem 0;
}

.main-nav a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: width 0.3s ease;
}

.main-nav a:hover {
  color: var(--text-primary);
}

.main-nav a:hover::after {
  width: 100%;
}

/* ===== MAIN CONTENT ===== */
.main-content {
  padding: 3rem 0;
  min-height: 80vh;
}

.tool-section {
  text-align: center;
  margin-bottom: 4rem;
  padding-top: 2rem;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: 1rem;
  font-weight: 900;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.02em;
  line-height: 1.2;
  animation: fadeInUp 0.8s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.subtitle {
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  font-size: clamp(1rem, 2vw, 1.3rem);
  font-weight: 500;
  animation: fadeInUp 0.8s ease 0.2s backwards;
}

/* ===== IFRAME CONTAINER ===== */
.iframe-container {
  background: var(--bg-card);
  border-radius: 24px;
  overflow: hidden;
  position: relative;
  height: 800px;
  width: 100%;
  margin: 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-soft), var(--shadow-glow);
  transition: all 0.4s ease;
  animation: fadeInUp 0.8s ease 0.4s backwards;
}

.iframe-container::before {
  content: "";
  position: absolute;
  inset: -2px;
  background: var(--gradient-primary);
  border-radius: 24px;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.iframe-container:hover::before {
  opacity: 0.3;
}

.iframe-container:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-soft), var(--shadow-glow-strong);
}

iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 24px;
}

/* ===== LOADING SPINNER ===== */
.loading-spinner {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    var(--bg-card) 0%,
    var(--bg-elevated) 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 10;
}

.spinner-icon {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-top: 4px solid var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 1.5rem;
  box-shadow: 0 0 20px rgba(51, 153, 255, 0.4);
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.loading-spinner p {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 1.1rem;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.6;
  }
  50% {
    opacity: 1;
  }
}

/* ===== CONTENT MATTER ===== */
.content-matter {
  background: var(--bg-card);
  padding: 5rem 0;
  margin-top: 5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
}

.content-matter::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--gradient-primary);
  opacity: 0.5;
}

.content-matter h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 1.5rem;
  font-weight: 800;
  background: var(--gradient-cyan);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.02em;
}

.content-matter > .container > p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1.8;
  max-width: 900px;
}

.content-matter h3 {
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  margin: 2rem 0 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  position: relative;
  padding-left: 1rem;
}

.content-matter h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 70%;
  background: var(--gradient-primary);
  border-radius: 2px;
}

.content-matter ul {
  list-style: none;
  margin-bottom: 1.5rem;
  padding-left: 0;
}

.content-matter li {
  margin-bottom: 1rem;
  color: var(--text-secondary);
  font-size: 1.05rem;
  position: relative;
  padding-left: 2rem;
  line-height: 1.7;
  transition: all 0.3s ease;
}

.content-matter li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
  font-size: 1.2rem;
  transition: transform 0.3s ease;
}

.content-matter li:hover {
  color: var(--text-primary);
  transform: translateX(5px);
}

.content-matter li:hover::before {
  transform: translateX(5px);
}

.content-matter a {
  color: var(--cyan);
  text-decoration: none;
  font-weight: 600;
  position: relative;
  transition: all 0.3s ease;
}

.content-matter a:hover {
  color: var(--primary);
  text-shadow: 0 0 10px rgba(51, 153, 255, 0.5);
}

/* Column Layout */
.content-matter > .container > div[style*="flex"] {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)) !important;
  gap: 3rem !important;
  margin-top: 3rem !important;
}

.content-matter > .container > div[style*="flex"] > div {
  background: var(--bg-elevated);
  padding: 2.5rem;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.content-matter > .container > div[style*="flex"] > div::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transition: transform 0.4s ease;
}

.content-matter > .container > div[style*="flex"] > div:hover::before {
  transform: scaleX(1);
}

.content-matter > .container > div[style*="flex"] > div:hover {
  transform: translateY(-8px);
  box-shadow:
    var(--shadow-soft),
    0 0 30px rgba(138, 80, 255, 0.3);
  border-color: rgba(138, 80, 255, 0.3);
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--bg-card);
  color: var(--text-secondary);
  padding: 3rem 0;
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--gradient-primary);
  opacity: 0.5;
}

.site-footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.footer-links {
  display: flex;
  gap: 2.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.3s ease;
  position: relative;
}

.footer-links a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: width 0.3s ease;
}

.footer-links a:hover {
  color: var(--text-primary);
}

.footer-links a:hover::after {
  width: 100%;
}

.site-footer p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .site-header .container {
    flex-direction: column;
    gap: 1.5rem;
  }

  .main-nav ul {
    gap: 1.5rem;
  }

  .iframe-container {
    height: 600px;
    border-radius: 16px;
  }

  .content-matter {
    padding: 3rem 0;
    margin-top: 3rem;
  }

  .content-matter > .container > div[style*="flex"] > div {
    padding: 2rem;
  }

  .footer-links {
    gap: 1.5rem;
  }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: 6px;
  border: 2px solid var(--bg-dark);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(
    180deg,
    var(--primary-dark) 0%,
    var(--accent-glow) 100%
  );
}
