@import url(/style.css);

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
  color: var(--text-primary); /* #f8fafc */
  background: var(--dark-bg); /* #0f172a */
  overflow-x: hidden;
}

.container {
  max-width: 1200px; /* Match first CSS */
  margin: 0 auto;
  padding: 0 20px;
}

/* Navigation */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(15, 23, 42, 0.95); /* Matches --dark-bg with opacity */
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color); /* rgba(59, 130, 246, 0.2) */
  z-index: 1000;
  padding: 15px 0;
  transition: all 0.3s ease;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.logo {
  display: flex;
  align-items: center;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary); /* #f8fafc */
  text-decoration: none;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: var(--gradient-primary); /* linear-gradient(135deg, #1e40af, #3b82f6, #06b6d4) */
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
  font-size: 1.2rem;
  box-shadow: 0 4px 15px rgba(30, 64, 175, 0.3);
}

.nav-links {
  display: flex;
  gap: 30px;
  align-items: center;
}

.nav-links a {
  color: var(--text-secondary); /* #cbd5e1 */
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
  padding: 8px 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: width 0.3s ease;
}

.nav-links a:hover {
  color: var(--secondary-color); /* #3b82f6 */
}

.nav-links a:hover::after {
  width: 100%;
}

.back-link {
  color: var(--secondary-color); /* #3b82f6 */
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.back-link:hover {
  color: var(--accent-color); /* #06b6d4 */
}

/* Hero Section */
.hero {
  padding: 120px 0 80px;
  position: relative;
  background: var(--gradient-secondary); /* linear-gradient(135deg, #0f172a, #1e293b) */
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 25% 25%, rgba(30, 64, 175, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 75% 75%, rgba(59, 130, 246, 0.2) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(6, 182, 212, 0.1) 0%, transparent 50%);
  animation: gradientShift 8s ease-in-out infinite;
}

@keyframes gradientShift {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.05); }
}

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

.hero-badge {
  display: inline-flex;
  padding: 10px 24px;
  background: rgba(30, 64, 175, 0.2);
  border: 1px solid var(--border-color); /* rgba(59, 130, 246, 0.2) */
  border-radius: 50px;
  font-size: 0.9rem;
  color: var(--accent-color); /* #06b6d4 */
  margin-bottom: 2rem;
  backdrop-filter: blur(10px);
  gap: 8px;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  background: var(--gradient-primary); /* linear-gradient(135deg, #1e40af, #3b82f6, #06b6d4) */
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}

.hero .description {
  font-size: 1.2rem;
  color: var(--text-secondary); /* #cbd5e1 */
  margin-bottom: 2rem;
  line-height: 1.7;
}

/* Filter Section */
.filter-section {
  padding: 40px 0;
  text-align: center;
  border-bottom: 1px solid var(--border-color); /* rgba(59, 130, 246, 0.2) */
}

.filter-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 20px;
}

.filter-btn {
  padding: 12px 24px;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid var(--border-color); /* rgba(59, 130, 246, 0.2) */
  border-radius: 25px;
  color: var(--text-secondary); /* #cbd5e1 */
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  cursor: pointer;
}

.filter-btn.active,
.filter-btn:hover {
  background: var(--gradient-primary); /* linear-gradient(135deg, #1e40af, #3b82f6, #06b6d4) */
  color: white;
  border-color: var(--secondary-color); /* #3b82f6 */
  transform: translateY(-2px);
}

/* Products Grid */
.products-section {
  padding: 80px 0;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 40px;
  margin-top: 40px;
}

.product-card {
  background: var(--card-bg); /* #1e293b */
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-color); /* rgba(59, 130, 246, 0.2) */
  border-radius: 24px;
  overflow: hidden;
  transition: all 0.3s ease;
  position: relative;
  cursor: pointer;
}

.product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary); /* linear-gradient(135deg, #1e40af, #3b82f6, #06b6d4) */
}

.product-card:hover {
  transform: translateY(-10px);
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: 0 25px 50px rgba(30, 64, 175, 0.2);
}

.product-image {
  width: 100%;
  height: 250px;
  background: var(--gradient-primary); /* linear-gradient(135deg, #1e40af, #3b82f6, #06b6d4) */
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  position: relative;
  overflow: hidden;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
  transform: scale(1.05);
}

.product-image-placeholder {
  color: var(--accent-color); /* #06b6d4 */
  font-size: 4rem;
}

.product-status {
  position: absolute;
  top: 15px;
  right: 15px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  backdrop-filter: blur(10px);
}

.status-live {
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #10b981;
}

.status-development {
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #f59e0b;
}

.status-concept {
  background: rgba(30, 64, 175, 0.2); /* Match theme */
  border: 1px solid var(--border-color); /* rgba(59, 130, 246, 0.2) */
  color: var(--accent-color); /* #06b6d4 */
}

.product-content {
  padding: 30px;
}

.product-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 15px;
}

.product-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary); /* #f8fafc */
  margin-bottom: 8px;
}

.product-category {
  font-size: 0.9rem;
  color: var(--secondary-color); /* #3b82f6 */
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.product-description {
  color: var(--text-secondary); /* #cbd5e1 */
  line-height: 1.7;
  margin-bottom: 25px;
  font-size: 1rem;
}

.product-features {
  margin-bottom: 25px;
}

.product-features h4 {
  color: var(--text-primary); /* #f8fafc */
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.features-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.feature-tag {
  padding: 6px 12px;
  background: rgba(30, 64, 175, 0.2); /* Match theme */
  border: 1px solid var(--border-color); /* rgba(59, 130, 246, 0.2) */
  border-radius: 15px;
  font-size: 0.8rem;
  color: var(--accent-color); /* #06b6d4 */
  font-weight: 500;
}

.product-tech {
  margin-bottom: 25px;
}

.product-tech h4 {
  color: var(--text-primary); /* #f8fafc */
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tech-tag {
  padding: 6px 12px;
  background: rgba(30, 64, 175, 0.2); /* Match theme */
  border: 1px solid var(--border-color); /* rgba(59, 130, 246, 0.2) */
  border-radius: 15px;
  font-size: 0.8rem;
  color: var(--secondary-color); /* #3b82f6 */
  font-weight: 500;
}

.product-actions {
  display: flex;
  gap: 15px;
  align-items: center;
}

.btn-primary {
  padding: 12px 24px;
  background: var(--gradient-primary); /* linear-gradient(135deg, #1e40af, #3b82f6, #06b6d4) */
  color: white;
  text-decoration: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(30, 64, 175, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(30, 64, 175, 0.4);
}

.btn-secondary {
  padding: 12px 24px;
  background: transparent;
  color: var(--text-secondary); /* #cbd5e1 */
  text-decoration: none;
  border: 1px solid var(--border-color); /* rgba(59, 130, 246, 0.2) */
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-secondary:hover {
  background: rgba(30, 64, 175, 0.1);
  border-color: var(--secondary-color); /* #3b82f6 */
  color: var(--secondary-color); /* #3b82f6 */
}

.btn-disabled {
  padding: 12px 24px;
  background: rgba(75, 85, 99, 0.3);
  color: var(--text-muted); /* #94a3b8 */
  text-decoration: none;
  border: 1px solid rgba(75, 85, 99, 0.4);
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: not-allowed;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Loading State */
.loading {
  text-align: center;
  padding: 100px 0;
  color: var(--text-muted); /* #94a3b8 */
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 3px solid var(--border-color); /* rgba(59, 130, 246, 0.2) */
  border-top: 3px solid var(--secondary-color); /* #3b82f6 */
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Error State */
.error {
  text-align: center;
  padding: 100px 0;
  color: #ef4444; /* Keep red for error, consistent with common UX */
}

.error-icon {
  font-size: 4rem;
  margin-bottom: 20px;
}

/* Stats Section */
.stats-section {
  padding: 60px 0;
  background: rgba(30, 41, 59, 0.5);
  border-top: 1px solid var(--border-color); /* rgba(59, 130, 246, 0.2) */
  border-bottom: 1px solid var(--border-color);
  margin-top: 80px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  text-align: center;
}

.stat-item h3 {
  font-size: 2.5rem;
  font-weight: 800;
  background: var(--gradient-primary); /* linear-gradient(135deg, #1e40af, #3b82f6, #06b6d4) */
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 10px;
}

.stat-item p {
  color: var(--text-secondary); /* #cbd5e1 */
  font-size: 1rem;
  font-weight: 500;
}

/* Featured Product */
.featured-product {
  background: var(--gradient-secondary); /* linear-gradient(135deg, #0f172a, #1e293b) */
  border: 2px solid var(--border-color); /* rgba(59, 130, 246, 0.2) */
  position: relative;
}

.featured-badge {
  position: absolute;
  top: -1px;
  left: 30px;
  background: var(--gradient-primary); /* linear-gradient(135deg, #1e40af, #3b82f6, #06b6d4) */
  color: white;
  padding: 8px 16px;
  border-radius: 0 0 12px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  z-index: 2;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .products-grid {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  }
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .products-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .product-card {
    margin: 0 10px;
  }
  
  .filter-buttons {
    gap: 10px;
  }
  
  .filter-btn {
    padding: 10px 18px;
    font-size: 0.9rem;
  }
  
  .nav-links {
    display: none;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 2rem;
  }
  
  .product-content {
    padding: 25px;
  }
  
  .product-actions {
    flex-direction: column;
    gap: 10px;
  }
  
  .btn-primary,
  .btn-secondary,
  .btn-disabled {
    width: 100%;
    justify-content: center;
  }
}

/* Scroll animations */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Product Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
}

.modal-content {
  background: var(--card-bg); /* #1e293b */
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-color); /* rgba(59, 130, 246, 0.2) */
  margin: 5% auto;
  padding: 40px;
  width: 90%;
  max-width: 600px;
  border-radius: 20px;
  position: relative;
  max-height: 80vh;
  overflow-y: auto;
}

.close {
  position: absolute;
  right: 20px;
  top: 20px;
  color: var(--text-muted); /* #94a3b8 */
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s ease;
}

.close:hover {
  color: #ef4444; /* Keep red for close button, consistent with UX */
}

.modal h2 {
  color: var(--text-primary); /* #f8fafc */
  margin-bottom: 20px;
  font-size: 1.8rem;
}

.modal p {
  color: var(--text-secondary); /* #cbd5e1 */
  line-height: 1.7;
  margin-bottom: 15px;
}