:root {
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --secondary: #f59e0b;
  --dark: #1e293b;
  --light: #f8fafc;
  --gray-light: #e2e8f0;
  --gray: #94a3b8;
  --success: #10b981;
  --error: #ef4444;
  --radius: 8px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
}

body {
  background-color: var(--light);
  color: var(--dark);
  line-height: 1.6;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header styles */
header {
  background-color: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  font-weight: 700;
  font-size: 24px;
  color: var(--primary);
  text-decoration: none;
}

.logo svg {
  margin-right: 8px;
}

.nav-links {
  display: flex;
  gap: 24px;
}

.nav-links a {
  text-decoration: none;
  color: var(--dark);
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--primary);
}

.cta-button {
  background-color: var(--primary);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
  text-decoration: none;
  display: inline-block;
}

.cta-button:hover {
  background-color: var(--primary-dark);
}

/* Hero section */
.hero {
  padding: 80px 0;
  background-color: white;
  background-image: radial-gradient(black 0.5px, transparent 0.1px);
  background-size: 20px 20px;
  color: black;
  position: relative;
  overflow: hidden;
}


.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='rgba(255,255,255,0.05)' fill-rule='evenodd'/%3E%3C/svg%3E");
  opacity: 0.2;
}

.hero-content {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: 48px;
  font-weight: 800;
  margin-bottom: 20px;
  line-height: 1.2;
}

.hero p {
  font-size: 20px;
  margin-bottom: 40px;
  opacity: 0.9;
}

/* URL Shortener Form */
.url-form {
  background-color: white;
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  margin-top: 20px;
}

.input-group {
  display: flex;
  margin-bottom: 16px;
  position: relative;
}

.input-group input {
  flex: 1;
  padding: 14px 16px;
  border: 2px solid var(--gray-light);
  border-radius: var(--radius);
  font-size: 16px;
  transition: border 0.2s;
}

.input-group input:focus {
  outline: none;
  border-color: var(--primary);
}

.input-group button {
  margin-left: 8px;
  padding: 0 24px;
  background-color: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
}

.input-group button:hover {
  background-color: var(--primary-dark);
}

.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}

.custom-alias-toggle {
  display: flex;
  align-items: center;
  cursor: pointer;
  color: var(--primary);
  font-weight: 500;
  font-size: 14px;
}

.custom-alias-toggle svg {
  margin-left: 4px;
  transition: transform 0.2s;
}

.custom-alias-toggle.active svg {
  transform: rotate(180deg);
}

.custom-alias-input {
  margin-top: 16px;
  display: none;
}

.custom-alias-input.active {
  display: block;
}

/* Result styles */
.result-container {
  margin-top: 24px;
  display: none;
}

.result-container.active {
  display: block;
}

.result-box {
  background-color: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}

.result-url {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.short-url {
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
}

.copy-button {
  background-color: transparent;
  border: none;
  color: var(--gray);
  cursor: pointer;
  display: flex;
  align-items: center;
  font-size: 14px;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.copy-button:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.copy-button svg {
  margin-right: 4px;
}

.original-url {
  font-size: 14px;
  color: var(--gray);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analysis-link {
  display: flex;
  align-items: center;
  color: var(--primary);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  margin-top: 8px;
}

.analysis-link svg {
  margin-right: 4px;
}

/* Features section */
.features {
  padding: 80px 0;
  background-color: white;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-header h2 {
  font-size: 36px;
  font-weight: 800;
  margin-bottom: 16px;
  color: var(--dark);
}

.section-header p {
  font-size: 18px;
  color: var(--gray);
  max-width: 600px;
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.feature-card {
  background-color: white;
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: rgba(79, 70, 229, 0.1);
  color: var(--primary);
  margin-bottom: 24px;
}

.feature-card h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
}

.feature-card p {
  color: var(--gray);
  font-size: 16px;
}

/* Recent Links section */
.recent-links {
  padding: 60px 0;
  background-color: #f8fafc;
}

.recent-links-container {
  background-color: white;
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.recent-links-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.recent-links-header h3 {
  font-size: 24px;
  font-weight: 700;
}

.links-table {
  width: 100%;
  border-collapse: collapse;
}

.links-table th {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 2px solid var(--gray-light);
  color: var(--gray);
  font-weight: 600;
}

.links-table td {
  padding: 16px;
  border-bottom: 1px solid var(--gray-light);
}

.links-table tr:last-child td {
  border-bottom: none;
}

.shortened-link {
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
}

.table-actions {
  display: flex;
  gap: 8px;
}

.table-actions button {
  background-color: transparent;
  border: none;
  color: var(--gray);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.table-actions button:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

/* How It Works section */
.how-it-works {
  padding: 80px 0;
  background-color: white;
}

.steps {
  display: flex;
  justify-content: space-between;
  margin-top: 60px;
}

.step {
  text-align: center;
  max-width: 280px;
  position: relative;
}

.step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 40px;
  right: -40px;
  width: 80px;
  height: 2px;
  background-color: var(--gray-light);
}

.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background-color: rgba(79, 70, 229, 0.1);
  color: var(--primary);
  font-size: 24px;
  font-weight: 700;
  margin: 0 auto 24px;
}

.step h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
}

.step p {
  color: var(--gray);
}

/* CTA section */
.cta-section {
  padding: 80px 0;
  background: linear-gradient(135deg, #4f46e5 0%, #7e22ce 100%);
  color: white;
  text-align: center;
}

.cta-section h2 {
  font-size: 36px;
  font-weight: 800;
  margin-bottom: 20px;
}

.cta-section p {
  font-size: 18px;
  margin-bottom: 32px;
  opacity: 0.9;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.secondary-button {
  background-color: white;
  color: var(--primary);
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
  text-decoration: none;
}

.secondary-button:hover {
  background-color: #f1f5f9;
}

/* Footer */
footer {
  background-color: var(--dark);
  color: white;
  padding: 60px 0 30px;
}

.footer-content {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-logo {
  display: flex;
  align-items: center;
  font-weight: 700;
  font-size: 24px;
  color: white;
  margin-bottom: 16px;
  text-decoration: none;
}

.footer-logo svg {
  margin-right: 8px;
}

.footer-description {
  color: var(--gray);
  margin-bottom: 24px;
}

.social-links {
  display: flex;
  gap: 16px;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
  transition: background-color 0.2s;
}

.social-link:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.footer-column h4 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 20px;
  color: white;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: var(--gray);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--gray);
  font-size: 14px;
}

.footer-bottom-links {
  display: flex;
  gap: 24px;
}

.footer-bottom-links a {
  color: var(--gray);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-bottom-links a:hover {
  color: white;
}

/* Responsive styles */
@media (max-width: 992px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .steps {
    flex-direction: column;
    align-items: center;
    gap: 40px;
  }

  .step {
    max-width: 100%;
  }

  .step:not(:last-child)::after {
    display: none;
  }

  .footer-content {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 36px;
  }

  .hero p {
    font-size: 18px;
  }

  .input-group {
    flex-direction: column;
  }

  .input-group button {
    margin-left: 0;
    margin-top: 12px;
    width: 100%;
    padding: 14px;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .footer-bottom-links {
    justify-content: center;
  }
}

@media (max-width: 576px) {
  .nav-links {
    display: none;
  }

  .hero {
    padding: 60px 0;
  }

  .section-header h2 {
    font-size: 28px;
  }

  .url-form {
    padding: 24px;
  }
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

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

.fade-in {
  animation: fadeIn 0.5s ease-out forwards;
}

/* Utility classes */
.error-message {
  color: var(--error);
  font-size: 14px;
  margin-top: 8px;
}

.success-message {
  display: flex;
  align-items: center;
  color: var(--success);
  font-size: 14px;
  margin-top: 8px;
}

.success-message svg {
  margin-right: 4px;
}
