/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --secondary: #8b5cf6;
  --accent: #ec4899;
  --success: #10b981;
  --background: #ffffff;
  --surface: #f9fafb;
  --text: #111827;
  --text-secondary: #6b7280;
  --border: #e5e7eb;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

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

html {
  scroll-behavior: smooth;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  z-index: 1000;
  padding: 16px 0;
}

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

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

.logo-img {
  height: 40px;
  width: auto;
}

.logo-icon {
  font-size: 28px;
}

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

.nav-links {
  display: flex;
  list-style: none;
  gap: 32px;
}

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

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

/* Hero Section */
.hero {
  margin-top: 80px;
  padding: 80px 0;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 50%, #fce7f3 100%);
  position: relative;
  overflow: hidden;
}

.hero-container {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-title {
  font-size: 56px;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 24px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 50%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 20px;
  color: var(--text-secondary);
  margin-bottom: 32px;
  line-height: 1.6;
}

.hero-cta {
  display: flex;
  gap: 16px;
  margin-bottom: 48px;
}

.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background: white;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-secondary:hover {
  background: var(--primary);
  color: white;
}

.btn-lg {
  padding: 16px 32px;
  font-size: 18px;
}

.btn-block {
  width: 100%;
}

.hero-stats {
  display: flex;
  gap: 48px;
}

.stat {
  text-align: center;
}

.stat-number {
  font-size: 32px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 4px;
}

.stat-label {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
}

.hero-visual {
  position: relative;
}

.floating-card {
  background: white;
  padding: 24px;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
}

.mini-widget {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  color: var(--text);
}

.pulse-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--success);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.1); }
}

/* Features Section */
.features {
  padding: 100px 0;
  background: white;
}

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

.section-header h2 {
  font-size: 42px;
  font-weight: 800;
  margin-bottom: 16px;
}

.section-header p {
  font-size: 18px;
  color: var(--text-secondary);
}

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

.feature-card {
  padding: 32px;
  background: var(--surface);
  border-radius: 12px;
  border: 1px solid var(--border);
  transition: all 0.3s;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.feature-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

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

.feature-card p {
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Get Started Section */
.get-started {
  padding: 100px 0;
  background: var(--surface);
}

.registration-container {
  max-width: 700px;
  margin: 0 auto;
}

.registration-form {
  background: white;
  padding: 40px;
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.2s;
}

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

.tracking-result {
  background: white;
  padding: 40px;
  border-radius: 16px;
  box-shadow: var(--shadow);
  margin-top: 24px;
}

.result-success {
  text-align: center;
  margin-bottom: 32px;
}

.success-icon {
  width: 64px;
  height: 64px;
  background: var(--success);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 800;
  margin: 0 auto 16px;
}

.result-success h3 {
  font-size: 24px;
  margin-bottom: 8px;
}

.result-url {
  color: var(--text-secondary);
  font-size: 14px;
}

.result-url span {
  color: var(--primary);
  font-weight: 600;
}

.code-section {
  margin-bottom: 32px;
}

.code-section h4 {
  font-size: 18px;
  margin-bottom: 12px;
}

.code-block {
  position: relative;
  background: #1e293b;
  color: #e2e8f0;
  padding: 20px;
  border-radius: 8px;
  overflow-x: auto;
}

.code-block pre {
  margin: 0;
  font-family: 'Monaco', 'Courier New', monospace;
  font-size: 14px;
  line-height: 1.5;
}

.copy-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--primary);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.copy-btn:hover {
  background: var(--primary-dark);
}

.next-steps h4 {
  font-size: 18px;
  margin-bottom: 16px;
}

.next-steps ol {
  padding-left: 24px;
  line-height: 2;
  color: var(--text-secondary);
}

.next-steps code {
  background: var(--surface);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
  color: var(--primary);
  font-size: 14px;
}

.next-steps a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.next-steps a:hover {
  text-decoration: underline;
}

/* Demo Section */
.demo-section {
  padding: 100px 0;
  background: white;
}

.demo-container {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 32px;
}

.demo-map {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.demo-sidebar {
  background: var(--surface);
  border-radius: 12px;
  padding: 24px;
  max-height: 500px;
  overflow-y: auto;
}

.visitor-list h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
}

.visitors {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.visitor-item {
  background: white;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  animation: slideIn 0.28s ease-out;
}

/* Compact visitor card */
.visitor-item.compact {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px;
}

/* Allow height/margin transitions for smooth slide-down */
.visitor-item {
  transition: height 260ms cubic-bezier(.2,.9,.2,1), margin-top 260ms cubic-bezier(.2,.9,.2,1), opacity 220ms;
}

.visitor-flag {
  font-size: 20px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.visitor-text {
  flex: 1 1 auto;
  min-width: 0;
}

.visitor-line {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.visitor-meta {
  margin-top: 4px;
}

.visitor-time {
  font-size: 12px;
  color: var(--text-secondary);
}

.visitor-url {
  font-size: 12px;
  color: var(--text-secondary);
  margin-right: 8px;
  display: inline-block;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.visitor-url:hover {
  color: var(--primary);
  text-decoration: underline;
}

.browser {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  font-weight: 600;
}

.browser-icon {
  font-size: 14px;
}

.browser-icon svg { display: block; }

/* Slide-down animation to push items below while new one appears */
@keyframes slideDown {
  0% { transform: translateY(-8px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

.visitor-item.compact { animation: slideDown 260ms cubic-bezier(.2,.9,.2,1); }

/* New item highlight */
.visitor-item.new {
  background: linear-gradient(90deg, rgba(99,102,241,0.08), rgba(99,102,241,0.03));
  box-shadow: 0 6px 18px rgba(99,102,241,0.06);
  transition: background 1.6s ease, box-shadow 1.6s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.visitor-location {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  margin-bottom: 4px;
}

.visitor-location .flag {
  font-size: 18px;
}

.visitor-details {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.visitor-time {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
  margin-top: 8px;
}

/* Footer */
.footer {
  background: #1e293b;
  color: #e2e8f0;
  padding: 60px 0 24px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-section h4 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
}

.footer-section p {
  color: #94a3b8;
  font-size: 14px;
  line-height: 1.6;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 8px;
}

.footer-section ul li a {
  color: #94a3b8;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}

.footer-section ul li a:hover {
  color: white;
}

.footer-bottom {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid #334155;
}

.footer-bottom p {
  color: #64748b;
  font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
  .hero-container {
    grid-template-columns: 1fr;
  }
  
  .hero-title {
    font-size: 36px;
  }
  
  .hero-cta {
    flex-direction: column;
  }
  
  .demo-container {
    grid-template-columns: 1fr;
  }
  
  .nav-links {
    display: none;
  }
}

/* Utility Classes */
.text-center {
  text-align: center;
}

.mt-4 {
  margin-top: 32px;
}

.mb-4 {
  margin-bottom: 32px;
}
