*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: #020B44;
  font-family: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
  position: relative;
  width: 100%;
}

/* Background blur elements */
.bg-blur {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.blur-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  animation: float 20s ease-in-out infinite;
}

.blur-orb--1 {
  width: 320px;
  height: 320px;
  background: rgba(99, 102, 241, 0.4);
  top: 10%;
  left: 5%;
  animation-duration: 18s;
  animation-delay: 0s;
}

.blur-orb--2 {
  width: 280px;
  height: 280px;
  background: rgba(139, 92, 246, 0.35);
  top: 60%;
  right: 10%;
  animation-duration: 22s;
  animation-delay: -4s;
}

.blur-orb--3 {
  width: 240px;
  height: 240px;
  background: rgba(6, 182, 212, 0.3);
  bottom: 15%;
  left: 15%;
  animation-duration: 25s;
  animation-delay: -8s;
}

.blur-orb--4 {
  width: 200px;
  height: 200px;
  background: rgba(236, 72, 153, 0.25);
  top: 30%;
  right: 25%;
  animation-duration: 16s;
  animation-delay: -2s;
}

.blur-orb--5 {
  width: 260px;
  height: 260px;
  background: rgba(59, 130, 246, 0.3);
  bottom: 25%;
  right: 30%;
  animation-duration: 20s;
  animation-delay: -6s;
}

@keyframes float {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  25% {
    transform: translate(30px, -40px) scale(1.05);
  }
  50% {
    transform: translate(-20px, 20px) scale(0.95);
  }
  75% {
    transform: translate(15px, 25px) scale(1.02);
  }
}

.hero {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2rem;
  max-width: 100%;
  width: 100%;
}

.logo {
  display: block;
  margin: 0 auto;
  max-width: 280px;
  width: 100%;
  height: auto;
  filter: brightness(0) invert(1);
}

/* Code editor wrapper (snippet) around typewriter */
.code-editor {
  margin: 1rem auto 1rem;
  max-width: 420px;
  width: 100%;
  text-align: left;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.code-editor__titlebar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: rgba(0, 0, 0, 0.35);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.code-editor__dots {
  display: flex;
  gap: 6px;
}

.code-editor__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.code-editor__dot--red { background: #ff5f56; }
.code-editor__dot--yellow { background: #ffbd2e; }
.code-editor__dot--green { background: #27c93f; }

.code-editor__filename {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
  font-family: system-ui, sans-serif;
  margin-left: 0.25rem;
}

/* Code editor snippet without titlebar (e.g. payment info) */
.code-editor--no-header.payment-snippet {
  margin-bottom: 1.5rem;
}

.code-editor__body {
  display: flex;
  align-items: flex-start;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.25);
  font-family: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, monospace;
  font-size: 0.95rem;
  line-height: 1.6;
}

.code-editor__line-no {
  flex-shrink: 0;
  width: 1.5em;
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.9em;
  user-select: none;
}

.code-editor__body pre {
  margin: 0;
  flex: 1;
  min-width: 0;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  overflow-x: visible;
}

.code-editor__body code {
  background: none;
  padding: 0;
  font-size: inherit;
}

.slogan {
  margin: 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: inherit;
  font-weight: 400;
  letter-spacing: 0.02em;
  min-height: 1.5em;
}

.typewriter-word {
  display: inline-block;
  min-width: 0.4em;
}

.typewriter-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 2px;
  background: currentColor;
  animation: blink 0.8s step-end infinite;
  vertical-align: text-bottom;
}

@keyframes blink {
  50% { opacity: 0; }
}

.btn-works {
  display: inline-block;
  margin-bottom: 2rem;
  padding: 0.75rem 1.75rem;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  font-size: 1rem;
  font-weight: 500;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}

.btn-works:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
}

/* Code editor style button (IDE Run button look) */
.btn-works--code {
  font-family: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  padding: 0.6rem 1.25rem 0.6rem 1rem;
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-left: 3px solid rgba(39, 201, 63, 0.9);
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.btn-works--code:hover {
  background: rgba(0, 0, 0, 0.5);
  border-color: rgba(255, 255, 255, 0.22);
  border-left-color: #27c93f;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Red accent for price plans button */
.btn-works--code-red {
  border-left-color: rgba(220, 53, 69, 0.9);
}
.btn-works--code-red:hover {
  border-left-color: #dc3545;
}

.social-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  align-items: center;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.95rem;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}

.social-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateY(-2px);
}

.social-btn .icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

/* Small social buttons (index + projects) */
.social-buttons--small {
  margin-top: 2rem;
  gap: 0.6rem;
}

.hero:not(.hero--projects) .social-buttons--small {
  margin: 0;
}

.social-buttons--small .social-btn {
  padding: 0.45rem 0.85rem;
  font-size: 0.8rem;
  border-radius: 6px;
}

.social-buttons--small .social-btn .icon {
  width: 16px;
  height: 16px;
}

/* Projects page – top, centered left–right */
.page-projects {
  justify-content: center;
  align-items: flex-start;
  padding-top: 2rem;
}

.page-projects .hero--projects {
  text-align: center;
  padding: 2rem;
  margin-top: 0;
}

.logo-link {
  display: inline-block;
  margin-bottom: 1.5rem;
}

.logo-link .logo {
  display: block;
}

.projects-title {
  margin: 0 0 2rem;
  color: rgba(255, 255, 255, 0.95);
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.projects-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.projects-list a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-size: 1rem;
  opacity: 0.7;
  transition: opacity 0.2s, color 0.2s;
  word-break: break-all;
}

.projects-list a:hover {
  opacity: 1;
  color: #fff;
  text-decoration: underline;
}

/* Price plans page – packages in snippet style */
.price-packages {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  margin: 0 0 2rem;
  width: 100%;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

.price-package {
  width: 100%;
}

.currency-wrap {
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.currency-label {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9rem;
}

/* Bootstrap dropdown – matches our design */
.currency-dropdown-btn {
  font-family: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Monaco, Consolas, monospace !important;
  font-size: 0.9rem !important;
  font-weight: 500 !important;
  letter-spacing: 0.03em;
  padding: 0.55rem 1rem 0.55rem 0.85rem !important;
  background: rgba(0, 0, 0, 0.4) !important;
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-left: 3px solid rgba(39, 201, 63, 0.9) !important;
  border-radius: 4px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  transition: background 0.2s, border-color 0.2s;
}

.currency-dropdown-btn:hover,
.currency-dropdown-btn:focus,
.currency-dropdown-btn.show {
  background: rgba(0, 0, 0, 0.5) !important;
  border-color: rgba(255, 255, 255, 0.22) !important;
  border-left-color: #27c93f !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  color: #fff !important;
}

.currency-dropdown-btn::after {
  display: none !important;
}

.currency-dropdown-menu {
  background: rgba(0, 0, 0, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 6px !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4) !important;
  padding: 0.25rem !important;
}

.currency-dropdown-menu .dropdown-item {
  color: rgba(255, 255, 255, 0.9) !important;
  font-family: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Monaco, Consolas, monospace;
  font-size: 0.9rem;
  padding: 0.5rem 0.75rem !important;
  border-radius: 4px;
}

.currency-dropdown-menu .dropdown-item:hover,
.currency-dropdown-menu .dropdown-item:focus {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #fff !important;
}

.currency-dropdown-menu .dropdown-item.active {
  background: rgba(39, 201, 63, 0.25) !important;
  color: #fff !important;
}

.code-key {
  color: rgba(139, 233, 253, 0.95);
}

.code-comment {
  color: rgba(106, 153, 85, 0.95);
}

/* ========== RESPONSIVE ========== */

/* Small phones (up to 400px) */
@media (max-width: 400px) {
  .hero {
    padding: 1rem 1rem 1.5rem;
  }
  .logo {
    max-width: 180px;
  }
  .code-editor {
    margin: 0.75rem auto;
    border-radius: 8px;
  }
  .code-editor__titlebar {
    padding: 0.4rem 0.6rem;
  }
  .code-editor__body {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
  }
  .code-editor__dot {
    width: 8px;
    height: 8px;
  }
  .btn-works {
    margin-bottom: 1.5rem;
    padding: 0.6rem 1.25rem;
    font-size: 0.85rem;
  }
  .btn-works--code {
    font-size: 0.75rem;
    padding: 0.5rem 1rem 0.5rem 0.85rem;
  }
  .social-buttons {
    gap: 0.6rem;
  }
  .social-btn {
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
  }
  .social-btn .icon {
    width: 18px;
    height: 18px;
  }
  .page-projects {
    padding-top: 1rem;
  }
  .page-projects .hero--projects {
    padding: 1rem;
  }
  .logo-link {
    margin-bottom: 1rem;
  }
  .projects-title {
    font-size: 0.8rem;
    letter-spacing: 0.15em;
    margin-bottom: 1.5rem;
  }
  .projects-list {
    gap: 0.35rem;
  }
  .projects-list a {
    font-size: 0.85rem;
  }
  .price-packages {
    gap: 1rem;
    margin-bottom: 1.5rem;
  }
  .social-buttons--small {
    margin-top: 1.5rem;
    gap: 0.5rem;
  }
  .social-buttons--small .social-btn {
    padding: 0.35rem 0.65rem;
    font-size: 0.7rem;
  }
  .social-buttons--small .social-btn .icon {
    width: 14px;
    height: 14px;
  }
  .blur-orb--1 { width: 180px; height: 180px; }
  .blur-orb--2 { width: 160px; height: 160px; }
  .blur-orb--3 { width: 140px; height: 140px; }
  .blur-orb--4 { width: 120px; height: 120px; }
  .blur-orb--5 { width: 150px; height: 150px; }
  .blur-orb { filter: blur(60px); }
}

/* Phones (401px – 600px) */
@media (max-width: 600px) {
  .hero {
    padding: 1.25rem 1.25rem 1.75rem;
  }
  .logo {
    max-width: 220px;
  }
  .code-editor {
    max-width: 100%;
    border-radius: 8px;
  }
  .code-editor__body {
    font-size: 0.875rem;
    padding: 0.6rem 0.85rem;
  }
  .btn-works--code {
    font-size: 0.82rem;
    padding: 0.55rem 1.1rem 0.55rem 0.9rem;
  }
  .social-btn {
    padding: 0.65rem 1.1rem;
    font-size: 0.9rem;
  }
  .page-projects .hero--projects {
    padding: 1.25rem 1rem;
  }
  .projects-title {
    font-size: 0.9rem;
    letter-spacing: 0.18em;
    margin-bottom: 1.75rem;
  }
  .projects-list a {
    font-size: 0.9rem;
  }
  .blur-orb--1 { width: 220px; height: 220px; }
  .blur-orb--2 { width: 200px; height: 200px; }
  .blur-orb--3 { width: 180px; height: 180px; }
  .blur-orb--4 { width: 160px; height: 160px; }
  .blur-orb--5 { width: 190px; height: 190px; }
  .blur-orb { filter: blur(70px); }
}

/* Large phones / small tablets (601px – 768px) */
@media (max-width: 768px) {
  .hero {
    padding: 1.5rem;
  }
  .logo {
    max-width: 260px;
  }
  .code-editor {
    max-width: 100%;
  }
  .page-projects .hero--projects {
    padding: 1.5rem;
  }
  .projects-list {
    max-width: 100%;
    padding: 0 0.5rem;
  }
}

/* Tablets (769px – 1024px) */
@media (max-width: 1024px) {
  .hero {
    padding: 1.75rem 2rem;
  }
  .code-editor {
    max-width: min(420px, 100%);
  }
}

/* Desktop – ensure content doesn’t stretch too wide */
@media (min-width: 1025px) {
  .hero {
    max-width: 720px;
    padding: 2rem 2.5rem;
  }
  .page-projects .hero--projects {
    max-width: 560px;
    padding: 2rem;
  }
  .price-packages {
    max-width: 100%;
  }
  .projects-list {
    max-width: 100%;
  }
}

/* Large desktop */
@media (min-width: 1400px) {
  .logo {
    max-width: 320px;
  }
  .code-editor {
    max-width: 460px;
  }
  .projects-title {
    font-size: 1.1rem;
    letter-spacing: 0.22em;
  }
  .projects-list a {
    font-size: 1.05rem;
  }
}
