:root {
  --primary-color: #2563eb;
  --primary-hover: #1d4ed8;
  --success-color: #059669;
  --text-color: #1f2937;
  --bg-color: #ffffff;
  --secondary-bg: #f8fafc;
  --border-color: #e5e7eb;
  --code-bg: #1f2937;
  --code-color: #f3f4f6;
  --gradient-start: #2563eb;
  --gradient-end: #7c3aed;
  --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --transition-speed: 0.2s;
}

/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background: var(--bg-color);
  overflow-x: hidden;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary-color);
  color: white;
  padding: 8px;
  z-index: 100;
  transition: top var(--transition-speed);
}

.skip-link:focus {
  top: 0;
}

/* Header styles */
header {
  text-align: center;
  padding: 4rem 0;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(124, 58, 237, 0.1));
  margin-bottom: 4rem;
  position: relative;
  overflow: hidden;
}

header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at center, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0) 70%);
  pointer-events: none;
}

h1 {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  line-height: 1.2;
  position: relative;
  display: inline-block;
  animation: fadeIn 1s ease-out;
}

.subtitle {
  font-size: 1.25rem;
  color: #4b5563;
  max-width: 600px;
  margin: 0 auto;
  animation: slideUp 0.8s ease-out 0.2s both;
}

/* Enhanced section styles */
section {
  margin: 8rem 0;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s ease-out forwards;
  position: relative;
  padding: 2rem;
  border-radius: 1.5rem;
  background: linear-gradient(to right, rgba(37, 99, 235, 0.03), rgba(124, 58, 237, 0.03));
}

section:nth-child(even) {
  background: linear-gradient(to left, rgba(37, 99, 235, 0.03), rgba(124, 58, 237, 0.03));
}

section::before {
  content: '';
  position: absolute;
  left: -2rem;
  top: 50%;
  width: 4px;
  height: 40%;
  background: linear-gradient(to bottom, var(--gradient-start), var(--gradient-end));
  transform: translateY(-50%);
  border-radius: 2px;
}

/* Enhanced heading styles */
section h2 {
  font-size: 2.5rem;
  color: var(--text-color);
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

section h2 .gradient-text {
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

section h3 {
  font-size: 1.5rem;
  color: var(--primary-color);
  margin: 2.5rem 0 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

section h3::before {
  content: '→';
  color: var(--primary-color);
  font-weight: bold;
}

/* Enhanced card styles */
.example-card {
  background: var(--bg-color);
  border-radius: 1.5rem;
  padding: 2.5rem;
  margin: 3rem 0;
  box-shadow: var(--card-shadow);
  transition: all var(--transition-speed);
  border: 1px solid var(--border-color);
  overflow: hidden;
  position: relative;
}

.example-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(to right, var(--gradient-start), var(--gradient-end));
  opacity: 0;
  transition: opacity var(--transition-speed);
}

.example-card:hover::after {
  opacity: 1;
}

/* Enhanced URL box styles */
.url-box {
  background: var(--secondary-bg);
  border-radius: 1rem;
  padding: 1.75rem;
  margin: 1.5rem 0;
  border: 1px solid var(--border-color);
  transition: all var(--transition-speed);
  position: relative;
  overflow: hidden;
}

.url-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(124, 58, 237, 0.1));
  opacity: 0;
  transition: opacity var(--transition-speed);
  z-index: 0;
}

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

.url-input {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 1.25rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.875rem;
  line-height: 1.5;
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  background: var(--bg-color);
  color: var(--text-color);
  margin-bottom: 0.75rem;
  resize: none;
  transition: all var(--transition-speed);
}

/* Enhanced navigation styles */
nav {
  margin: 6rem 0;
  padding: 2rem;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.05), rgba(124, 58, 237, 0.05));
  border-radius: 1.5rem;
}

nav h2 {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 2rem;
  color: var(--text-color);
}

nav h2 .gradient-text {
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

nav ul {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  justify-content: center;
  padding: 0 1rem;
}

nav a {
  color: var(--text-color);
  text-decoration: none;
  padding: 1rem 1.5rem;
  border-radius: 1rem;
  background: var(--bg-color);
  transition: all var(--transition-speed);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  font-weight: 500;
  height: 100%;
}

nav a:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 10px 20px -10px rgba(37, 99, 235, 0.3);
}

/* Enhanced fun fact styles */
.fun-fact {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(124, 58, 237, 0.1));
  border-left: 4px solid var(--primary-color);
  padding: 2rem;
  margin: 3rem 0;
  border-radius: 0 1.5rem 1.5rem 0;
  position: relative;
  overflow: hidden;
}

.fun-fact::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at top right, rgba(255,255,255,0.8), transparent);
  opacity: 0;
  transition: opacity var(--transition-speed);
}

.fun-fact:hover::before {
  opacity: 1;
}

/* Enhanced copy button styles */
.copy-btn {
  position: relative;
  z-index: 1;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  color: white;
  border: none;
  border-radius: 0.75rem;
  padding: 1rem 2rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition-speed);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.875rem;
  min-width: 160px;
  height: 48px;
  white-space: nowrap;
}

.copy-btn:hover {
  background: var(--primary-hover);
  box-shadow: 0 10px 20px -10px rgba(37, 99, 235, 0.3);
}

.copy-btn.copied {
  background: var(--success-color);
}

/* Image styles */
.example-image {
  height: auto;
  width: 62%;
  display: block;
  margin: 2rem auto;
  box-shadow: var(--card-shadow);
  transition: transform var(--transition-speed);
}

.example-image:hover {
  transform: scale(1.02);
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

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

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.005); }
  100% { transform: scale(1); }
}

/* Emoji styles */
.emoji {
  display: inline-block;
  transform: translateY(-1px);
  margin-right: 0.3em;
}

/* Responsive styles */
@media (min-width: 768px) {
  .url-box {
      display: flex;
      align-items: center;
      gap: 1rem;
  }

  .url-input {
      margin-bottom: 0;
  }

  .copy-btn {
      width: auto;
  }
}

@media (max-width: 768px) {
  .container {
      padding: 10px;
  }

  h1 {
      font-size: 2.5rem;
  }

  section {
      margin: 2rem 0;
      padding: 10px;
  }

  .example-card {
      padding: 10px;
      margin: 1rem 0;
  }

  .example-image {
      width: 100%;
  }

  .layout-demo {
      padding: 10px;
      gap: 10px;
      display: flex;
      flex-direction: column;
  }
  
  .layout-row {
      display: flex;
      flex-direction: column;
      gap: 10px;
  }
  
  /* Make visible elements full width */
  .layout-hero,
  .layout-feature {
      width: 100%;
  }
  
  /* Hide everything after first two features */
  .layout-feature:nth-child(n+3),
  .layout-content,
  .layout-main,
  .layout-sidebar {
      display: none;
  }

  .url-box {
      padding: 10px;
      margin: 1rem 0;
  }

  .fun-fact {
      padding: 10px;
      margin: 1rem 0;
  }

  nav {
      padding: 10px;
      margin: 2rem 0;
  }

  #faq {
      padding: 10px;
      margin: 2rem 0;
  }

  header {
      padding: 2rem 10px;
  }

  footer {
      padding: 2rem 10px;
  }
}

/* Hero section styles */
.hero {
  min-height: auto;
  padding: 4rem 1rem;
  display: flex;
  align-items: flex-start;
  width: 100%;
  background: linear-gradient(180deg, #e0f2ff 0%, #f0f9ff 100%),
              radial-gradient(circle at center, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0) 70%);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-content {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.hero h1 {
  font-size: 4rem;
  font-weight: 900;
  color: #0f172a;
  margin-bottom: 1rem;
  text-shadow: none;
}

.hero p {
  font-size: 1.5rem;
  color: #1f2937;
  max-width: 600px;
  margin: 0 auto 2rem;
  text-shadow: none;
}

.hero .cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.hero .cta-buttons a {
  background: #1e40af;
  color: white;
  padding: 1rem 2rem;
  border-radius: 0.5rem;
  text-decoration: none;
  font-weight: 600;
  transition: all var(--transition-speed);
}

.hero .cta-buttons a:hover {
  background: #1e3a8a;
  transform: translateY(-2px);
}

/* Remove the overlay */
.hero::before {
  display: none;
}

/* Adjusted color contrast for WCAG 2.2 AAA */
.hero h1 {
  color: #0f172a;
}

.hero p {
  color: #334155;
}

.hero .cta-buttons a {
  background: #1e40af;
  color: white;
}

.hero .cta-buttons a:hover {
  background: #1e3a8a;
}

/* Footer styles */
footer {
  text-align: center;
  padding: 4rem 0;
  margin-top: 6rem;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.05), rgba(124, 58, 237, 0.05));
  border-radius: 1.5rem;
}

.made-in {
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--text-color);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.made-in::before,
.made-in::after {
  content: '—';
  color: var(--primary-color);
  opacity: 0.5;
}

.copyright {
  font-size: 0.875rem;
  color: #6b7280;
}

/* FAQ styles */
#faq {
  margin: 8rem 0;
  padding: 3rem;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.03), rgba(124, 58, 237, 0.03));
  border-radius: 1.5rem;
}

#faq h2 {
  font-size: 2.5rem;
  color: var(--text-color);
  margin-bottom: 3rem;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

#faq h2 .gradient-text {
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

#faq dl {
  max-width: 800px;
  margin: 0 auto;
}

#faq dt {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-color);
  margin-top: 2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

#faq dt::before {
  content: '→';
  color: var(--primary-color);
  font-weight: bold;
}

#faq dd {
  margin: 0.5rem 0 2rem 1.5rem;
  color: #4b5563;
  line-height: 1.7;
}

#faq dd:last-child {
  margin-bottom: 0;
}

.layout-demo {
    background: #f5f5f5;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    display: grid;
    grid-gap: 20px;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
}

/* First row - Hero */
.layout-hero {
    width: 100%;
    background: #4a90e2;
    object-fit: cover;
}

/* Second row - Features */
.layout-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    width: 100%;
}

.layout-feature {
    width: 100%;
    object-fit: cover;
}

.layout-feature:nth-child(1) { background: #50e3c2; }
.layout-feature:nth-child(2) { background: #f5a623; }
.layout-feature:nth-child(3) { background: #d0021b; }

/* Third row - Main content and sidebar */
.layout-content {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 20px;
    width: 100%;
}

.layout-main { 
    width: 100%;
    background: #7ed321;
    object-fit: cover;
}

.layout-sidebar {
    width: 100%;
    background: #9013fe;
    object-fit: cover;
}

.hero-example {
    margin-top: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.url-box.compact {
    margin-bottom: 1.5rem;
}

.hero-image {
    width: 100%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}