:root {
  --primary: #1E1E2F;
  --accent: #E04A4A;
  --text: #FFFFFF;
  --secondary: #2C2C3E;

  --primary-bg: #fefefe;
  --secondary-bg: #ffffff;
  --tertiary-bg: #f8f9fa;
  --card-bg: rgba(255, 255, 255, 0.95);
  --glass-bg: rgba(255, 255, 255, 0.8);
  --accent-primary: #ef4444;
  --accent-secondary: #dc2626;
  --accent-tertiary: #b91c1c;
  --accent-coral: #f97316;
  --accent-pink: #ec4899;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --border-primary: rgba(239, 68, 68, 0.15);
  --border-secondary: rgba(0, 0, 0, 0.06);
  

  --gradient-primary: linear-gradient(135deg, var(--accent-primary), var(--accent-coral));
  --gradient-secondary: linear-gradient(135deg, var(--accent-secondary), var(--accent-pink));
  --gradient-bg: linear-gradient(135deg, var(--primary-bg), var(--secondary-bg));
  --gradient-card: linear-gradient(135deg, rgba(255, 255, 255, 1), rgba(248, 249, 250, 1));
  
 
  --shadow-primary: 0 8px 32px rgba(239, 68, 68, 0.08);
  --shadow-secondary: 0 8px 32px rgba(220, 38, 38, 0.08);
  --shadow-card: 0 16px 40px rgba(0, 0, 0, 0.04);
  --shadow-glow: 0 0 20px rgba(239, 68, 68, 0.15);
  
 
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

*, 
*::before, 
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family:'Segoe UI', sans-serif;
  color: var(--text);
  overflow-x: hidden
}



.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--primary);
  color: var(--text);
  border-bottom: 1px solid var(--text);
  z-index: 1000;
  padding: 0 5rem;
  display: flex;
  justify-content: space-between;
  box-sizing: border-box;
  align-items: center;
  height: 100px;   
}

.landing-page-container-codemate-logo a {
  display: flex;
  align-items: center;
  flex: 1;
  text-decoration: none;
  color: inherit;
  pointer-events: auto;
}

.landing-page-container-codemate-logo a img,
.landing-page-container-codemate-logo a h2 {
  pointer-events: auto; 
}

.landing-page-container-codemate-logo,
.navbar,
.buttons {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center; 
}

.logo {
  font-family: 'JetBrains Mono', monospace;
          font-size: 1.6rem;
          font-weight: 600;
          color: #FFFFFF;
          text-shadow: 0 0 20px rgba(248, 248, 248, 0.363);
          letter-spacing: -0.5px;
}

.landing-page-codemate-logo {
  height: 100px;
  width: auto;
  object-fit: contain;
  margin-left: 6.5em;
  position: relative;
  bottom: 0.8rem;
  margin-right: -1rem;
}



.landing-page-container-codemate-logo h2 {
  font-size: 1.6rem;
  margin: 0;
  position: static;
  white-space: nowrap;
}

.navbar {
  gap: 25px;
  flex-wrap: wrap;
}

.nav-link {
  text-decoration: none;
  color: inherit;
}

.nav-link:hover, .header .login-button:hover {
  color: var(--accent);
}

.buttons {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  gap: 15px;
}

.header button {
  justify-content: flex-end;
  padding: 8px 20px;
  border-radius: 6px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.3s ease;
  white-space: nowrap;
}


.header .signup-button {
  background-color: var(--accent);
  color: var(--text);
  border: 2px solid var(--accent);
}

.header .signup-button:hover {
  background-color: #C84040;
}


.header .login-button {
  background-color: var(--primary);
  color: var(--text);
  border: none;
  position: relative;
  top: -0.034rem;
}

.hero {
  overflow: hidden;
  display: flex;
  min-height: 100vh;
  padding-top: 20px;     
  padding-left: 0rem;      
  padding-right: 2rem;
  background-color: var(--primary);
}

.topnav { 
  display: none;
  cursor: pointer;
}


.hero-full-text, .signup-container {
  position: relative;
  padding: 2.7rem 2rem 0 2rem; 
  max-width: 600px;            
  margin-left: 13rem; 
  margin-right: 0;            
             
}

.hero-message {
  font-size: 3.6rem;
  margin-top: 150px;
  
}

.hero-sub-message {
  font-size: 1.2rem;
  max-width: 400px;
  font-weight: 450;
}

.hero-left {
  max-width: 600px;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}


.background-squares {
  position: absolute;    
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;          
  pointer-events: none;
  overflow: hidden;
}

.background-squares .square {
  position: absolute;
  border-radius: 6px;
  box-shadow: 0 0 15px 5px;
  opacity: 0.15;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  animation-direction: alternate;
}


.background-squares .square1 {
  width: 40px;
  height: 40px;
  background-color: var(--accent);
  box-shadow: 0 0 20px 8px var(--accent);
  top: 10%;
  left: 15%;
  animation-name: pulseMove1;
  animation-duration: 6s;
}

.background-squares .square2 {
  width: 25px;
  height: 25px;
  background-color: var(--text);
  box-shadow: 0 0 18px 6px var(--text);
  top: 60%;
  left: 15%;
  animation-name: pulseMove2;
  animation-duration: 8s;
}

.background-squares .square3 {
  width: 30px;
  height: 30px;
  background-color: var(--accent);
  box-shadow: 0 0 22px 7px var(--accent);
  top: 80%;
  left: 70%;
  animation-name: pulseMove3;
  animation-duration: 7s;
}

.background-squares .square4 {
  width: 35px;
  height: 35px;
  background-color: var(--text);
  box-shadow: 0 0 20px 6px var(--text);
  top: 20%;
  left: 75%;
  animation-name: pulseMove4;
  animation-duration: 5s;
}


@keyframes pulseMove1 {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 0.15;
  }
  50% {
    transform: translate(15px, -10px) scale(1.1);
    opacity: 0.25;
  }
  100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.15;
  }
}

@keyframes pulseMove2 {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 0.15;
  }
  50% {
    transform: translate(-10px, 10px) scale(1.15);
    opacity: 0.3;
  }
  100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.15;
  }
}

@keyframes pulseMove3 {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 0.15;
  }
  50% {
    transform: translate(20px, 5px) scale(1.1);
    opacity: 0.28;
  }
  100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.15;
  }
}

@keyframes pulseMove4 {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 0.15;
  }
  50% {
    transform: translate(-15px, -15px) scale(1.12);
    opacity: 0.27;
  }
  100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.15;
  }
}

.signup-container {
  white-space: nowrap;
  border: 2px solid var(--secondary);
  border-radius: 5px;
  padding: 0 1.5rem 1.5rem 1.5rem;
  margin-top: 2.5rem;
  max-width: 400px;
  box-sizing: border-box;
  margin-left: 15rem;
}

.signup-message {
  font-weight: 700;
  font-size: 1.2rem;
  text-align: center;
}

.google-button {
  display: flex;
  align-items: center; 
  justify-content: center; 
  gap: 10px; 
  margin: 0 auto;
  background: #ffffff;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 14px 12px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 1rem; 
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  flex: 1; 
  min-width: 0; 
  color: var(--primary);
}




.divider {
  text-align: center;
  position: relative;
  color: var(--text);
  font-size: 0.9rem;
  opacity: 0.7;
}

.divider::before,
.divider::after {
  content: "";
  display: inline-block;
  vertical-align: middle;
  width: 40%;
  height: 1px;
  margin: 0 12px;
  border-top: 2px dotted white;
}

.signup-container button {
  padding-top: 3rem;
}


.signup-container button {
  display: block;
  width: 100%;
  padding: 0.75rem;
  background-color: transparent;
  color: var(--text);
  border: 2px solid var(--accent);
  margin: 0 auto;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s ease;
}

.signup-container a {
    text-decoration: none;
}


.signup-container button:hover {
  background-color: #C84040;
}

.signup-container input:hover {
  border: 0.1px solid white;
}


.error-message {
  color: #E04A4A; 
  font-size: 0.9rem;
  margin-top: -1rem;
  margin-bottom: 1rem;
  display: none;
}

input.invalid {
  border: 1px solid #E04A4A;
}

.hero-code-snippet {
  width: 80%;
  max-width: 700px;
  margin-top: 220px;
  margin-left: 12rem;
}

.code-window {
  background-color: #2c2c3e;
  border-radius: 8px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

.code-header {
  display: flex;
  gap: 8px;
  padding: 10px;
  background-color: #1e1e2f;
}



.code-header {
  display: flex;
  gap: 8px;
  padding: 10px;
  background-color: #1e1e2f;
  
}


.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.red { background-color: #ff5f56; }
.yellow { background-color: #ffbd2e; }
.green { background-color: #27c93f; }

pre {
  margin: 0;
  padding: 20px;
  overflow-x: auto;
  font-size: 1rem;
}



.code-window {
  position: relative; 
  background-color: #2c2c3e;
  border-radius: 8px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

.language-indicator {
  position: absolute;
  top: 5px;  
  right: 12px;
  background: #00599C;
  color: white;
  font-weight: bold;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.85rem;
  font-family: Arial, sans-serif;
  user-select: none;
  z-index: 10;
}

.courses-section {
  background-color: #EFF2F7;
  min-height: 100vh;
  padding-top: 20px;    
  display: block; 
  padding-bottom: 4rem;

}


.courses-full-text, .about-full-text {
  width: fit-content;
  margin: 0 auto;      
  color: var(--primary);
  text-align: center;
  padding: 0 1rem;
         
             
}

.courses-message, .about-message {
  font-size: 3.6rem;
  margin: 65px auto 40px auto; 
  width: fit-content;

  
}

.courses-sub-message {
  font-size: 1.2rem;
  font-weight: 450;
  max-width: 600px;
  margin: 0 auto;
  padding-bottom: 4rem;
}








.courses {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
  max-width: 1250px;
  margin: 0 auto;
  justify-content: flex-start;
  animation: slideUp 0.6s ease-out;
  transition: var(--transition-smooth);
  
}


#course-link:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(239, 68, 68, 0.06);
  box-shadow: var(--shadow-primary);
  border-color: var(--border-primary);
  
}

.courses > a {
  padding: 2rem;
  border-radius: 15px;
  background: var(--gradient-card);
  color: inherit;
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-secondary);
  border-top: 4px solid var(--accent-primary);
  border-left: 4px solid var(--secondary);
  box-shadow: var(--shadow-card);
  flex: 1 1 320px;
  max-width: 100%;
  height: 290px;
  align-self: stretch; 
  box-sizing: border-box;
  font-size: 1.1em;
  display: flex;
  flex-direction: column;
}

.courses > a > h3:first-of-type {
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent-primary);
}


.courses > a > h2 {
  font-size: 1.5rem;
      font-weight: 700;
      color: var(--text-primary);
  margin-top: 0;
}

.courses > a > h3:last-of-type {
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-secondary);
  margin: 0 0 1.5rem 0;
  line-height: 1.5;
}

svg {
  height: 1.25rem;
  width: 1.25rem;
  vertical-align: middle;
  z-index: 999;
  
  
  
  
}

.beginner-level > span, .advanced-level > span {
  line-height: 1;
  font-size: 0.875rem;
}

.beginner-level, .advanced-level {
  display: inline-flex;
  align-items: center; 
  gap: 8px;
  font-weight: 700;
  margin-top: auto;
  margin-bottom: 0.1rem;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  width: fit-content;
}

.beginner-level {
  background: rgba(34, 197, 94, 0.1);
  color: #166534;
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.advanced-level {
  background: rgba(239, 68, 68, 0.1);
  color: var(--accent-tertiary);
  border: 1px solid var(--border-primary);
}


#course-link {
  text-decoration: none;
}


.about-section {
  background-color: var(--primary);
  color: var(--text);
  min-height: 100vh;
  padding-top: 20px;    
  display: block; 
  padding-bottom: 4rem;
}

.about-full-text {
  max-width: 900px;
  color: var(--text);
  text-align: center;
}


.about-boxes {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
  max-width: 1000px;
  margin: 0 auto;
  justify-content: flex-start;
  animation: slideUp 0.6s ease-out;
  transition: var(--transition-smooth);
  padding: 3.5rem;
  border-radius: 20px;
}


.about-box:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(239, 68, 68, 0.06);
  box-shadow: var(--shadow-primary);
  border-color: var(--border-primary);
}

.about-box {
  padding: 2rem;
  border-radius: 15px;
  background: var(--gradient-card);
  color: inherit;
  backdrop-filter: blur(20px);
  border: 2px solid var(--border-secondary);
  box-shadow: var(--shadow-card);
  flex: 1 1 400px;
  max-width: 100%;
  height: 300px;
  align-self: stretch; 
  box-sizing: border-box;
  font-size: 1.1em;
  display: flex;
  flex-direction: column;
  
}


.about-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: 1.5rem;
  position: relative;
  background: var(--card-gradient);
  color: white;
}


.about-box h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 0;
}

.about-box p {
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-secondary);
  margin: 0 0 1.5rem 0;
  line-height: 1.5;
}


.about-box:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.25),
              0 0 0 1px rgba(255, 255, 255, 0.1);
}

.about-box:hover::before {
  opacity: 1;
}



.about-box:nth-child(1) { 
  --card-gradient: linear-gradient(90deg, #6366f1, #8b5cf6); 
}
.about-box:nth-child(2) { 
  --card-gradient: linear-gradient(90deg, #06b6d4, #3b82f6); 
}
.about-box:nth-child(3) { 
  --card-gradient: linear-gradient(90deg, #10b981, #059669); 
}
.about-box:nth-child(4) { 
  --card-gradient: linear-gradient(90deg, #f59e0b, #ef4444); 
}


.about-box:hover .about-icon {
  transform: scale(1.1);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

/* ── Demo Section ─────────────────────────────────────────────────── */

.demo-section {
  background-color: var(--primary);
  padding: 6rem 2rem;
  overflow: hidden;
}

.demo-inner {
  max-width: 1350px;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  gap: 5rem;
}

/* ── Left text + features ─────────────────────────────────────────── */

.demo-text {
  flex: 0 0 280px;
  max-width: 280px;
}

.demo-heading {
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 1rem 0;
  line-height: 1.1;
}

.demo-sub {
  color: rgba(255,255,255,0.55);
  font-size: 1rem;
  line-height: 1.7;
  margin: 0 0 2.5rem 0;
}

.demo-features {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.demo-feature {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.demo-feature-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(224,74,74,0.12);
  border: 1px solid rgba(224,74,74,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 0.85rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.demo-feature-copy h4 {
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 0.3rem 0;
}

.demo-feature-copy p {
  color: rgba(255,255,255,0.45);
  font-size: 0.85rem;
  line-height: 1.6;
  margin: 0;
}

/* ── Scale wrapper ────────────────────────────────────────────────── */

.demo-window-wrap {
  flex: 1;
  min-width: 0;
}

.demo-scale-container {
  width: 100%;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 40px 80px rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.1);
  position: relative;
}

/* Inner UI is always rendered at 1200×620 then CSS-scaled down */
.demo-lesson-ui {
  width: 1200px;
  height: 620px;
  display: flex;
  transform-origin: top left;
}

/* ── Lesson section (exact copy of real .lesson-section styles) ───── */

.lesson-section-demo {
  width: 35%;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  min-width: 250px;
  box-shadow: 2px 0 10px rgba(0,0,0,0.05);
  flex-shrink: 0;
}

.lesson-panel-demo {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.lesson-header-demo {
  background: #161B22;
  padding: 1.25rem 1.5rem;
  border-bottom: 2px solid #30363d;
  color: white;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
  font-size: 1.05rem;
  font-family: 'IBM Plex Sans', sans-serif;
  flex-shrink: 0;
}

.lesson-header-demo i { color: #58a6ff; font-size: 1.1rem; }

.lesson-content-demo {
  flex: 1;
  padding: 2rem;
  overflow: hidden;
  background: #ffffff;
  line-height: 1.8;
  font-family: 'IBM Plex Sans', sans-serif;
}

.lesson-content-demo h3 {
  color: #2C2C3E;
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.lesson-content-demo p {
  margin-bottom: 1.2rem;
  color: #4b5563;
}

.lesson-content-demo code {
  background: #f3f4f6;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-family: 'IBM Plex Mono', monospace;
  color: #dc2626;
  font-size: 0.9rem;
}

.code-example-demo {
  background: #f8f9fa;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1rem;
  margin: 1rem 0;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.9rem;
  color: #1f2937;
}

.task-box-demo {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-left: 4px solid #f59e0b;
  border-radius: 8px;
  padding: 1.25rem;
  margin: 1.25rem 0;
}

.task-box-demo h4 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  color: #92400e;
  margin: 0 0 0.75rem 0;
  font-size: 0.95rem;
}

.task-box-demo h4 i { color: #f59e0b; }
.task-box-demo p { color: #78350f; margin: 0; }

.hint-box-demo {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 8px;
  padding: 1rem;
  margin: 1rem 0;
}

.hint-header-demo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  color: #0369a1;
  font-size: 0.9rem;
  font-family: 'IBM Plex Sans', sans-serif;
}

.expected-output-demo {
  background: #1f2937;
  border-radius: 8px;
  padding: 1rem;
  margin: 1rem 0;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.85rem;
  color: #10b981;
}

.expected-output-header-demo {
  color: #9ca3af;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.check-btn-demo {
  background: #3b82f6;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  cursor: default;
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  font-family: 'IBM Plex Sans', sans-serif;
}

.lesson-navigation-demo {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: #f8f9fa;
  border-top: 2px solid #e1e5e9;
  flex-shrink: 0;
}

.nav-btn-demo {
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 8px;
  cursor: default;
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #cbd5e1;
  color: #64748b;
  font-family: 'IBM Plex Sans', sans-serif;
}

.nav-btn-active-demo {
  background: #667eea;
  color: white;
}

.lesson-progress-demo {
  font-weight: 600;
  color: #2C2C3E;
  font-size: 0.95rem;
  font-family: 'IBM Plex Sans', sans-serif;
}

/* ── Resizers ─────────────────────────────────────────────────────── */

.lesson-resizer-demo {
  width: 5px;
  background: #e1e5e9;
  flex-shrink: 0;
  position: relative;
}

.lesson-resizer-demo::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 3px; height: 30px;
  background: #64748b;
  border-radius: 2px;
}

.vertical-resizer-demo {
  width: 5px;
  background: #e1e5e9;
  flex-shrink: 0;
  position: relative;
}

.vertical-resizer-demo::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 3px; height: 30px;
  background: #64748b;
  border-radius: 2px;
}

.horizontal-resizer-demo {
  height: 5px;
  background: #e1e5e9;
  flex-shrink: 0;
  position: relative;
}

.horizontal-resizer-demo::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 30px; height: 3px;
  background: #64748b;
  border-radius: 2px;
}

/* ── Compiler section (exact copy of real styles) ─────────────────── */

.compiler-section-demo {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #EFF2F7;
}

.controls-bar-demo {
  background: rgba(255,255,255,0.95);
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  flex-shrink: 0;
}

.control-group-demo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.control-group-demo label {
  font-weight: 600;
  color: #2C2C3E;
  font-size: 0.9rem;
  font-family: 'IBM Plex Sans', sans-serif;
}

.control-group-demo select,
.control-group-demo input {
  padding: 0.5rem 0.75rem;
  border: 2px solid #e1e5e9;
  border-radius: 8px;
  font-size: 0.9rem;
  background: white;
  font-family: 'IBM Plex Sans', sans-serif;
  color: #1f2937;
}

.control-group-demo input { min-width: 180px; }

.run-button-demo {
  background: #eb1717c5;
  color: white;
  border: none;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  cursor: default;
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'IBM Plex Sans', sans-serif;
}

.main-content-demo {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.editor-output-container-demo {
  flex: 1;
  display: flex;
  min-height: 0;
}

.editor-panel-demo {
  width: 50%;
  display: flex;
  flex-direction: column;
  background: white;
}

.panel-header-demo {
  background: #25282C;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #30363d;
  font-weight: 600;
  color: #F9F9FA;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.panel-header-demo i { color: #667eea; }

.status-indicator-demo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-left: auto;
}

.status-ready-demo {
  background: rgba(34,197,94,0.1);
  color: #22c55e;
}

.editor-body-demo {
  flex: 1;
  background: #1D1F21;
  padding: 1rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 14px;
  line-height: 1.55;
  overflow: hidden;
}

.demo-code-row {
  display: flex;
  white-space: pre;
  min-height: 1.55em;
}

.demo-gutter {
  color: #4a4a6a;
  min-width: 28px;
  text-align: right;
  margin-right: 16px;
  user-select: none;
  flex-shrink: 0;
}

.d-kw  { color: #cc99cd; }
.d-fn  { color: #6fb3d2; }
.d-str { color: #7ec699; }
.d-cm  { color: #5a5a7a; font-style: italic; }
.d-pn  { color: #ccc; }
.d-pl  { color: #d4d4d4; }

.demo-cursor-blink {
  display: inline-block;
  width: 2px;
  height: 0.9em;
  background: #e04a4a;
  vertical-align: middle;
  animation: dcBlink 1s step-end infinite;
}

@keyframes dcBlink { 0%,100%{opacity:1} 50%{opacity:0} }

.output-panel-demo {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #1a1a2e;
}

.output-header-demo {
  background: #25282C;
  color: #F9F9FA;
  padding: 1.14rem 1.5rem;
  border-bottom: 1px solid #fff;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.output-header-demo i { color: #667eea; }

.output-body-demo {
  flex: 1;
  background: #1D1F21;
  color: #F9F9FA;
  padding: 1.5rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 14px;
  line-height: 1.5;
  overflow: hidden;
}

.console-panel-demo {
  height: 200px;
  background: #0d1117;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.console-header-demo {
  background: #161b22;
  color: #F9F9FA;
  padding: 1rem 1.5rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid #30363d;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.console-header-demo i { color: #667eea; }

.console-body-demo {
  flex: 1;
  background: #0d1117;
  color: #e6edf3;
  padding: 1rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
  overflow: hidden;
}

/* ── Output line animation ────────────────────────────────────────── */

.demo-out-line {
  opacity: 0;
  transform: translateY(3px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 14px;
  line-height: 1.5;
  color: #F9F9FA;
  white-space: pre-wrap;
}

.demo-out-success { color: #10b981; }
.demo-out-muted   { color: rgba(255,255,255,0.3); }
.demo-out-line.vis { opacity: 1; transform: translateY(0); }

@media (max-width: 1150px) {
  .demo-inner {
    flex-direction: column;
    gap: 3rem;
  }
  .demo-text {
    flex: none;
    max-width: 100%;
  }
  .demo-features {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1.25rem;
  }
  .demo-feature { flex: 1 1 200px; }
}

@media (max-width: 700px) {
  .demo-heading { font-size: 2.2rem; }
}


.cta-section .landing-page-container-codemate-logo {
  width: fit-content;
  margin: 0 auto;
  margin-bottom: 1.5rem;
}

.cta-section .logo-link {
  gap: 12px;
}


 .cta-section {
  background: var(--primary);
  color: white;
  padding: 1rem 2rem 3rem 2rem;
  text-align: center;
  position: relative;
  min-height: 60vh;
  border-bottom: 1px solid var(--text);
  margin-bottom: 0;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  
}



.cta-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  position: relative;
  z-index: 2;
}

.cta-description {
  font-size: 1.1rem;
  opacity: 0.9;
  max-width: 500px;
  margin: 0 auto 2rem;
  position: relative;
  z-index: 2;
  padding-bottom: 1rem;
}

.cta-button {
  display: inline-block;
  background: linear-gradient(135deg, #e54646 0%, #ed403a 100%);
  color: white;
  padding: 1rem 2.5rem;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(229, 70, 70, 0.4);
  position: relative;
  z-index: 2;
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(229, 70, 70, 0.6);
}

.background-squares.cta {
  position: absolute;    
  top: 0;
  left: 0;
  width: 100vw;
  height: 500px;
  z-index: 0;          
  pointer-events: none;
  overflow: hidden;
}

.background-squares.cta .square1 {
  width: 40px;
  height: 40px;
  background-color: var(--accent);
  box-shadow: 0 0 20px 8px var(--accent);
  top: 20%;
  left: 20%;
  animation-name: pulseMove1;
  animation-duration: 6s;
}

.background-squares.cta .square2 {
  width: 25px;
  height: 25px;
  background-color: var(--text);
  box-shadow: 0 0 18px 6px var(--text);
  top: 80%;
  left: 30%;
  animation-name: pulseMove2;
  animation-duration: 8s;
}

.background-squares.cta .square3 {
  width: 30px;
  height: 30px;
  background-color: var(--accent);
  box-shadow: 0 0 22px 7px var(--accent);
  top: 70%;
  left: 70%;
  animation-name: pulseMove3;
  animation-duration: 7s;
}

.background-squares.cta .square4 {
  width: 35px;
  height: 35px;
  background-color: var(--text);
  box-shadow: 0 0 20px 6px var(--text);
  top: 20%;
  left: 75%;
  animation-name: pulseMove4;
  animation-duration: 5s;
}



/* ── About section now sits on gray background ─────────────────── */
  .about-section {
    background-color: #EFF2F7;
    color: var(--primary);
  }

  .about-full-text {
    color: var(--primary);
  }

  .about-message {
    color: var(--primary);
  }

  /* Cards on gray bg: white cards with dark text */
  .about-box {
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  }

  .about-box h3 {
    color: #1f2937;
  }

  .about-box p {
    color: #4b5563;
  }

  .about-box:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: 0 16px 48px rgba(0,0,0,0.12);
  }

  /* Demo section now sits on dark background (was about's dark) */
  .demo-section {
    background-color: var(--primary) !important;
  }

  .demo-heading {
    color: #ffffff;
  }

  .demo-sub {
    color: rgba(255,255,255,0.55);
  }









 .cta-wrap {
    background: #1E1E2F;
    padding: 80px 40px 90px;
    position: relative;
    overflow: hidden;
    text-align: center;
  }
 
  .grid-bg {
    position: absolute;
    inset: 0;
    background-image:
      linear-gradient(rgba(224,74,74,0.18) 1px, transparent 1px),
      linear-gradient(90deg, rgba(224,74,74,0.18) 1px, transparent 1px);
    background-size: 48px 48px;
    animation: gridDrift 20s linear infinite;
    mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black 20%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black 20%, transparent 80%);
  }
 
  @keyframes gridDrift {
    0% { background-position: 0 0; }
    100% { background-position: 48px 48px; }
  }
 
  .cta-content { position: relative; z-index: 2; }
 
  .cta-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 20px;
    padding: 5px 14px;
    font-size: 12px;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 24px;
  }
 
  .cta-badge .dot-live {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #ffffff;
    animation: blink 1.4s ease-in-out infinite;
  }
  @keyframes blink { 0%,100%{opacity:1;} 50%{opacity:0.3;} }
 
  .cta-title {
    font-size: 2.8rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.15;
    margin-bottom: 16px;
  }
 
  .cta-title span { color: #e04a4a; }
 
  .cta-sub {
    font-size: 1.05rem;
    color: rgba(255,255,255,0.55);
    max-width: 480px;
    margin: 0 auto 36px;
    line-height: 1.7;
  }
 
  .cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
 
  .cta-btn-primary {
    background: #e04a4a;
    color: #fff;
    border: none;
    padding: 14px 28px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    text-decoration: none;
    display: inline-block;
  }
  .cta-btn-primary:hover { background: #c84040; transform: translateY(-2px); }
 
  .cta-btn-secondary {
    background: transparent;
    color: rgba(255,255,255,0.75);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 14px 28px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s, transform 0.2s;
    text-decoration: none;
    display: inline-block;
  }
  .cta-btn-secondary:hover { border-color: rgba(255,255,255,0.5); color: #fff; transform: translateY(-2px); }
 
  footer {
    background: #0E0E1A;
    padding: 60px 40px 32px;
    color: rgba(255,255,255,0.6);
    font-size: 0.875rem;
    font-family: 'Segoe UI', sans-serif;
  }
 
  .footer-top {
    display: grid;
    grid-template-columns: 1.6fr repeat(3, 1fr);
    gap: 40px;
    padding-bottom: 48px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
  }
 
  .footer-brand .brand-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    text-decoration: none;
  }
 
  .brand-name { font-size: 1.1rem; font-weight: 600; color: #fff; font-family: 'JetBrains Mono', 'Courier New', monospace; }
  .brand-name span { color: #e04a4a; }
 
  .footer-brand p {
    font-size: 0.85rem;
    line-height: 1.7;
    color: rgba(255,255,255,0.38);
    max-width: 240px;
    margin-bottom: 0;
  }
 
  .footer-col h4 {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.9);
    margin-bottom: 16px;
  }
 
  .footer-col ul { list-style: none; padding: 0; margin: 0; }
  .footer-col ul li { margin-bottom: 10px; }
  .footer-col ul li a {
    color: rgba(255,255,255,0.4);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
  }
  .footer-col ul li a:hover { color: rgba(255,255,255,0.85); }
 
  .footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 28px;
    flex-wrap: wrap;
    gap: 12px;
  }
 
  .footer-bottom p { font-size: 0.8rem; color: rgba(255,255,255,0.25); margin: 0; }
 
  .footer-legal { display: flex; gap: 20px; }
  .footer-legal a {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.25);
    text-decoration: none;
    transition: color 0.2s;
  }
  .footer-legal a:hover { color: rgba(255,255,255,0.6); }
 
  @media (max-width: 900px) {
    .footer-top { grid-template-columns: 1fr 1fr; }
  }
  @media (max-width: 560px) {
    .footer-top { grid-template-columns: 1fr; }
    .cta-title { font-size: 2rem; }
  }










@media (min-width: 1120px) and (max-width: 1630px) {
  .hero-full-text, .signup-container {
    margin-left: 5rem;
  }

  .signup-container {
    margin-left: 7rem;
  }

  .hero-message {
    font-size: 3.3rem;
    margin-top: 100px;
  }

  .hero-left {
    max-width: 400px;
  }

  .hero-code-snippet {
    width: 45%;
    max-width: none;
    margin-left: 6.25rem;
    margin-top: 10.5rem;
  }
}



@media (max-width: 1120px) and (min-width: 1070px) {
  .hero-full-text, .signup-container {
    margin-left: 3rem;
  }

  .signup-container {
    margin-left: 4.9rem;
  }

  .hero-message {
    font-size: 3rem;
    margin-top: 100px;
    width: 50vw;
  }

  .hero-left {
    width: 100px;
  }

  .hero-code-snippet {
    width: 50%;
    max-width: none;
    margin-top: 10rem;
    margin-left: 2.25rem;
  }
}


  




@media (max-width: 1070px) and (min-width: 500px) {
  .navbar,
  .buttons {
    display: none;
  }

  .topnav {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    position: relative;
    z-index: 1000;
    width: 100%;
  }




  #myLinks {
    display: flex;
    position: fixed;
    top: 99px;
    left: 0;
    background-color: var(--primary);
    width: 100vw;
    height: 0;
    overflow: hidden;
    overflow-y: auto;
    z-index: 999;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
    border-top: 1px solid white;
    transition: height 0.4s ease;
    display: flex;
    flex-direction: column;
    align-items: left;
    pointer-events: none;
  }



  #myLinks a {
    display: block;
    padding-left: 10px;
    color: var(--text);
    text-decoration: none;
    text-align: left;
    font-size: 1.75rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
  }



#myLinks.show {

  height: calc(100vh - 60px);

  pointer-events: auto;
}


#myLinks.show a {

  opacity: 1;
  transform: translateY(0);
}


.menu-icon {
  width: 30px;
  height: 22px;
  position: relative;
  cursor: pointer;
  display: inline-block;
  padding: 15px;
  color: white;
  margin-right: 30px;
  margin: 10px 30px 0 0;
}

.menu-icon span {
  background-color: white;
  display: block;
  position: absolute;
  height: 4px;
  width: 100%;
  border-radius: 2px;
  opacity: 1;
  left: 0;
  transition: all 0.3s ease;
}

.menu-icon .bar1 {
  top: 0;
}

.menu-icon .bar2 {
  top: 9px;
}

.menu-icon .bar3 {
  top: 18px;
}

.menu-icon.active .bar1 {
  transform: rotate(45deg);
  top: 9px;
}

.menu-icon.active .bar2 {
  opacity: 0;
}

.menu-icon.active .bar3 {
  transform: rotate(-45deg);
  top: 9px;
}

#myLinks.show a:nth-child(1) { transition-delay: 0.1s; }
#myLinks.show a:nth-child(2) { transition-delay: 0.2s; }
#myLinks.show a:nth-child(3) { transition-delay: 0.3s; }



  .topnav-buttons {
    display: flex;
    justify-content: center;
    padding-top: 3.5rem;
    gap: 10px;
    border-top: 1px solid white;
    
  }

  #myLinks > :first-child {
    padding-top: 0.5rem;
  }

  #myLinks > :last-child {
    padding-top: 4rem;
  }

  .landing-page-codemate-logo {
    margin-left: 1em;
  }

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

  .hero-code-left {
    display: flex;
    margin: 0;
    justify-content: center;
    flex-direction: column;
  }

  .hero-full-text, .signup-container {
    margin: 0 0.1rem;
  }

  .signup-container {
    margin-top: 1.5rem;
    margin-left: 1.9rem;
  }

  .hero-code-snippet {
    width: 80%;
    max-width: none;
    margin-top: 70px;
    margin-left: 1.25rem;
    min-height: 400px; 
    max-height: 400px;
  }

  .hero-message {
    font-size: 3rem;
    margin-top: 100px;
    width: 60vw;
  }

  .hero-sub-message {
    width: 60vw;
    max-width: none;
    margin-top: 1rem;
    padding: 0;
  }

  .hero {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-top: 20px;
    padding-left: 0rem;
    padding-right: 2rem;
  }
}


@media (max-width: 560px) and (min-width: 500px) {
  .hero-message {
    width: 80vw;
  }

  .hero-code-snippet {
    width: 95%;
    margin-top: 70px;
    margin-left: 1.25rem;
  }
}


@media (max-width: 500px) {
  

  .landing-page-codemate-logo {
    margin-left: 1em;
  }

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

  .hero-code-left {
    display: flex;
    width: 100%;
    margin: 0;
    justify-content: center;
    flex-direction: column;
  }

  .hero-full-text, .signup-container {
    max-width: 400px;
    margin: 0 0.1rem;
  }

  .signup-container {
    margin-left: 1.9rem;
  }

  .hero-code-snippet {
    width: 100%;
    margin-top: 70px;
    margin-left: 1.25rem;
    max-height: 400px;
    min-height: 400px;
  }

  .hero-message {
    font-size: 2.5rem;
    margin-top: 100px;
    width: 90vw;
  }

  .hero-sub-message {
    width: 100%;
    margin-top: 1rem;
    padding: 0;
  }

  .hero {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-top: 20px;
    padding-left: 0rem;
    padding-right: 2rem;
  }


  .navbar,
  .buttons {
    display: none;
  }

  .topnav {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    position: relative;
    z-index: 1000;
    width: 100%;
  }




  #myLinks {
    display: flex;
    position: fixed;
    top: 99px;
    left: 0;
    background-color: var(--primary);
    width: 100vw;
    height: 0;
    overflow: hidden;
    overflow-y: auto;
    z-index: 999;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
    border-top: 1px solid white;
    transition: height 0.4s ease;
    display: flex;
    flex-direction: column;
    align-items: left;
    pointer-events: none;
  }



  #myLinks a {
    display: block;
    padding-left: 10px;
    color: var(--text);
    text-decoration: none;
    text-align: left;
    font-size: 1.75rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
  }



#myLinks.show {

  height: calc(100vh - 70px);

  pointer-events: auto;
}


#myLinks.show a {

  opacity: 1;
  transform: translateY(0);
}


.menu-icon {
  width: 30px;
  height: 22px;
  position: relative;
  cursor: pointer;
  display: inline-block;
  padding: 15px;
  color: white;
  margin-right: 30px;
  margin: 10px 30px 0 0;
}

.menu-icon span {
  background-color: white;
  display: block;
  position: absolute;
  height: 4px;
  width: 100%;
  border-radius: 2px;
  opacity: 1;
  left: 0;
  transition: all 0.3s ease;
}

.menu-icon .bar1 {
  top: 0;
}

.menu-icon .bar2 {
  top: 9px;
}

.menu-icon .bar3 {
  top: 18px;
}

.menu-icon.active .bar1 {
  transform: rotate(45deg);
  top: 9px;
}

.menu-icon.active .bar2 {
  opacity: 0;
}

.menu-icon.active .bar3 {
  transform: rotate(-45deg);
  top: 9px;
}

#myLinks.show a:nth-child(1) { transition-delay: 0.1s; }
#myLinks.show a:nth-child(2) { transition-delay: 0.2s; }
#myLinks.show a:nth-child(3) { transition-delay: 0.3s; }



  .topnav-buttons {
    display: flex;
    justify-content: center;
    padding-top: 3.5rem;
    gap: 10px;
    border-top: 1px solid white;
    
  }

  #myLinks > :first-child {
    padding-top: 0.5rem;
  }

  #myLinks > :last-child {
    padding-top: 4rem;
  }
}

/* ===== RESPONSIVE ===== */

@media (min-width: 1000px) and (max-width: 1406px) {
  .header {
    padding: 0 2rem;
  }

  .navbar {
    flex-wrap: nowrap;
    white-space: nowrap;
    gap: 15px;
  }
}

@media (max-width: 1000px) {
  .header {
    padding: 0 1rem;
    padding-left: 2rem;
  }

  .navbar {
    flex-wrap: nowrap;
    white-space: nowrap;
    gap: 15px;
  }

  .landing-page-container-codemate-logo {
    flex: 0 0 250px;
    margin-right: 2rem;
  }

  .landing-page-container-codemate-logo a span {
    font-size: 1.5rem !important;
  }

  .landing-page-container-codemate-logo a img {
    height: 48px !important;
    width: 48px !important;
  }
}

@media (max-width: 1070px) {
  .header {
    padding: 0 2rem;
    height: 70px;
  }

  .dropdown {
    right: 2rem;
  }
   .landing-page-container-codemate-logo a span {
    font-size: 1.6rem !important;
  }
}

@media (max-width: 900px) {
  .landing-page-container-codemate-logo {
    margin-right: 0.5rem;
  }
  .header {
    height: 70px;
  }
  
 
}

@media (max-width: 850px) {
  .header {
    padding: 0 1.2rem;
    height: 70px;
  }

  .landing-page-container-codemate-logo {
    flex: 1
  }

  .navbar {
    display: none;
  }

  .header-profile {
    flex: 0;
    margin-right: 1rem;
  }

  .topnav {
    display: flex;
  }

  #myLinks {
    top: 70px;
  }

  .dropdown {
    right: 1rem;
    top: 60px;
  }

  .course-header {
    margin-bottom: 3rem;
  }

  .course-heading {
    font-size: 2.2rem;
    padding-top: 5rem;
  }

  .course-subtitle {
    font-size: 1rem;
    padding: 0 1rem;
  }

  .languages-heading,
  .ai-courses-heading {
    padding-left: 1rem;
    font-size: 1.6rem;
  }

  .languages,
  .ai-courses {
    padding: 0 1rem;
    gap: 16px;
  }

  .languages > a,
  .ai-courses > a {
    flex: 1 1 100%;
    height: auto;
    min-height: 200px;
  }
}

@media (max-width: 480px) {
  .header {
    padding: 0 1rem;
  }

  .course-heading {
    font-size: 1.8rem;
  }

  .languages > a,
  .ai-courses > a {
    padding: 1.5rem;
  }
}

/* ===== HAMBURGER DROPDOWN ===== */
#myLinks {
  display: none;
  position: fixed;
  padding-top: 0.5rem;
  top: 70px;
  left: 0;
  width: 100%;
  background: #1E1E2F;
  z-index: 998;
  flex-direction: column;
  border-top: 1px solid rgba(255,255,255,0.1);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

#myLinks.show { display: flex; }

#myLinks > a {
  padding: 1rem 2rem;
  color: white;
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  transition: background 0.2s;
  opacity: 1;
  transform: none;
}

#myLinks > a:hover { background: rgba(255,255,255,0.05); }

.topnav-buttons {
  display: flex;
  padding: 1.25rem 2rem 1.5rem;
  gap: 12px;
}

.topnav-buttons a {
  text-decoration: none;
  flex: 1;
}

.topnav-buttons .login-button {
  display: block;
  width: 100%;
  padding: 0.7rem 1rem;
  background: transparent;
  color: white;
  border: 1.5px solid rgba(255,255,255,0.35);
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  transition: background 0.2s;
  top: 0;
}

.topnav-buttons .login-button:hover { background: rgba(255,255,255,0.08); }

.topnav-buttons .signup-button {
  display: block;
  width: 100%;
  padding: 0.7rem 1rem;
  background: #e04a4a;
  color: white;
  border: 2px solid #e04a4a;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: background 0.2s;
}

.topnav-buttons .signup-button:hover { background: #c84040; }


/* ===== LARGE DESKTOP 1120–1630px ===== */
@media (min-width: 1120px) and (max-width: 1630px) {
  .hero-full-text { margin-left: 5rem; }
  .signup-container { margin-left: 7rem; }
  .hero-message { font-size: 3.3rem; margin-top: 100px; }
  .hero-left { max-width: 400px; }
  .hero-code-snippet { width: 45%; max-width: none; margin-left: 6.25rem; margin-top: 10.5rem; }
}

/* ===== 1070–1120px ===== */
@media (max-width: 1120px) and (min-width: 1070px) {
  .hero-full-text { margin-left: 3rem; }
  .signup-container { margin-left: 4.9rem; }
  .hero-message { font-size: 3rem; margin-top: 100px; width: 50vw; }
  .hero-left { width: 100px; }
  .hero-code-snippet { width: 50%; max-width: none; margin-top: 10rem; margin-left: 2.25rem; }
}

/* ===== TABLET — hamburger kicks in ===== */
@media (max-width: 1070px) {
  .navbar { display: none; }
  .buttons { display: none; }
  .topnav { display: flex; }

  .header { padding: 0 1.5rem; }

  .hero { display: flex; flex-direction: column; min-height: 100vh; padding-top: 20px; padding-left: 0; padding-right: 2rem; }
  .hero-code-left { display: flex; margin: 0; justify-content: center; flex-direction: column; }
  .hero-full-text, .signup-container { margin: 0 0.1rem; }
  .signup-container { margin-top: 1.5rem; margin-left: 1.9rem; }
  .hero-message { font-size: 3rem; margin-top: 100px; width: 60vw; }
  .hero-sub-message { width: 60vw; max-width: none; margin-top: 1rem; padding: 0; }
  .hero-code-snippet { width: 80%; max-width: none; margin-top: 70px; margin-left: 1.25rem; min-height: 400px; max-height: 400px; }
}

/* ===== 500–560px ===== */
@media (max-width: 560px) and (min-width: 500px) {
  .hero-message { width: 80vw; }
  .hero-code-snippet { width: 95%; margin-top: 70px; margin-left: 1.25rem; }
}

/* ===== MOBILE ===== */
@media (max-width: 500px) {
  .header { display: flex; justify-content: space-between; align-items: center; padding: 0 1.25rem; padding-right: 0.1rem; }
  .hero-code-left { display: flex; width: 100%; margin: 0; justify-content: center; flex-direction: column; }
  .hero-full-text, .signup-container { max-width: 400px; margin: 0 0.1rem; }
  .signup-container { margin-left: 1.9rem; }
  .hero-message { font-size: 2.5rem; margin-top: 100px; width: 90vw; }
  .hero-sub-message { width: 100%; margin-top: 1rem; padding: 0; }
  .hero { display: flex; flex-direction: column; min-height: 100vh; padding-top: 20px; padding-left: 0; padding-right: 2rem; }
  .hero-code-snippet { width: 100%; margin-top: 70px; margin-left: 1.25rem; max-height: 400px; min-height: 400px; }
  .navbar { display: none; }
  .buttons { display: none; }
  .topnav { display: flex; }
}

/* ===== FOOTER ===== */
@media (max-width: 900px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer-top { grid-template-columns: 1fr; }
  .cta-title { font-size: 2rem; }
}

/* ============================================================
   MOBILE RESPONSIVE — Hero, Courses, Demo, About, CTA, Footer
   ============================================================ */

@media (max-width: 768px) {

  /* ── Hero ── */
  .hero {
    flex-direction: column;
    padding: 0 1.25rem 3rem 1.25rem;
    min-height: auto;
    align-items: center;
    text-align: center;
  }

  .hero-code-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
  }

  .hero-full-text {
    margin: 0;
    padding: 0;
    max-width: 100%;
    text-align: center;
  }

  .hero-message {
    font-size: 2.2rem;
    margin-top: 110px;
    line-height: 1.2;
    width: 100%;
  }

  .hero-sub-message {
    font-size: 1rem;
    max-width: 100%;
    width: 100%;
    margin-top: 1rem;
    padding: 0;
  }

  .signup-container {
    margin: 1.5rem auto 0 auto;
    max-width: 100%;
    width: 100%;
    padding: 0 1rem 1.5rem 1rem;
    box-sizing: border-box;
    white-space: normal;
    text-align: center;
  }

  .google-button {
    width: 100%;
  }

  .signup-container button {
    width: 100%;
    padding: 0.75rem;
  }

  /* ── Code snippet: sits below the signup block on mobile ── */
  .hero-code-snippet {
    width: 100%;
    max-width: 100%;
    margin: 2rem 0 0 0;
    box-sizing: border-box;
  }

  /* ── Courses Section ── */
  .courses-section {
    padding: 0 1rem 3rem 1rem;
  }

  .courses-message {
    font-size: 2.2rem;
    margin: 50px auto 20px auto;
  }

  .courses-sub-message {
    font-size: 0.95rem;
    padding-bottom: 2rem;
  }

  .courses {
    gap: 16px;
  }

  .courses > a {
    flex: 1 1 100%;
    height: auto;
    min-height: 200px;
    padding: 1.5rem;
  }

  /* ── Demo Section ── */
  .demo-section {
    padding: 4rem 1.25rem;
  }

  .demo-inner {
    flex-direction: column;
    gap: 2.5rem;
  }

  .demo-text {
    flex: none;
    max-width: 100%;
    text-align: center;
  }

  .demo-heading {
    font-size: 2.2rem;
  }

  .demo-sub {
    font-size: 0.95rem;
  }

  .demo-features {
    flex-direction: column;
    gap: 1.25rem;
    align-items: flex-start;
    text-align: left;
  }

  .demo-feature {
    flex: none;
    width: 100%;
  }

  /* ── About Section ── */
  .about-section {
    padding: 0 1rem 3rem 1rem;
  }

  .about-message {
    font-size: 2.2rem;
    margin: 50px auto 20px auto;
  }

  .about-boxes {
    padding: 1rem 0;
    gap: 16px;
  }

  .about-box {
    flex: 1 1 100%;
    height: auto;
    min-height: auto;
    padding: 1.5rem;
  }

  /* ── CTA Section ── */
  .cta-wrap {
    padding: 60px 1.25rem 70px;
  }

  .cta-title {
    font-size: 2rem;
  }

  .cta-sub {
    font-size: 0.95rem;
  }

  .cta-actions {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  .cta-btn-primary,
  .cta-btn-secondary {
    width: 100%;
    max-width: 320px;
    text-align: center;
  }

  /* ── Footer ── */
  .footer-top {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .footer-legal {
    flex-wrap: wrap;
    gap: 12px;
  }
}

/* Slightly wider phones — 2-col course cards */
@media (min-width: 480px) and (max-width: 768px) {
  .courses > a {
    flex: 1 1 calc(50% - 8px);
  }

  .about-box {
    flex: 1 1 calc(50% - 8px);
  }
}

/* ── Kill the white gap between hero and courses ── */
.hero {
  padding-bottom: 0;
}

.hero-code-snippet {
  margin-bottom: 0;
}

.courses-section {
  margin-top: 0;
  padding-top: 0.3rem;
}

/* ── Demo window: shrink to show full UI like Codecademy ── */
.demo-window-wrap {
  width: 100%;
  overflow: hidden;
}

.demo-scale-container {
  width: 100%;
  overflow: hidden;
  border-radius: 10px;
}

/* Force the inner 1200px UI to fit the screen width */
.demo-lesson-ui {
  transform-origin: top left;
  /* JS scaleDemo() handles this — but we set a fallback */
  transform: scale(0.28);
  width: 1200px;
}

.demo-section {
  margin-bottom: -3.1rem;
}

.about-section {
  padding-top: 0.2rem;
}

@media (max-width: 1070px) and (min-width: 769px) {
  .courses-message,
  .about-message {
    font-size: 2.6rem;
  }

  .demo-heading {
    font-size: 2.6rem;
  }

  .courses-sub-message {
    font-size: 1rem;
  }

  .demo-sub {
    font-size: 0.9rem;
  }
}

@media (max-width: 900px) and (min-width: 769px) {
  .courses-message,
  .about-message {
    font-size: 2.2rem;
    margin: 40px auto 16px auto;
  }

  .demo-heading {
    font-size: 2.2rem;
  }

  .courses-sub-message {
    font-size: 0.95rem;
    padding-bottom: 1.5rem;
  }

  .courses > a {
    flex: 1 1 calc(50% - 15px);
    height: auto;
    min-height: 200px;
  }

  .about-box {
    flex: 1 1 calc(50% - 15px);
    height: auto;
  }
}

@media (max-width: 1070px) and (min-width: 769px) {
  .courses {
    padding: 0 1.5rem;
  }

  .about-boxes {
    padding: 1rem 1.5rem;
  }
}

@media (min-width: 480px) and (max-width: 717px) {
  .courses > a {
    flex: 1 1 100%;
  }

  .about-box {
    flex: 1 1 100%;
  }
}

@media (max-width: 400px) {
  .hero-message {
    font-size: 1.9rem;
  }

  .signup-container {
    margin-left: 0.5rem;
    margin-right: 0.5rem;
    padding: 0 0.75rem 1.25rem 0.75rem;
  }

  .signup-message {
    font-size: 1rem;
  }

  .google-button {
    font-size: 0.9rem;
    padding: 12px 10px;
  }

  .divider::before,
  .divider::after {
    width: 30%;
  }

  .hero-code-snippet {
    margin-left: 0.5rem;
    width: calc(100% - 1rem);
  }
}

.divider {
  white-space: nowrap;
}

