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

:root {
  --bg-base: #0b0f17;
  --bg-surface: rgba(20, 27, 41, 0.6);
  --bg-surface-hover: rgba(28, 38, 58, 0.8);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-color-hover: rgba(255, 255, 255, 0.18);
  
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-accent: #38bdf8;
  
  --primary-gradient: linear-gradient(135deg, #38bdf8 0%, #818cf8 50%, #c084fc 100%);
  --glow-primary: rgba(56, 189, 248, 0.25);
  --glow-secondary: rgba(192, 132, 252, 0.15);
  
  --font-display: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
}

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

body {
  background-color: var(--bg-base);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 15% 10%, var(--glow-primary), transparent 40%),
    radial-gradient(circle at 85% 80%, var(--glow-secondary), transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(15, 23, 42, 0.8), var(--bg-base) 100%);
  background-attachment: fixed;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Scrollbar customization */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-base);
}
::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
  background: #334155;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  width: 100%;
}

/* Header Navbar */
.site-header {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 15, 23, 0.7);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text-main);
}

.logo-img {
  height: 2.2rem;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px var(--glow-primary));
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

@media (max-width: 768px) {
  .nav-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .logo {
    width: 100%;
    justify-content: flex-start;
  }

  .nav-links {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.5rem 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
  }

  .nav-link {
    flex: 1 1 auto;
    min-width: 120px;
    text-align: center;
    padding: 0.75rem 0.5rem;
    border-radius: 999px;
    background: transparent;
  }
}

@media (max-width: 520px) {
  .nav-links {
    justify-content: space-between;
    gap: 0.35rem;
  }

  .nav-link {
    min-width: 100px;
    padding: 0.7rem 0.5rem;
    font-size: 0.95rem;
  }
}

.nav-link:hover {
  color: var(--text-main);
}

/* Hero Section */
.hero {
  padding: 5rem 0 3rem;
  text-align: center;
  position: relative;
}

.badge {
  display: inline-block;
  padding: 0.35rem 1rem;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 50px;
  color: var(--text-accent);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  animation: pulseGlow 3s infinite alternate;
}

@keyframes pulseGlow {
  0% { box-shadow: 0 0 0 rgba(56, 189, 248, 0); }
  100% { box-shadow: 0 0 15px rgba(56, 189, 248, 0.3); }
}

.headline {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.headline-gradient {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.project-explanation {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  color: var(--text-muted);
  max-width: 760px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

.cta-group {
  display: flex;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  border-radius: 12px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.btn-primary {
  background: var(--primary-gradient);
  color: #0b0f17;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
  position: relative;
  z-index: 1;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, #c084fc 0%, #818cf8 50%, #38bdf8 100%);
  opacity: 0;
  z-index: -1;
  transition: opacity 0.3s ease;
}

.btn-primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.6);
}

.btn-primary:hover::before {
  opacity: 1;
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(8px);
}

.btn-secondary:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-color-hover);
  transform: translateY(-3px);
}

/* Showcase Section */
.showcase {
  padding: 2rem 0 5rem;
}

.tool-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 1.5rem;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5),
              0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  transition: transform 0.4s ease, border-color 0.4s ease;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.tool-card:hover {
  border-color: var(--border-color-hover);
  transform: translateY(-5px);
}

.tool-preview {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: #0b0f17;
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  min-width: 0;
}

.tool-image {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.tool-preview:hover .tool-image {
  transform: scale(1.03);
}

.preview-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(11, 15, 23, 0.8) 0%, transparent 60%);
  display: flex;
  align-items: flex-end;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.tool-preview:hover .preview-overlay {
  opacity: 1;
}

.launch-hint {
  color: var(--text-main);
  font-family: var(--font-display);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(11, 15, 23, 0.7);
  padding: 0.5rem 1.2rem;
  border-radius: 50px;
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-color);
}

.tool-info {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0.5rem 0.5rem 0;
  min-width: 0;
}

.tool-header {
  margin-bottom: 1.2rem;
}

.tool-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.status-dot {
  width: 10px;
  height: 10px;
  background-color: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 10px #10b981;
  display: inline-block;
}

.tool-desc {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.tag {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.3rem 0.8rem;
  border-radius: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.tags-action-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  justify-content: space-between;
  margin-top: auto;
}

.tags-action-row .tags {
  margin-bottom: 0;
  flex: 1;
}

.tags-action-row .btn {
  white-space: nowrap;
  flex-shrink: 0;
}

.section-title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 3rem;
  letter-spacing: -0.5px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.feature-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2rem;
  transition: all 0.3s ease;
}

.feature-card:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-color-hover);
  transform: translateY(-3px);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(56, 189, 248, 0.1);
  color: var(--text-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(56, 189, 248, 0.2);
}

.feature-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text-main);
}

.feature-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Footer */
.site-footer {
  margin-top: auto;
  padding: 3rem 0;
  border-top: 1px solid var(--border-color);
  background: rgba(7, 10, 15, 0.8);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-link {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: var(--text-accent);
  text-decoration: underline;
}

/* Gallery / Showcase Tabs Section */
.gallery-section {
  padding: 3rem 0 5rem;
}

.gallery-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.gallery-subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0.5rem auto 0;
}

.tabs-nav {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.tab-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 0.75rem 1.75rem;
  border-radius: 50px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(8px);
}

.tab-btn:hover {
  color: var(--text-main);
  background: var(--bg-surface-hover);
  border-color: var(--border-color-hover);
  transform: translateY(-2px);
}

.tab-btn.active {
  background: var(--primary-gradient);
  color: #0b0f17;
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(56, 189, 248, 0.3);
}

.tab-pane {
  display: none;
  animation: fadeInScale 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.tab-pane.active {
  display: block;
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.98) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.model-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
}

.model-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
  backdrop-filter: blur(12px);
}

.model-card:hover {
  border-color: var(--border-color-hover);
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.model-img-wrapper {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #0f172a;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  cursor: zoom-in;
  display: flex;
  align-items: center;
  justify-content: center;
}

.model-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), filter 0.3s ease;
}

.model-card:hover .model-img {
  transform: scale(1.05);
  filter: brightness(1.1);
}

/* Zoom Icon Indicator */
.model-img-wrapper::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 40%, rgba(56, 189, 248, 0.08) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.model-card:hover .model-img-wrapper::after {
  opacity: 1;
}

.model-info {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  justify-content: space-between;
  gap: 1.2rem;
}

.model-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-main);
}

.model-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-dl {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.5rem 0.75rem;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-dl-json {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-dl-json:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

.btn-dl-3mf {
  background: rgba(56, 189, 248, 0.1);
  color: var(--text-accent);
  border: 1px solid rgba(56, 189, 248, 0.2);
}

.btn-dl-3mf:hover {
  background: rgba(56, 189, 248, 0.2);
  color: #fff;
  border-color: rgba(56, 189, 248, 0.4);
}

.btn-gui {
  background: rgba(34, 197, 94, 0.1);
  color: var(--text-success);
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.btn-gui:hover {
  background: rgba(34, 197, 94, 0.2);
  color: #fff;
  border-color: rgba(34, 197, 94, 0.4);
}

/* Image Lightbox Modal */
.lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(7, 10, 15, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.lightbox-modal.active .lightbox-content {
  transform: scale(1);
}

.lightbox-img {
  width: auto;
  height: auto;
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 16px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8),
              0 0 0 1px rgba(255, 255, 255, 0.1);
  display: block;
}

.lightbox-close {
  position: absolute;
  top: -2.5rem;
  right: 0;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-main);
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lightbox-close:hover {
  background: var(--primary-gradient);
  color: #0b0f17;
  border-color: transparent;
  transform: scale(1.1);
}

.model-img-wrapper {
  cursor: zoom-in;
}

/* Responsive Breakpoints */
@media (min-width: 992px) {
  .tool-card {
    grid-template-columns: 1.1fr 1fr;
    align-items: center;
  }
  
  .tool-info {
    padding: 1rem 0.5rem 0.5rem;
  }
}
