* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --secondary: #8b5cf6;
  --text-primary: #1a1a1a;
  --text-secondary: #666666;
  --bg-light: #ffffff;
  --bg-gray: #f5f5f5;
  --border: #e5e7eb;
  --shadow: rgba(0, 0, 0, 0.1);
}

body {
  font-family: 'Vazirmatn', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.header {
  background: var(--bg-light);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.9);
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
  transition: opacity 0.2s;
}

.logo:hover {
  opacity: 0.8;
}

.logo svg {
  color: var(--primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-link {
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 500;
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--primary);
}

.nav-link.cta {
  background: var(--primary);
  color: white;
  padding: 8px 16px;
  border-radius: 8px;
  transition: background 0.2s;
}

.nav-link.cta:hover {
  background: var(--primary-hover);
  color: white;
}

/* Auth Section */
.auth-section {
  display: flex;
  align-items: center;
  gap: 12px;
}

.login-btn {
  background: var(--primary);
  color: white;
  padding: 8px 16px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.2s;
  font-family: 'Vazirmatn', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.login-btn:hover {
  background: var(--primary-hover);
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--border);
}

.user-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.logout-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s;
  font-family: 'Vazirmatn', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.logout-btn:hover {
  background: var(--bg-gray);
  color: var(--text-primary);
}

/* Hero Section */
.hero {
  padding: 100px 0 80px;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  position: relative;
  overflow: hidden;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
  overflow: hidden;
}

.hero-curves {
  width: 100%;
  height: 100%;
  position: absolute;
  bottom: 0;
  left: 0;
  animation: float 20s ease-in-out infinite;
}

.curve-1 {
  animation: curveMove1 15s ease-in-out infinite;
}

.curve-2 {
  animation: curveMove2 18s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0) translateX(0);
  }
  50% {
    transform: translateY(-20px) translateX(10px);
  }
}

@keyframes curveMove1 {
  0%, 100% {
    transform: translateX(0) scaleY(1);
  }
  50% {
    transform: translateX(20px) scaleY(1.1);
  }
}

@keyframes curveMove2 {
  0%, 100% {
    transform: translateX(0) scaleY(1);
  }
  50% {
    transform: translateX(-15px) scaleY(0.9);
  }
}

.hero-elements {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
}

.hero-element {
  position: absolute;
  font-size: 48px;
  opacity: 0.15;
  animation: elementFloat 8s ease-in-out infinite;
}

.element-1 {
  top: 10%;
  left: 10%;
  animation-delay: 0s;
}

.element-2 {
  top: 20%;
  right: 15%;
  animation-delay: 1.5s;
}

.element-3 {
  bottom: 30%;
  left: 20%;
  animation-delay: 3s;
}

.element-4 {
  bottom: 20%;
  right: 10%;
  animation-delay: 4.5s;
}

.element-5 {
  top: 50%;
  left: 50%;
  animation-delay: 6s;
}

@keyframes elementFloat {
  0%, 100% {
    transform: translateY(0) rotate(0deg) scale(1);
    opacity: 0.15;
  }
  50% {
    transform: translateY(-30px) rotate(10deg) scale(1.1);
    opacity: 0.25;
  }
}

.hero .container {
  position: relative;
  z-index: 2;
  text-align: center;
}

.hero-title {
  font-size: 48px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 24px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-description {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 32px;
  line-height: 1.8;
}

.hero-cta {
  display: flex;
  gap: 16px;
}

.btn {
  padding: 14px 28px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s;
  display: inline-block;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow);
}

.btn-secondary {
  background: white;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-secondary:hover {
  background: var(--primary);
  color: white;
}

.hero-image {
  display: flex;
  justify-content: center;
  align-items: center;
}

.mockup {
  width: 100%;
  max-width: 400px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 60px var(--shadow);
  overflow: hidden;
}

.mockup-header {
  background: var(--bg-gray);
  padding: 12px;
  display: flex;
  align-items: center;
}

.mockup-dots {
  display: flex;
  gap: 8px;
}

.mockup-dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--border);
}

.mockup-dots span:nth-child(1) {
  background: #ff5f57;
}

.mockup-dots span:nth-child(2) {
  background: #ffbd2e;
}

.mockup-dots span:nth-child(3) {
  background: #28ca42;
}

.mockup-content {
  padding: 0;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.extension-screenshot {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.demo-text {
  color: var(--text-secondary);
  font-size: 14px;
}

/* Features Section */
.features {
  padding: 80px 0;
  background: var(--bg-light);
}

.section-title {
  text-align: center;
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 48px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

@media (max-width: 768px) {
  .features-grid {
    display: block;
    position: relative;
    overflow: hidden;
  }
  
  .features-slider {
    display: flex;
    transition: transform 0.5s ease;
    will-change: transform;
  }
  
  .features-slider .feature-card {
    min-width: 100%;
    flex-shrink: 0;
    margin: 0;
  }
  
  .features-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
  }
  
  .features-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border);
    cursor: pointer;
    transition: all 0.3s;
  }
  
  .features-dot.active {
    background: var(--primary);
    width: 24px;
    border-radius: 5px;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
  }
}

.feature-card {
  padding: 24px;
  background: white;
  border-radius: 12px;
  border: 1px solid var(--border);
  transition: all 0.3s;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px var(--shadow);
  border-color: var(--primary);
}

.feature-icon {
  font-size: 36px;
  margin-bottom: 12px;
}

.feature-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.feature-description {
  color: var(--text-secondary);
  line-height: 1.5;
  font-size: 14px;
}

/* How It Works */
.how-it-works {
  padding: 80px 0;
  background: var(--bg-gray);
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 32px;
}

.step {
  text-align: center;
  padding: 32px;
}

.step-number {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  margin: 0 auto 24px;
}

.step-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 12px;
}

.step-description {
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Install Section */
.install {
  padding: 80px 0;
  background: var(--bg-light);
}

.install-content {
  max-width: 800px;
  margin: 0 auto;
}

.install-steps {
  display: grid;
  gap: 32px;
}

.install-step {
  padding: 32px;
  background: white;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.install-step h3 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 16px;
}

.install-step p {
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.install-step ol {
  margin-right: 24px;
  color: var(--text-secondary);
  line-height: 2;
}

.install-step code {
  background: var(--bg-gray);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 14px;
}

/* Apply Vazirmatn font to all text elements */
* {
  font-family: 'Vazirmatn', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Override for code elements */
code, pre {
  font-family: 'Courier New', monospace;
}

/* Footer */
.footer {
  background: var(--text-primary);
  color: white;
  padding: 48px 0 24px;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

.footer-logo .logo-text {
  font-size: 24px;
  font-weight: 600;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-link {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-link:hover {
  color: white;
}

.footer-bottom {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
}

/* Download Section */
.download-section {
  padding: 60px 0;
  background: var(--bg-light);
}

.download-box {
  max-width: 800px;
  margin: 0 auto;
  padding: 48px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 20px var(--shadow);
}

.download-title {
  font-size: 24px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 32px;
  color: var(--text-primary);
}

.download-input-group {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.file-input-label {
  display: inline-block;
}

.file-input-btn {
  display: inline-block;
  padding: 16px 24px;
  background: var(--secondary);
  color: white;
  border: none;
  border-radius: 8px;
  font-family: 'Vazirmatn', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.file-input-btn:hover {
  background: #7c3aed;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow);
}

.download-input {
  flex: 1;
  padding: 16px 20px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 16px;
  font-family: 'Vazirmatn', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  transition: border-color 0.2s;
}

.download-input:focus {
  outline: none;
  border-color: var(--primary);
}

.download-btn-main {
  padding: 16px 32px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Vazirmatn', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  white-space: nowrap;
}

.download-btn-main:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow);
}

.download-btn-main:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.download-options {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.download-option-group {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  justify-content: space-between;
}

.download-option-btn {
  padding: 12px 16px;
  background: white;
  color: var(--primary);
  border: 2px solid var(--primary);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  font-family: 'Vazirmatn', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.option-icon {
  font-size: 24px;
  line-height: 1;
}

.option-text {
  font-size: 12px;
  white-space: nowrap;
}

.download-option-btn:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow);
}

.download-message {
  margin-top: 16px;
  padding: 12px;
  border-radius: 8px;
  text-align: center;
  font-size: 14px;
  display: none;
}

.download-message.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
  display: block;
}

.download-message.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
  display: block;
}

.download-message.info {
  background: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
  display: block;
}

/* Quality Dropdown */
.quality-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.quality-modal.active {
  display: flex;
}

.quality-modal-content {
  background: white;
  padding: 32px;
  border-radius: 16px;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
}

.subtitle-modal-body,
.summary-modal-body {
  margin-top: 20px;
}

.srt-controls {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.srt-language-label {
  font-weight: 600;
  color: var(--text-primary);
}

.srt-language-select {
  padding: 8px 12px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-family: 'Vazirmatn', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 14px;
  background: white;
  color: var(--text-primary);
  cursor: pointer;
  transition: border-color 0.2s;
}

.srt-language-select:focus {
  outline: none;
  border-color: var(--primary);
}

.translate-srt-btn,
.download-srt-btn {
  padding: 10px 20px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-family: 'Vazirmatn', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.translate-srt-btn:hover,
.download-srt-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
}

.translate-srt-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.download-srt-btn {
  width: 100%;
  margin-bottom: 16px;
}

.srt-preview {
  font-family: 'Courier New', monospace;
  font-size: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.summary-content {
  margin-top: 20px;
}

.key-points-section ul li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.key-points-section ul li:last-child {
  border-bottom: none;
}

.summary-text-section,
.fulltext-content {
  line-height: 1.8;
  text-align: right;
  color: var(--text-primary);
}

.quality-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.quality-modal-title {
  font-size: 20px;
  font-weight: 600;
}

.quality-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-secondary);
}

.quality-list {
  display: grid;
  gap: 12px;
}

.quality-item {
  padding: 16px;
  border: 2px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.quality-item:hover {
  border-color: var(--primary);
  background: var(--bg-gray);
}

.quality-item.locked {
  opacity: 0.5;
  cursor: not-allowed;
  position: relative;
}

.quality-item.locked::after {
  content: '🔒';
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
}

.pro-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  margin-right: 8px;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.05);
  }
}

/* Responsive */
@media (max-width: 768px) {
  .hero .container {
    grid-template-columns: 1fr;
  }

  .hero-title {
    font-size: 36px;
  }

  .nav-links {
    gap: 16px;
    font-size: 14px;
  }

  .nav-link.cta {
    padding: 6px 12px;
    font-size: 14px;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .footer-content {
    flex-direction: column;
    gap: 24px;
  }

  .download-input-group {
    flex-direction: column;
  }

  .download-btn-main {
    width: 100%;
  }

  .download-option-group {
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
  }

  .download-option-btn {
    min-width: 100px;
    flex: 1 1 calc(50% - 3px);
    max-width: calc(50% - 3px);
    padding: 10px 12px;
  }
  
  .option-icon {
    font-size: 20px;
  }
  
  .option-text {
    font-size: 11px;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
  }
  
  .srt-controls {
    flex-direction: column;
    align-items: stretch;
  }
  
  .srt-language-select,
  .translate-srt-btn {
    width: 100%;
  }
  
  .quality-modal-content {
    max-width: 95%;
    padding: 20px;
  }
}

