/* Premium CSS Design System for Flugelsoft Product Catalog */

/* Custom Properties / Design Tokens */
:root {
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Colors */
  --bg-main: #060814;
  --card-bg: rgba(18, 22, 38, 0.65);
  --card-border: rgba(255, 255, 255, 0.07);
  --card-hover-border: rgba(255, 255, 255, 0.15);
  
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-tertiary: #6b7280;

  --accent-blue: #3b82f6;
  --accent-purple: #8b5cf6;
  --accent-emerald: #10b981;
  --accent-rose: #f43f5e;
  
  --accent-gradient: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 50%, #f43f5e 100%);
  --blue-gradient: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
  --purple-gradient: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
  --green-gradient: linear-gradient(135deg, #059669 0%, #10b981 100%);
  
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Reset & Global */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  line-height: 1.6;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: #090a16;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Glowing Background Blobs */
.glow-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.15;
  animation: float 25s infinite alternate ease-in-out;
}

.blob-1 {
  width: 500px;
  height: 500px;
  background: var(--accent-blue);
  top: -10%;
  left: -10%;
}

.blob-2 {
  width: 600px;
  height: 600px;
  background: var(--accent-purple);
  bottom: -20%;
  right: -10%;
  animation-delay: -5s;
}

.blob-3 {
  width: 400px;
  height: 400px;
  background: var(--accent-rose);
  top: 40%;
  left: 50%;
  animation-delay: -10s;
}

@keyframes float {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(60px, -40px) scale(1.1); }
  100% { transform: translate(-40px, 80px) scale(0.9); }
}

/* Header */
.app-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(6, 8, 20, 0.7);
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.25rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-icon {
  width: 2.25rem;
  height: 2.25rem;
  color: var(--accent-blue);
}

.logo-text h1 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-text span {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-secondary);
  font-weight: 600;
}

.header-tagline {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
  border-left: 2px solid var(--accent-purple);
  padding-left: 0.75rem;
}

/* Main Container */
.app-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

/* Hero Section */
.hero-section {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 3rem;
}

.hero-section h2 {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero-section p {
  font-size: 1.15rem;
  color: var(--text-secondary);
  font-weight: 400;
}

/* Stats Dashboard */
.stats-dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 4rem;
}

.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(16px);
  border-radius: 16px;
  padding: 1.75rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  transition: var(--transition-smooth);
}

.stat-card:hover {
  transform: translateY(-4px);
  border-color: var(--card-hover-border);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.stat-icon-wrapper {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.stat-icon-wrapper i {
  width: 1.75rem;
  height: 1.75rem;
}

.stat-info h3 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
}

.stat-info p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
}

/* Search and Filters Controls */
.controls-section {
  background: rgba(10, 12, 28, 0.4);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 2rem;
  backdrop-filter: blur(12px);
  margin-bottom: 2.5rem;
}

.search-bar-wrapper {
  position: relative;
  width: 100%;
  margin-bottom: 1.5rem;
}

.search-icon {
  position: absolute;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  width: 1.25rem;
  height: 1.25rem;
  pointer-events: none;
}

#search-input {
  width: 100%;
  background: rgba(6, 8, 20, 0.7);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 1.1rem 3.5rem 1.1rem 3.25rem;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1.05rem;
  transition: var(--transition-smooth);
}

#search-input:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.clear-btn {
  position: absolute;
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  display: none;
  transition: var(--transition-smooth);
}

.clear-btn:hover {
  color: var(--text-primary);
}

.filter-container {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.filter-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.filter-label i {
  width: 1rem;
  height: 1rem;
}

.filter-chips {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 0.6rem 1.2rem;
  border-radius: 30px;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 550;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.chip:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.chip.active {
  background: var(--text-primary);
  color: var(--bg-main);
  border-color: var(--text-primary);
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.15);
}

/* Products Section */
.results-count-container {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.75rem;
}

/* Product Card Design */
.product-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  height: 100%;
  backdrop-filter: blur(16px);
  position: relative;
  transition: var(--transition-bounce);
}

.product-card:hover {
  transform: translateY(-8px);
  border-color: var(--card-hover-border);
  box-shadow: 0 15px 40px -15px rgba(0, 0, 0, 0.6);
}

/* Glow accent bar on card top on hover */
.product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  border-radius: 18px 18px 0 0;
  background: var(--accent-gradient);
  opacity: 0;
  transition: var(--transition-smooth);
}

.product-card:hover::before {
  opacity: 1;
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.25rem;
}

.domain-badge {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.35rem 0.75rem;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Specific Badge styling based on content */
.domain-badge.edtech { color: #f43f5e; background: rgba(244, 63, 94, 0.1); border-color: rgba(244, 63, 94, 0.2); }
.domain-badge.geopolitics { color: #8b5cf6; background: rgba(139, 92, 246, 0.1); border-color: rgba(139, 92, 246, 0.2); }
.domain-badge.regional { color: #3b82f6; background: rgba(59, 130, 246, 0.1); border-color: rgba(59, 130, 246, 0.2); }
.domain-badge.energy { color: #10b981; background: rgba(16, 185, 129, 0.1); border-color: rgba(16, 185, 129, 0.2); }
.domain-badge.real { color: #f59e0b; background: rgba(245, 158, 11, 0.1); border-color: rgba(245, 158, 11, 0.2); }
.domain-badge.developer { color: #ec4899; background: rgba(236, 72, 153, 0.1); border-color: rgba(236, 72, 153, 0.2); }

.card-content {
  flex-grow: 1;
  margin-bottom: 1.5rem;
}

.product-card h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.product-card .tagline {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.75rem;
}

.product-card .description {
  color: var(--text-secondary);
  font-size: 0.95rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Card Tech Tags styling */
.card-tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.tech-tag {
  font-size: 0.75rem;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  font-weight: 500;
}

.card-actions {
  display: flex;
  gap: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 1.25rem;
}

.card-btn {
  flex: 1;
  text-align: center;
  padding: 0.7rem 1rem;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition-smooth);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.09);
}

.btn-primary {
  background: var(--text-primary);
  border: 1px solid var(--text-primary);
  color: var(--bg-main);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.btn-primary:hover {
  background: transparent;
  color: var(--text-primary);
}

/* No Results Panel */
.no-results {
  grid-column: 1 / -1;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 5rem 2rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
}

.no-results-icon {
  width: 4rem;
  height: 4rem;
  color: var(--text-tertiary);
  margin-bottom: 1.5rem;
}

.no-results h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.no-results p {
  color: var(--text-secondary);
}

/* Modal Dialog Stylesheet */
.modal-dialog {
  border: none;
  border-radius: 24px;
  background: #0d0f1c;
  color: var(--text-primary);
  max-width: 680px;
  width: 90%;
  margin: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 25px 70px -10px rgba(0, 0, 0, 0.8);
  padding: 0;
  backdrop-filter: blur(30px);
}

.modal-dialog::backdrop {
  background: rgba(4, 5, 12, 0.85);
  backdrop-filter: blur(8px);
}

.modal-content {
  position: relative;
  padding: 2.5rem;
}

.modal-close-btn {
  position: absolute;
  right: 1.5rem;
  top: 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.modal-header {
  margin-bottom: 2rem;
}

.modal-domain-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.35rem 0.75rem;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.08);
  margin-bottom: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h2 {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0.25rem;
}

.modal-header p {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--accent-blue);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.modal-body h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-left: 3px solid var(--accent-purple);
  padding-left: 0.75rem;
}

.modal-description-section p {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

#modal-features-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

#modal-features-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

#modal-features-list li::before {
  content: '✓';
  color: var(--accent-emerald);
  font-weight: bold;
  margin-top: 0.1rem;
}

.tech-tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.tech-tag-large {
  font-size: 0.85rem;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  font-weight: 600;
}

.modal-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding-top: 1.5rem;
  display: flex;
}

.launch-btn {
  width: 100%;
  padding: 1rem;
  border-radius: 12px;
  background: var(--accent-gradient);
  border: none;
  color: white;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.05rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
  transition: var(--transition-bounce);
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.25);
}

.launch-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(59, 130, 246, 0.4);
}

/* Footer styling */
.app-footer-bar {
  text-align: center;
  padding: 3rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-tertiary);
  font-size: 0.85rem;
}

/* Media Queries for Responsiveness */
@media (max-width: 768px) {
  .hero-section h2 {
    font-size: 2.2rem;
  }
  
  .header-container {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  .header-tagline {
    border-left: none;
    border-top: 2px solid var(--accent-purple);
    padding-left: 0;
    padding-top: 0.5rem;
  }
  
  .controls-section {
    padding: 1.25rem;
  }
  
  .filter-container {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .products-grid {
    grid-template-columns: 1fr;
  }
  
  .modal-content {
    padding: 1.5rem;
  }
  
  .modal-header h2 {
    font-size: 1.8rem;
  }
}
