* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  background: #0f0f0f;
  color: #f0f0f0;
  line-height: 1.6;
}

body.light {
  background: #f0f0f0;
  color: #111;
}

header.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  background: #1a1a1a;
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar .logo {
  font-size: 28px;
  font-weight: bold;
  color: #00fff0;
}

.navbar nav a {
  color: #ccc;
  margin-left: 20px;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease, transform 0.2s ease;
  position: relative;
}

.navbar nav a:hover {
  color: #00fff0;
  transform: translateY(-2px);
}

.navbar nav a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -5px;
  left: 0;
  background: linear-gradient(90deg, #00fff0, #00bcd4);
  transition: width 0.3s ease;
}

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

.hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 80px 60px;
  background: linear-gradient(135deg, #111, #1e1e1e);
}

.hero-left h1 {
  font-size: 48px;
}

.hero-left p {
  margin: 20px 0;
  font-size: 18px;
}

#startBtn {
  padding: 12px 28px;
  background: #00fff0;
  color: #000;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
}

.hero-right {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.hero-right .card {
  background: #222;
  padding: 30px;
  border-radius: 12px;
  text-align: center;
  transition: 0.3s;
}

.hero-right .card:hover {
  background: #333;
  transform: scale(1.05);
}

.build-section {
  padding: 60px;
  background: #181818;
  text-align: center;
}

#promptInput {
  width: 80%;
  height: 120px;
  padding: 15px;
  background: #222;
  color: white;
  border-radius: 10px;
  font-size: 16px;
  margin-bottom: 20px;
}

#generateBtn {
  padding: 12px 28px;
  background: #00fff0;
  color: #000;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
}

.preview-section {
  background: #111;
  padding: 30px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 20px;
}

/* ✅ New Premium Button Styling */
.toolbar button {
  padding: 10px 20px;
  background: linear-gradient(145deg, #1c1c1c, #121212);
  border: 1px solid #00fff0;
  color: #00fff0;
  border-radius: 12px;
  font-weight: 600;
  font-size: 15px;
  box-shadow: 0 0 10px rgba(0, 255, 240, 0.3);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.toolbar button:hover {
  background: #00fff0;
  color: #000;
  box-shadow: 0 0 15px rgba(0, 255, 240, 0.8), 0 0 30px rgba(0, 255, 240, 0.5);
  transform: scale(1.05);
}

.workspace {
  display: flex;
  gap: 20px;
}

.preview-pane {
  flex: 2;
}

.preview-pane iframe {
  width: 100%;
  height: 500px;
  border: 1px solid #333;
  border-radius: 10px;
  background: white;
}

.code-pane {
  flex: 1;
  background: #1c1c1c;
  padding: 10px;
  border-radius: 10px;
}

.code-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

/* ✅ Tab Button Upgrades */
.tab {
  padding: 8px 16px;
  background: linear-gradient(145deg, #1a1a1a, #0e0e0e);
  border: 1px solid #00fff0;
  color: #00fff0;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
}

.tab:hover {
  background: #00fff0;
  color: #000;
  transform: scale(1.05);
}

.tab.active {
  background: #00fff0;
  color: black;
  box-shadow: 0 0 10px rgba(0, 255, 240, 0.5);
}

pre {
  white-space: pre-wrap;
  word-wrap: break-word;
  border-radius: 8px;
}

/* ✅ Responsive Tweaks */
@media (max-width: 768px) {
  .workspace {
    flex-direction: column;
  }

  .preview-pane iframe {
    height: 300px;
  }
}

@media (max-width: 600px) {
  .toolbar {
    justify-content: center;
  }

  .toolbar button {
    flex: 1 1 100%;
  }

  .code-tabs {
    justify-content: center;
    flex-wrap: wrap;
  }

  .tab {
    flex: 1 1 auto;
  }
}

.footer {
  text-align: center;
  padding: 15px;
  font-size: 14px;
  color: #888;
  margin-top: 40px;
  border-top: 1px solid #eee;
}

/* 🔥 Custom Grid Layout for Tools & FAQ */
.tool-grid,
.faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  max-width: 1100px;
  margin: auto;
  padding: 40px 20px;
}

.tool-card,
.faq-card {
  background: #1f1f1f;
  border: 1px solid #00fff0;
  border-radius: 16px;
  padding: 25px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tool-card:hover,
.faq-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 15px rgba(0, 255, 240, 0.3);
}

/* 🌀 Animation */
.animate-fade-in {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s ease forwards;
}

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


/* ✅ Scrollable Code Blocks in Code Modal */
#codeModal pre {
  max-height: 400px;
  overflow: auto;
  padding: 15px;
  font-size: 14px;
  background: #0e0e0e;
  white-space: pre-wrap;
  word-break: break-word;
}

#codeModal pre code {
  display: block;
  white-space: pre-wrap;
  word-wrap: break-word;
}

@media (max-width: 768px) {
  .hero {
    flex-direction: column;
    padding: 40px 20px;
    text-align: center;
  }

  .hero-left h1 {
    font-size: 30px;
    margin-bottom: 10px;
  }

  .hero-left p {
    font-size: 15px;
    margin-bottom: 20px;
  }

  .hero-right {
    grid-template-columns: 1fr;
    gap: 15px;
    width: 100%;
    margin-top: 20px;
  }

  .hero-right .card {
    width: 100%;
    font-size: 16px;
    padding: 20px;
  }

  #promptInput {
    width: 100%;
    height: 100px;
    font-size: 15px;
  }

  #generateBtn, #startBtn {
    width: 100%;
    font-size: 16px;
    padding: 12px;
    margin-top: 10px;
  }

  .toolbar {
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
  }

  .toolbar button {
    width: 100%;
    padding: 12px;
    font-size: 14px;
  }

  .workspace {
    flex-direction: column;
  }

  .preview-pane iframe {
    height: 300px;
  }

  .code-tabs {
    justify-content: center;
    flex-wrap: wrap;
  }

  .code-pane {
    padding: 8px;
  }

  .tab {
    padding: 8px 12px;
    font-size: 14px;
    flex: 1 1 auto;
  }

  footer {
    padding: 20px;
    font-size: 14px;
    text-align: center;
  }

  .tool-grid,
  .faq-grid {
    grid-template-columns: 1fr;
  }
}
