/* GetFVid - Tailwind CSS Base + Custom Components */

/* Tailwind Directives - sẽ được compile */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* CSS Variables */
:root {
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --text-primary: #111827;
  --text-secondary: #6b7280;
  --border: #e5e7eb;
  --bg-base: #ffffff;
  --bg-alt: #f9fafb;
  --success: #10b981;
  --error: #ef4444;
}

/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-alt);
}

/* Container */
.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header Styles */
.header {
  background: white;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}

.logo:hover {
  color: var(--primary-hover);
}

.logo svg {
  width: 2rem;
  height: 2rem;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--primary);
}

/* Mobile Menu Toggle */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.mobile-menu-btn span {
  display: block;
  width: 1.5rem;
  height: 2px;
  background: var(--text-primary);
  margin: 0.25rem 0;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
  padding: 4rem 0 3rem;
  text-align: center;
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: white;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 2rem;
}

/* Search Box */
.search-container {
  max-width: 42rem;
  margin: 0 auto;
}

.search-form {
  display: flex;
  gap: 0.5rem;
  background: white;
  border-radius: 0.5rem;
  padding: 0.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  position: relative;
}

.search-input {
  flex: 1;
  padding: 0.75rem 3rem 0.75rem 1rem;
  border: 2px solid transparent;
  border-radius: 0.375rem;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
}

.search-input:focus {
  border-color: var(--primary);
}

.btn-paste {
  position: absolute;
  right: 8.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: var(--bg-alt);
  border: none;
  padding: 0.5rem;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-paste:hover {
  background: var(--border);
}

.btn-primary {
  background: var(--success);
  color: white;
  border: none;
  padding: 0.75rem 2rem;
  border-radius: 0.375rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}

.btn-primary:hover {
  background: #059669;
}

/* Card Styles */
.card {
  background: white;
  border-radius: 0.5rem;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-bottom: 1.5rem;
}

.card-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.card-text {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* Download Results */
.download-result {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.video-thumb {
  width: 180px;
  height: 180px;
  border-radius: 0.5rem;
  object-fit: cover;
}

.video-info {
  flex: 1;
}

.video-title {
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
  font-size: 1.125rem;
}

.quality-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: var(--bg-alt);
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-right: 0.5rem;
}

.quality-badge.hd {
  background: #dbeafe;
  color: var(--primary);
}

.btn-download {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  background: var(--primary);
  color: white;
  border-radius: 0.375rem;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.875rem;
  transition: background 0.2s;
  border: none;
  cursor: pointer;
}

.btn-download:hover {
  background: var(--primary-hover);
  color: white;
  text-decoration: none;
}

/* Modal Styles */
.modal {
  display: none;
  align-items: center;
  justify-content: center;
}

.modal.fade.show {
  display: flex !important;
}

/* Footer */
.footer {
  background: #1f2937;
  color: #d1d5db;
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-title {
  font-weight: 600;
  color: white;
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: #9ca3af;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid #374151;
  padding-top: 1.5rem;
  text-align: center;
  color: #9ca3af;
  font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 768px) {
  .mobile-menu-btn {
    display: block;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid var(--border);
    padding: 1rem;
    flex-direction: column;
    gap: 1rem;
  }

  .nav-links.show {
    display: flex;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .search-form {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-paste {
    position: static;
    transform: none;
    width: 100%;
    margin-top: -0.5rem;
  }

  .btn-primary {
    width: 100%;
  }

  .download-result {
    flex-direction: column;
  }

  .video-thumb {
    width: 100%;
    height: auto;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* Utility Classes */
.text-center {
  text-align: center;
}

.mt-4 {
  margin-top: 1rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.py-4 {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.hidden {
  display: none;
}