@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500&family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg-dark: #0a0f1d;
  --bg-card: rgba(18, 25, 44, 0.75);
  --bg-card-hover: rgba(28, 38, 66, 0.85);
  --bg-input: #0e1628;
  --border: rgba(255, 255, 255, 0.1);
  --border-glow: rgba(56, 189, 248, 0.4);
  
  --primary: #38bdf8;
  --primary-glow: rgba(56, 189, 248, 0.25);
  --secondary: #818cf8;
  --accent-pink: #f472b6;
  --accent-green: #34d399;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  
  --shadow-main: 0 12px 32px rgba(0, 0, 0, 0.4);
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(56, 189, 248, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(129, 140, 248, 0.08) 0%, transparent 40%);
}

.container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header Navbar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}

.logo-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0a0f1d;
  font-size: 1.4rem;
  box-shadow: 0 0 20px var(--primary-glow);
}

.logo-text h1 {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(90deg, #ffffff, var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-text p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.nav-badges {
  display: flex;
  gap: 12px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.badge.success {
  background: rgba(52, 211, 153, 0.1);
  border-color: rgba(52, 211, 153, 0.3);
  color: var(--accent-green);
}

.badge.primary {
  background: rgba(56, 189, 248, 0.1);
  border-color: rgba(56, 189, 248, 0.3);
  color: var(--primary);
}

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

.hero h2 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 12px;
  line-height: 1.2;
}

.hero h2 span {
  color: var(--primary);
  text-shadow: 0 0 25px var(--primary-glow);
}

.hero p {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 24px;
}

/* Controls & Search Toolbar */
.toolbar {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 40px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 16px;
  box-shadow: var(--shadow-main);
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-box i {
  position: absolute;
  left: 16px;
  color: var(--text-dim);
  font-size: 1.1rem;
}

.search-input {
  width: 100%;
  padding: 12px 16px 12px 46px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition);
}

.search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 15px var(--primary-glow);
}

.filter-select {
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 0.9rem;
  outline: none;
  cursor: pointer;
  transition: var(--transition);
}

.filter-select:focus {
  border-color: var(--primary);
}

.btn {
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #0a0f1d;
  box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.4);
}

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

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.25);
}

/* Stats Counter */
.stats-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Gallery Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
  margin-bottom: 60px;
}

.card {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  position: relative;
}

.card:hover {
  transform: translateY(-6px);
  border-color: var(--border-glow);
  box-shadow: 0 12px 30px rgba(56, 189, 248, 0.15);
  background: var(--bg-card-hover);
}

.card-image-wrap {
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  position: relative;
  background: #0e1628;
}

.card-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

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

.card-tag {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(10, 15, 29, 0.85);
  backdrop-filter: blur(4px);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  border: 1px solid var(--border);
  color: var(--primary);
}

.card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 16px;
}

.card-actions {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-copy {
  width: 100%;
  padding: 8px 12px;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: var(--primary);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: var(--transition);
}

.btn-copy:hover {
  background: var(--primary);
  color: #0a0f1d;
}

.btn-copy.jsdelivr {
  background: rgba(129, 140, 248, 0.1);
  border-color: rgba(129, 140, 248, 0.25);
  color: var(--secondary);
}

.btn-copy.jsdelivr:hover {
  background: var(--secondary);
  color: #0a0f1d;
}

/* API Endpoints & Docs Section */
.docs-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 60px;
}

.docs-section h3 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--primary);
}

.endpoint-box {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-family: 'Fira Code', monospace;
  font-size: 0.88rem;
  color: var(--primary);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.endpoint-box span {
  word-break: break-all;
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #10b981;
  color: #0a0f1d;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: all 0.3s ease;
  z-index: 9999;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .toolbar {
    grid-template-columns: 1fr;
  }
  .navbar {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }
  .hero h2 {
    font-size: 1.8rem;
  }
}
