:root {
  --primary-gradient: linear-gradient(135deg, #2563eb 0%, #0ea5e9 50%, #2563eb 100%);
  --secondary-gradient: linear-gradient(135deg, #1e3a8a 0%, #0ea5e9 100%);
  --accent-color: #2563eb;
  --text-primary: #2d3748;
  --text-secondary: #4a5568;
  --text-muted: #718096;
  --bg-primary: #ffffff;
  --bg-secondary: #f7fafc;
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.15);
  --border-radius: 16px;
  --border-radius-lg: 24px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--primary-gradient);
  min-height: 100vh;
  color: var(--text-primary);
  line-height: 1.6;
}

/* Header Styles */
.header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0 20px;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  position: relative;
}

.logo {
  font-size: 1.8rem;
  font-weight: 800;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 32px;
  align-items: center;
}

.nav-item a {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
}

.nav-item a:hover {
  color: var(--accent-color);
}

.nav-item a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-gradient);
  transition: width 0.3s ease;
}

.nav-item a:hover::after {
  width: 100%;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-primary);
}

/* Hero Section */
.hero {
  padding: 90px 12px 0;
  text-align: center;
  max-width: 1200px;
  margin:auto;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 24px;
  line-height: 1.1;
}

.hero-subtitle {
  font-size: 1.4rem;
  color: white;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hero-features {
  display: none;
}

.hero-feature {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  padding: 30px 20px;
  border-radius: var(--border-radius);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  text-align: center;
}

.hero-feature-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  display: block;
}

.hero-feature-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.hero-feature-desc {
  font-size: 1rem;
  opacity: 0.9;
}

/* Main Content */
.main-content {
  background: white;
  min-height: 100vh;
  padding: 16px 0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.tool-container {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  border-radius: var(--border-radius-lg);
  padding: 20px 16px;
  box-shadow: var(--shadow-xl);
  max-width: 640px;
  width: 100%;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.3);
  position: relative;
  overflow: hidden;
  margin: 0 auto;
}

.tool-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--primary-gradient);
}

/* Footer Styles */
.footer {
  background: #1a202c;
  color: white;
  padding: 60px 0 30px;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
}

.footer-section h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: white;
}

.footer-section p,
.footer-section a {
  color: #a0aec0;
  text-decoration: none;
  line-height: 1.8;
  transition: color 0.3s ease;
}

.footer-section a:hover {
  color: var(--accent-color);
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 12px;
}

.footer-bottom {
  border-top: 1px solid #2d3748;
  margin-top: 40px;
  padding-top: 30px;
  text-align: center;
  color: #a0aec0;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.footer-links a {
  color: #a0aec0;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--accent-color);
}

.header {
  margin-bottom: 40px;
}

.badge {
  display: inline-block;
  background: var(--primary-gradient);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.title {
  font-size: 3rem;
  font-weight: 800;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
  line-height: 1.1;
}

.subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 600px;
  margin: 0 auto 24px;
  font-weight: 400;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin: 32px 0;
}

.feature {
  background: var(--bg-secondary);
  padding: 20px;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 12px;
  display: block;
}

.feature-title {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.feature-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.upload-area {
  border: 3px dashed var(--border-color);
  border-radius: var(--border-radius);
  padding: 40px 16px;
  margin: 254px 0 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
  background: var(--bg-secondary);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  min-height: 260px;
}

.upload-area:hover {
  border-color: var(--accent-color);
  background: #fff5f0;
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.upload-area.dragover {
  border-color: var(--accent-color);
  background: #fff5f0;
  transform: scale(1.02);
  box-shadow: var(--shadow-xl);
}

.upload-icon {
  font-size: 3.2rem;
  color: var(--accent-color);
  margin-bottom: 20px;
  display: block;
  animation: bounce 2s infinite;
}

.upload-text {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0;
  max-width: 520px;
  text-align: center;
}

.upload-hint {
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 520px;
  text-align: center;
}

.file-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  pointer-events: auto;
}

.file-info {
  background: linear-gradient(135deg, #f0f4ff, #e6f3ff);
  border: 2px solid #e1e5e9;
  border-radius: var(--border-radius);
  padding: 5px;
  margin: 50px 0;
  display: none;
  animation: slideIn 0.4s ease;
}

.file-info.show {
  display: block;
}

.file-name {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 30px;
  font-size: 1.1rem;
}

.file-size {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.process-btn {
  background: var(--primary-gradient);
  color: white;
  border: none;
  padding: 14px 28px;

  border-radius: var(--border-radius);
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin: 8px 0 0;
  min-width: 200px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: var(--shadow-md);
}

.process-btn:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: var(--shadow-xl);
}

.process-btn:active {
  transform: translateY(-1px);
}

.process-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.loading {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 24px 0;
}

.loading.show {
  display: flex;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid var(--accent-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.loading-text {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 1.1rem;
}

.message {
  border-radius: var(--border-radius);
  padding: 20px;
  margin: 24px 0;
  display: none;
  font-weight: 500;
  animation: slideIn 0.4s ease;
}

.message.show {
  display: block;
}

.success-message {
  background: linear-gradient(135deg, #d4edda, #c3e6cb);
  color: #155724;
  border: 2px solid #c3e6cb;
}

.error-message {
  background: linear-gradient(135deg, #f8d7da, #f5c6cb);
  color: #721c24;
  border: 2px solid #f5c6cb;
}

.specs {
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  border-radius: var(--border-radius);
  padding: 28px;
  margin: 32px 0;
  text-align: left;
  border: 1px solid var(--border-color);
}

.specs-title {
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 20px;
  text-align: center;
  font-size: 1.3rem;
}

.spec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

.spec-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: white;
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.spec-label {
  color: var(--text-secondary);
  font-weight: 500;
}

.spec-value {
  font-weight: 700;
  color: var(--text-primary);
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.9rem;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-10px); }
  60% { transform: translateY(-5px); }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile Optimizations */
@media (max-width: 768px) {
  .nav-menu {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: #ffffff;
    padding: 12px 20px;
    gap: 16px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
  }
  .nav-menu.open {
    display: flex;
  }
  
  .mobile-menu-btn {
    display: block;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.2rem;
  }
  
  .hero-features {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .tool-container {
    padding: 32px 24px;
    margin: 8px;
    border-radius: var(--border-radius);
  }
  
  .title {
    font-size: 2.2rem;
    line-height: 1.2;
  }
  
  .subtitle {
    font-size: 1.1rem;
  }
  
  .upload-area {
    padding: 40px 16px;
  }
  
  .upload-icon {
    font-size: 3rem;
  }
  
  .upload-text {
    font-size: 1.3rem;
  }
  
  .features {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .spec-grid {
    grid-template-columns: 1fr;
  }
  
  .process-btn {
    width: 100%;
    padding: 16px 32px;
    font-size: 1.1rem;
  }
  
  .footer-links {
    flex-direction: column;
    gap: 15px;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 100px 16px 60px;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .tool-container {
    padding: 24px 20px;
  }
  
  .title {
    font-size: 1.8rem;
  }
  
  .upload-area {
    padding: 30px 12px;
  }
  
  .upload-text {
    font-size: 1.2rem;
  }
}

/* Touch optimizations */
@media (hover: none) and (pointer: coarse) {
  .upload-area:hover {
    transform: none;
  }
  
  .process-btn:hover {
    transform: none;
  }
  
  .upload-area:active {
    transform: scale(0.98);
  }
  
  .process-btn:active {
    transform: scale(0.98);
  }
}

