/* ==========================================================================
   MINGAT GAMES — Official Organization Showcase Stylesheet
   ========================================================================== */

:root {
  --bg-dark: #07090e;
  --bg-surface: #0e131f;
  --bg-card: rgba(18, 24, 38, 0.75);
  --bg-card-hover: rgba(26, 35, 56, 0.85);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(99, 102, 241, 0.35);

  --accent-primary: #6366f1;
  --accent-purple: #8b5cf6;
  --accent-cyan: #06b6d4;
  --accent-pink: #ec4899;
  --accent-amber: #f59e0b;
  --accent-emerald: #10b981;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --font-heading: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* Background Animated Canvas & Ambient Glow */
#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  opacity: 0.6;
}

.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
}

.glow-1 {
  top: -15%;
  left: 20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, #4f46e5 0%, rgba(79, 70, 229, 0) 70%);
}

.glow-2 {
  top: 40%;
  right: -10%;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, #0891b2 0%, rgba(8, 145, 178, 0) 70%);
}

/* Navigation Header */
.site-header {
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 100;
  background: rgba(7, 9, 14, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
}

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

.brand-link {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
}

.brand-logo {
  width: 44px;
  height: 44px;
  filter: drop-shadow(0 2px 8px rgba(99, 102, 241, 0.4));
  transition: transform var(--transition-fast);
}

.brand-link:hover .brand-logo {
  transform: rotate(-6deg) scale(1.05);
}

.brand-title {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #ffffff;
  display: block;
}

.brand-highlight {
  color: var(--accent-cyan);
}

.brand-subtitle {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-dim);
  display: block;
  margin-top: -2px;
}

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

.nav-link {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 15px;
  transition: color var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
  color: #ffffff;
}

.github-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  font-weight: 600;
  font-size: 14px;
  transition: all var(--transition-fast);
}

.github-nav-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

/* Hero Section */
.hero-section {
  position: relative;
  z-index: 10;
  padding: 80px 24px 60px;
  text-align: center;
  max-width: 1000px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #a5b4fc;
  margin-bottom: 24px;
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 10px #38bdf8;
  animation: pulseDot 2s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.6; }
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(32px, 5.5vw, 58px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.5px;
  margin-bottom: 20px;
}

.gradient-text {
  background: linear-gradient(135deg, #38bdf8 0%, #818cf8 50%, #f472b6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  font-size: clamp(16px, 2vw, 19px);
  color: var(--text-muted);
  max-width: 760px;
  margin: 0 auto 36px;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 50px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 28px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all var(--transition-fast);
}

.btn-primary {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: #ffffff;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #7073ff 0%, #5d55fa 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 26px rgba(99, 102, 241, 0.55);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

/* Stats Row */
.stats-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(14, 19, 31, 0.85);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(12px);
  padding: 14px 28px;
  border-radius: var(--radius-lg);
  gap: 28px;
  flex-wrap: wrap;
}

.stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.1;
}

.stat-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-divider {
  width: 1px;
  height: 32px;
  background: var(--border-color);
}

/* Section Shared */
.section-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 24px 80px;
  position: relative;
  z-index: 10;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 20px;
}

.section-header.center {
  text-align: center;
  justify-content: center;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(26px, 3.5vw, 36px);
  font-weight: 800;
  color: #ffffff;
}

.section-subtitle {
  font-size: 15px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Toolbar & Category Filters */
.toolbar {
  display: flex;
  gap: 16px;
}

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

.search-icon {
  position: absolute;
  left: 14px;
  color: var(--text-dim);
  pointer-events: none;
}

#game-search {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  color: #ffffff;
  padding: 10px 16px 10px 42px;
  font-size: 14px;
  outline: none;
  width: 240px;
  transition: all var(--transition-fast);
}

#game-search:focus {
  width: 290px;
  border-color: var(--accent-primary);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.3);
}

.filter-pills {
  display: flex;
  gap: 10px;
  margin-bottom: 34px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.filter-pill {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.filter-pill:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #ffffff;
}

.filter-pill.active {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
  box-shadow: 0 2px 14px rgba(99, 102, 241, 0.4);
}

/* Games Showcase Grid */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 28px;
}

.game-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  transition: all var(--transition-normal);
  position: relative;
}

.game-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-glow);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45), 0 0 20px rgba(99, 102, 241, 0.15);
  background: var(--bg-card-hover);
}

.game-card.featured {
  border-color: rgba(99, 102, 241, 0.25);
}

.card-media {
  position: relative;
  width: 100%;
  height: 220px;
  overflow: hidden;
  background: #090c14;
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-normal);
}

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

.media-illustration {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.sparkle-theme {
  background: linear-gradient(135deg, #fda4af 0%, #f472b6 40%, #c084fc 100%);
}

.sparkle-logo-badge {
  width: 90px;
  height: 90px;
  filter: drop-shadow(0 6px 14px rgba(0,0,0,0.25));
  animation: floatBreathe 3s ease-in-out infinite alternate;
}

@keyframes floatBreathe {
  0% { transform: translateY(0) scale(1); }
  100% { transform: translateY(-8px) scale(1.03); }
}

.sparkle-stars {
  font-size: 18px;
  letter-spacing: 4px;
  margin-top: 10px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.card-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  backdrop-filter: blur(8px);
  z-index: 2;
}

.play-badge {
  background: rgba(16, 185, 129, 0.85);
  color: #ffffff;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.5);
}

.hub-badge {
  background: rgba(14, 165, 233, 0.85);
  color: #ffffff;
}

.upcoming-badge {
  background: rgba(245, 158, 11, 0.85);
  color: #ffffff;
}

.card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(7, 9, 14, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  backdrop-filter: blur(4px);
  transition: opacity var(--transition-fast);
  z-index: 3;
}

.game-card:hover .card-overlay {
  opacity: 1;
}

.btn-play-quick {
  background: #ffffff;
  color: #090d16;
  font-weight: 800;
  font-size: 14px;
  padding: 10px 22px;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 18px rgba(255, 255, 255, 0.4);
  transform: translateY(10px);
  transition: all var(--transition-fast);
}

.game-card:hover .btn-play-quick {
  transform: translateY(0);
}

.btn-play-quick:hover {
  transform: scale(1.06);
  background: #f8fafc;
}

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

.card-tags {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.tag {
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.tag-genre {
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.25);
}

.tag-tech {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-dim);
  border: 1px solid var(--border-color);
}

.card-title {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 8px;
}

.card-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 16px;
  flex: 1;
}

.card-highlights {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 18px;
  font-size: 12.5px;
  color: #cbd5e1;
  border-left: 2px solid var(--accent-primary);
}

.card-footer {
  display: flex;
  gap: 10px;
  margin-top: auto;
}

.btn-card-play {
  flex: 1;
  background: var(--accent-primary);
  color: #ffffff;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 14px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

.btn-card-play:hover {
  background: #4f46e5;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

.btn-card-github {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.btn-card-github:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
}

/* About Studio Section */
.about-section {
  background: rgba(11, 15, 25, 0.75);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  position: relative;
  z-index: 10;
}

.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 50px;
  align-items: center;
}

.section-tag {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent-cyan);
  display: inline-block;
  margin-bottom: 8px;
}

.about-text p {
  color: var(--text-muted);
  font-size: 16px;
  margin-bottom: 16px;
}

.about-points {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 24px;
}

.point-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.point-icon {
  font-size: 22px;
  background: rgba(255, 255, 255, 0.05);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  flex-shrink: 0;
}

.point-item strong {
  display: block;
  color: #ffffff;
  font-size: 15px;
  margin-bottom: 2px;
}

.point-item p {
  margin-bottom: 0;
  font-size: 13.5px;
}

.studio-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  text-align: center;
  backdrop-filter: blur(20px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.studio-logo-glow {
  width: 80px;
  height: 80px;
  margin: 0 auto 16px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 35px rgba(99, 102, 241, 0.4);
}

.studio-logo-glow img {
  width: 100%;
  height: 100%;
}

.studio-card h3 {
  font-family: var(--font-heading);
  font-size: 22px;
  color: #ffffff;
  margin-bottom: 6px;
}

.studio-card p {
  color: var(--text-dim);
  font-size: 14px;
  margin-bottom: 20px;
}

.studio-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.studio-badges span {
  font-size: 12px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  padding: 4px 12px;
  border-radius: var(--radius-full);
}

/* Tech Section */
.tech-section {
  position: relative;
  z-index: 10;
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 36px;
}

.tech-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 26px;
  transition: all var(--transition-fast);
}

.tech-card:hover {
  transform: translateY(-4px);
  border-color: rgba(99, 102, 241, 0.3);
}

.tech-icon {
  font-size: 28px;
  margin-bottom: 14px;
}

.tech-card h4 {
  font-family: var(--font-heading);
  font-size: 18px;
  color: #ffffff;
  margin-bottom: 8px;
}

.tech-card p {
  font-size: 13.5px;
  color: var(--text-muted);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-color);
  background: #05070a;
  position: relative;
  z-index: 10;
  padding: 50px 24px 30px;
}

.footer-container {
  max-width: 1280px;
  margin: 0 auto;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--border-color);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 18px;
  color: #ffffff;
}

.footer-logo {
  width: 32px;
  height: 32px;
}

.footer-desc {
  color: var(--text-dim);
  font-size: 13.5px;
  text-align: right;
}

.footer-desc a {
  color: var(--accent-cyan);
  text-decoration: none;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 24px;
  font-size: 13px;
  color: var(--text-dim);
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: #ffffff;
}

/* ==========================================================================
   INTERACTIVE IN-BROWSER GAME PLAYER MODAL
   ========================================================================== */
.game-player-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #030407;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease-in-out;
}

.game-player-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.player-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #0a0d16;
  padding: 10px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.player-btn-back {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border: 1px solid var(--border-color);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background var(--transition-fast);
}

.player-btn-back:hover {
  background: rgba(255, 255, 255, 0.16);
}

.player-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 16px;
  color: #ffffff;
  letter-spacing: 0.5px;
}

.player-actions {
  display: flex;
  gap: 8px;
}

.player-tool-btn {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  border: 1px solid var(--border-color);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 15px;
  text-decoration: none;
  transition: background var(--transition-fast);
}

.player-tool-btn:hover {
  background: rgba(255, 255, 255, 0.14);
}

.player-frame-wrapper {
  flex: 1;
  width: 100%;
  height: 100%;
  position: relative;
  background: #000000;
}

#game-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* Responsive Media Queries */
@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
  }

  .footer-desc {
    text-align: left;
  }
}

@media (max-width: 680px) {
  .nav-links .nav-link {
    display: none;
  }

  .hero-section {
    padding: 50px 16px 40px;
  }

  .stats-row {
    gap: 16px;
    padding: 12px 18px;
  }

  .stat-divider {
    display: none;
  }

  .games-grid {
    grid-template-columns: 1fr;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .toolbar {
    width: 100%;
  }

  #game-search {
    width: 100%;
  }

  #game-search:focus {
    width: 100%;
  }
}
