/* Base Styles */
:root {
  --bg-primary: #0f1729;
  --bg-secondary: #0a0e1a;
  --bg-editor: #0d1117;
  --bg-header: #161b22;
  --bg-button: #1c2129;
  --bg-button-hover: #252c38;
  --text-primary: #ffffff;
  --text-secondary: #a0aec0;
  --accent-primary: #3b82f6;
  --accent-secondary: #60a5fa;
  --border-color: #1f2937;
  --code-function: #3b82f6;
  --code-string: #10b981;
  --code-paren: #ffffff;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Montserrat", sans-serif;
  background: linear-gradient(to bottom right, var(--bg-primary), var(--bg-secondary));
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
}

.container {
  max-width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  padding: 1rem;
}

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.25rem;
}

.logo-icon {
  position: relative;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.logo-pulse,
.logo-ping {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

.logo-pulse {
  background-color: rgba(59, 130, 246, 0.5);
  animation: pulse 2s infinite;
}

.logo-ping {
  background-color: rgba(59, 130, 246, 0.3);
  animation: ping 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 0.5;
  }
  70% {
    transform: scale(1);
    opacity: 0.5;
  }
  100% {
    transform: scale(1.2);
    opacity: 0;
  }
}

@keyframes ping {
  0% {
    transform: scale(1);
    opacity: 0.3;
  }
  70% {
    transform: scale(1);
    opacity: 0.3;
  }
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

.discord-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background-color: rgba(59, 130, 246, 0.1);
  border: 1px solid var(--accent-primary);
  color: var(--accent-primary);
  border-radius: 0.375rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s;
}

.discord-btn:hover {
  background-color: rgba(59, 130, 246, 0.2);
}

.icon {
  color: currentColor;
}

/* Hero Section */
.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 4rem;
}

@media (min-width: 1024px) {
  .hero {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }
}

.hero-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 3rem;
  }
}

@media (min-width: 1024px) {
  .hero-title {
    font-size: 3.5rem;
  }
}

.title-line {
  display: block;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.5s forwards;
}

.title-line:nth-child(1) {
  animation-delay: 0.3s;
}

.title-line:nth-child(2) {
  animation-delay: 0.4s;
}

.title-line:nth-child(3) {
  animation-delay: 0.5s;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.highlight {
  background: linear-gradient(to right, var(--accent-primary), var(--accent-secondary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-description {
  max-width: 32rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  font-size: 1.125rem;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.download-btn {
  position: relative;
  overflow: hidden;
  padding: 0.75rem 1.5rem;
  background-color: var(--accent-primary);
  color: white;
  border: none;
  border-radius: 0.375rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s;
}

.download-btn:hover {
  background-color: #2563eb;
}

.showcase-btn {
  padding: 0.75rem 1.5rem;
  background-color: transparent;
  color: var(--accent-primary);
  border: 1px solid rgba(59, 130, 246, 0.5);
  border-radius: 0.375rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s;
  text-decoration: none;
}

.showcase-btn:hover {
  background-color: rgba(59, 130, 246, 0.1);
}

/* Executor Preview */
.executor-preview {
  width: 100%;
  /* Remove the max-width constraint to allow full width */
  /* max-width: 36rem; */
  /* Remove the auto margins */
  margin: 0;
  border-radius: 0.5rem;
  overflow: hidden;
  border: 1px solid var(--border-color);
  background-color: var(--bg-editor);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.5s forwards 0.5s;
}

/* Adjust the hero grid to ensure the executor takes full width */
.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 4rem;
}

@media (min-width: 1024px) {
  .hero {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }

  /* Ensure the executor preview takes full width in its grid cell */
  .executor-preview {
    width: 100%;
  }
}

.window-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--bg-header);
  padding: 0.5rem 1rem;
}

.tab-section {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.window-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 1.25rem;
  width: 1.25rem;
}

.tabs {
  display: flex;
  align-items: center;
  margin-left: 1rem;
}

.tab {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.5rem;
  background-color: var(--bg-button);
  border-radius: 0.25rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.tab.active {
  color: var(--text-primary);
}

.new-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 0.5rem;
  cursor: pointer;
  color: var(--text-secondary);
}

.window-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.window-controls .icon {
  cursor: pointer;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.window-controls .icon:hover {
  color: var(--text-primary);
}

.editor-area {
  position: relative;
  height: 300px;
  transition: height 0.3s ease;
  overflow: hidden;
}

.minimized-notice {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
  font-size: 0.875rem;
  background-color: var(--bg-editor);
  z-index: 10;
}

.editor-content {
  display: flex;
  height: 100%;
}

.hidden {
  display: none;
}

.line-numbers {
  width: 2rem;
  background-color: var(--bg-editor);
  padding: 0.5rem 0;
  text-align: right;
}

.line-number {
  padding: 0 0.5rem;
  font-size: 0.875rem;
  color: #4b5563;
}

.code-area {
  flex: 1;
  padding: 0.5rem 0 0.5rem 0.5rem;
  overflow: hidden;
}

.code-line {
  font-family: monospace;
  font-size: 0.875rem;
}

.code-function {
  color: var(--code-function);
}

.code-string {
  color: var(--code-string);
}

.code-paren {
  color: var(--code-paren);
}

.bottom-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--bg-header);
  padding: 0.75rem;
}

.left-controls {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.control-btn {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.375rem 0.75rem;
  background-color: var(--bg-button);
  color: white;
  border: none;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  cursor: pointer;
  transition: background-color 0.2s;
}

.control-btn:hover {
  background-color: var(--bg-button-hover);
}

.status-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--bg-editor);
  padding: 0.25rem 1rem;
}

.status-indicator {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background-color: #10b981;
  animation: pulse 2s infinite;
}

.status-bar span {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* Features Section */
.features {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 1.5rem;
  margin-top: 6rem;
  margin-bottom: 3rem;
}

@media (min-width: 640px) {
  .features {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .features {
    grid-template-columns: repeat(4, 1fr);
  }
}

.feature-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem;
  background: linear-gradient(to bottom, rgba(31, 41, 55, 0.5), rgba(17, 24, 39, 0.5));
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s, box-shadow 0.3s;
  opacity: 1;
  transform: translateY(20px);
  outline: 1px solid var(--border-color);
  /* add blur effect */
  backdrop-filter: blur(4px);
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
}

.feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  margin-bottom: 1rem;
}

.feature-icon .icon {
  color: var(--accent-primary);
  transition: transform 0.5s;
}

.feature-card:hover .feature-icon .icon {
  transform: rotate(360deg);
}

.feature-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.feature-card p {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* Animation for feature cards */
@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.showcases {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 0.5rem;
  margin-top: 6rem;
  margin-bottom: 3rem;
}

@media (min-width: 640px) {
  .showcases {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .showcases {
    grid-template-columns: repeat(3, 1fr); /* Changed from 4 to 3 columns */
  }
}

/* Also, let's improve the showcase cards to ensure proper sizing */
.showcase-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  /*padding: 1rem; /* Reduced padding for better fit */
  border-radius: 0.5rem;
  transition: transform 0.3s, box-shadow 0.3s;
  opacity: 1;
  transform: translateY(20px);
  width: 100%; /* Ensure cards take full width of their grid cell */
}

.showcase-embed {
  width: 100%; /* Make embeds responsive */
  height: 200px; /* Fixed height for consistency */
  outline: 1px solid var(--border-color);
  border-radius: 0.5rem;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
}

.header_tab_btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(96, 165, 250, 0.05));
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: var(--accent-primary);
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(8px);
  position: relative;
  overflow: hidden;
}

.header_tab_btn:hover {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(96, 165, 250, 0.1));
  border-color: var(--accent-primary);
  color: var(--text-primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.15);
}

.header_tab_btn:active {
  transform: translateY(0);
}

.header_tab_btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.5s;
}

.header_tab_btn:hover::before {
  left: 100%;
}

.header-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}