/* ==========================================
   GIRLMINIGAMES – MAIN STYLESHEET
   ========================================== */
:root {
  --pink-100: #fff0f6; --pink-200: #ffc8dd; --pink-300: #ffafcc;
  --pink-400: #ff85a1; --pink-500: #e63980; --pink-600: #c9184a;
  --purple-100: #f0e6ff; --purple-200: #d4adfc; --purple-300: #c77dff;
  --purple-400: #9d4edd; --purple-500: #7b2d8b;
  --yellow-300: #ffe135; --yellow-400: #ffd700;
  --teal-400: #4cc9f0;
  --bg-main: #fff5fa; --bg-card: #ffffff;
  --text-dark: #2d1b3d; --text-mid: #5a3d6b; --text-light: #9580aa;
  --radius-sm: 10px; --radius-md: 16px; --radius-lg: 24px;
  --radius-xl: 32px; --radius-full: 999px;
  --shadow-sm: 0 2px 8px rgba(150,0,120,0.08);
  --shadow-md: 0 6px 24px rgba(150,0,120,0.12);
  --shadow-lg: 0 16px 48px rgba(150,0,120,0.18);
  --shadow-card: 0 4px 20px rgba(230,57,128,0.15);
  --nav-height: 70px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Nunito', system-ui, sans-serif;
  background: linear-gradient(180deg, #f7dbf4 0%, #f8e2f5 80px, #fbeaf7 180px, #fef1f9 340px, #fff5fa 550px, #fff5fa 100%);
  background-attachment: fixed;
  color: var(--text-dark);
  min-height: 100vh; overflow-x: hidden;
}
a { cursor: pointer; text-decoration: none; }
.hidden { display: none !important; }
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }

/* NAVBAR */
#navbar {
  position: sticky; top: 0; z-index: 1000;
  background: linear-gradient(135deg, #ff6eb4 0%, #c84bcc 50%, #7b2d8b 100%);
  box-shadow: 0 4px 20px rgba(200,24,74,0.3);
}
.nav-container {
  display: flex; align-items: center; gap: 16px;
  padding: 0 24px; height: var(--nav-height);
  max-width: 1400px; margin: 0 auto;
}
.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; flex-shrink: 0; }
.logo-icon { font-size: 28px; animation: spin-slow 8s linear infinite; }
@keyframes spin-slow { 100% { transform: rotate(360deg); } }
.logo-text { font-family: 'Pacifico', cursive; font-size: 22px; color: white; letter-spacing: -0.5px; text-shadow: 0 2px 8px rgba(0,0,0,0.2); }
.logo-accent { color: var(--yellow-300); }

/* Search */
.search-wrapper { position: relative; flex: 1; max-width: 380px; }
.search-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 16px; pointer-events: none; }
.search-bar {
  width: 100%; padding: 10px 14px 10px 40px;
  border: 2px solid rgba(255,255,255,0.3); border-radius: var(--radius-full);
  background: rgba(255,255,255,0.2); color: white;
  font-family: 'Nunito', sans-serif; font-size: 14px; font-weight: 600;
  backdrop-filter: blur(10px); transition: var(--transition); outline: none;
}
.search-bar::placeholder { color: rgba(255,255,255,0.7); }
.search-bar:focus { background: rgba(255,255,255,0.3); border-color: rgba(255,255,255,0.6); box-shadow: 0 0 0 3px rgba(255,255,255,0.2); }
.search-suggestions {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0;
  background: white; border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg); overflow: hidden; z-index: 100;
}
.search-suggestion-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  cursor: pointer; transition: var(--transition); font-size: 14px;
}
.search-suggestion-item:hover { background: var(--pink-100); }
.suggestion-thumb { width: 36px; height: 36px; border-radius: 8px; object-fit: cover; background: var(--pink-100); }
.suggestion-title { font-weight: 700; color: var(--text-dark); display: block; }
.suggestion-cat { font-size: 12px; color: var(--text-light); }

/* Category Tabs */
.category-tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; flex: 1; padding: 4px 0; }
.category-tabs::-webkit-scrollbar { display: none; }
.cat-tab {
  padding: 7px 14px; border-radius: var(--radius-full);
  border: 2px solid rgba(255,255,255,0.3); background: transparent;
  color: rgba(255,255,255,0.85); font-family: 'Nunito', sans-serif;
  font-size: 13px; font-weight: 700; cursor: pointer;
  white-space: nowrap; transition: var(--transition);
}
.cat-tab:hover, .cat-tab.active {
  background: white; color: var(--pink-500); border-color: white;
  transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Nav Actions */
.nav-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.btn-icon {
  background: rgba(255,255,255,0.2); border: 2px solid rgba(255,255,255,0.3);
  color: white; border-radius: var(--radius-full); padding: 7px 14px;
  cursor: pointer; font-size: 14px; font-weight: 700;
  font-family: 'Nunito', sans-serif; transition: var(--transition);
  position: relative; display: flex; align-items: center; gap: 4px;
}
.btn-icon:hover { background: rgba(255,255,255,0.35); transform: scale(1.05); }
.badge {
  position: absolute; top: -6px; right: -6px;
  background: var(--yellow-300); color: var(--text-dark);
  border-radius: 50%; width: 20px; height: 20px;
  font-size: 11px; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
}
.btn-auth {
  background: white; color: var(--pink-500); border: none;
  border-radius: var(--radius-full); padding: 9px 20px;
  font-family: 'Nunito', sans-serif; font-size: 14px; font-weight: 800;
  cursor: pointer; transition: var(--transition);
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}
.btn-auth:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.2); }
.btn-manage {
  background: linear-gradient(135deg, #ff4d8d, #7928ca);
  color: white; border: 1px solid rgba(255,255,255,0.4);
  border-radius: var(--radius-full); padding: 8px 16px;
  font-family: 'Nunito', sans-serif; font-size: 13px; font-weight: 800;
  text-decoration: none; cursor: pointer; transition: var(--transition);
  display: flex; align-items: center; gap: 6px;
  box-shadow: 0 4px 15px rgba(255, 77, 141, 0.35);
}
.btn-manage:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 6px 20px rgba(255, 77, 141, 0.5);
  color: #fff;
}
.backend-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700;
  padding: 4px 10px; border-radius: var(--radius-full);
  background: rgba(0,0,0,0.25); border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.9);
  cursor: default;
}
.backend-badge .status-dot {
  width: 7px; height: 7px; border-radius: 50%;
}
.backend-badge .status-dot.online {
  background: #10b981; box-shadow: 0 0 8px #10b981;
}
.backend-badge .status-dot.offline {
  background: #f59e0b;
}
.user-menu { position: relative; }
.user-avatar-btn {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.2); border: 2px solid rgba(255,255,255,0.4);
  border-radius: var(--radius-full); padding: 6px 14px;
  color: white; cursor: pointer; font-family: 'Nunito', sans-serif;
  font-weight: 700; font-size: 14px; transition: var(--transition);
}
.user-avatar-btn:hover { background: rgba(255,255,255,0.3); }
.user-avatar-icon { font-size: 20px; }
.user-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0;
  background: white; border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg); min-width: 160px;
  overflow: hidden; z-index: 200; animation: fadeInDown 0.2s ease;
}
.user-dropdown a {
  display: block; padding: 12px 16px; font-size: 14px;
  font-weight: 700; color: var(--text-dark); cursor: pointer; transition: var(--transition);
}
.user-dropdown a:hover { background: var(--pink-100); color: var(--pink-500); }
.hamburger {
  display: none; background: rgba(255,255,255,0.2);
  border: 2px solid rgba(255,255,255,0.3); color: white;
  border-radius: 10px; padding: 8px 12px; font-size: 20px; cursor: pointer;
}
.mobile-nav {
  display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 20px;
  background: rgba(255,255,255,0.1); border-top: 1px solid rgba(255,255,255,0.15);
}

/* PAGES */
.page { display: none; }
.page.active { display: block; }

/* HERO */
.hero-section { position: relative; height: 420px; overflow: hidden; }
.hero-carousel { display: flex; height: 100%; transition: transform 0.6s cubic-bezier(0.4,0,0.2,1); }
.hero-slide { min-width: 100%; height: 100%; position: relative; display: flex; align-items: center; overflow: hidden; }
.hero-slide-bg { position: absolute; inset: 0; background-size: cover; background-position: center; transform: scale(1.05); transition: transform 8s ease; }
.hero-slide-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.1) 100%); }
.hero-slide-content { position: relative; z-index: 2; padding: 0 80px; max-width: 600px; color: white; }
.hero-badge {
  display: inline-block; background: var(--yellow-300); color: var(--text-dark);
  padding: 4px 14px; border-radius: var(--radius-full);
  font-size: 12px; font-weight: 900; letter-spacing: 1px;
  margin-bottom: 12px; animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.05)} }
.hero-slide-content h1 { font-size: 42px; font-weight: 900; line-height: 1.1; margin-bottom: 12px; text-shadow: 0 2px 10px rgba(0,0,0,0.3); }
.hero-slide-content p { font-size: 16px; opacity: 0.9; margin-bottom: 24px; line-height: 1.5; }
.btn-hero-play {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, #ff6eb4, #e63980);
  color: white; border: none; border-radius: var(--radius-full);
  padding: 14px 32px; font-family: 'Nunito', sans-serif;
  font-size: 17px; font-weight: 800; cursor: pointer;
  transition: var(--transition); box-shadow: 0 6px 24px rgba(230,57,128,0.5);
}
.btn-hero-play:hover { transform: translateY(-3px) scale(1.05); box-shadow: 0 10px 32px rgba(230,57,128,0.6); }
.carousel-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,0.9); border: none; border-radius: 50%;
  width: 44px; height: 44px; font-size: 18px; cursor: pointer;
  transition: var(--transition); z-index: 10; box-shadow: var(--shadow-md); color: var(--pink-500);
}
.carousel-btn:hover { background: white; transform: translateY(-50%) scale(1.1); }
.carousel-btn.prev { left: 20px; }
.carousel-btn.next { right: 20px; }
.hero-dots { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 10; }
.hero-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.5); cursor: pointer; transition: var(--transition); }
.hero-dot.active { background: white; width: 24px; border-radius: 4px; }

/* DAILY CHALLENGE */
.daily-challenge { padding: 24px 0; }
.challenge-card {
  background: linear-gradient(135deg, #ff6eb4 0%, #c84bcc 60%, #7b2d8b 100%);
  border-radius: var(--radius-xl); padding: 28px 36px;
  display: flex; align-items: center; gap: 24px;
  box-shadow: 0 8px 32px rgba(200,75,204,0.4);
  position: relative; overflow: hidden;
}
.challenge-card::before { content: ''; position: absolute; top: -40px; right: -40px; width: 200px; height: 200px; background: rgba(255,255,255,0.08); border-radius: 50%; }
.challenge-card::after { content: ''; position: absolute; bottom: -60px; right: 100px; width: 150px; height: 150px; background: rgba(255,255,255,0.05); border-radius: 50%; }
.challenge-sparkles { font-size: 40px; animation: bounce 2s ease infinite; flex-shrink: 0; }
@keyframes bounce { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-10px)} }
.challenge-info { flex: 1; color: white; }
.challenge-label { display: inline-block; background: rgba(255,255,255,0.2); padding: 3px 12px; border-radius: var(--radius-full); font-size: 11px; font-weight: 800; letter-spacing: 1.5px; margin-bottom: 8px; }
.challenge-info h3 { font-size: 22px; font-weight: 800; margin-bottom: 4px; }
.challenge-info p { opacity: 0.85; font-size: 14px; }
.btn-play-challenge {
  background: white; color: var(--pink-600); border: none;
  border-radius: var(--radius-full); padding: 14px 28px;
  font-family: 'Nunito', sans-serif; font-size: 15px; font-weight: 800;
  cursor: pointer; transition: var(--transition); white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15); flex-shrink: 0;
}
.btn-play-challenge:hover { transform: scale(1.05); box-shadow: 0 8px 24px rgba(0,0,0,0.2); }

/* SECTIONS */
.section { padding: 40px 0; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.section-header h2 { font-size: 26px; font-weight: 900; color: var(--text-dark); }
.btn-see-all {
  background: var(--pink-100); color: var(--pink-500);
  border: 2px solid var(--pink-200); border-radius: var(--radius-full);
  padding: 8px 20px; font-family: 'Nunito', sans-serif;
  font-size: 13px; font-weight: 800; cursor: pointer; transition: var(--transition);
}
.btn-see-all:hover { background: var(--pink-500); color: white; border-color: var(--pink-500); }

/* GAME GRID */
.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; }

/* GAME CARD */
.game-card {
  background: white; border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-sm); transition: var(--transition);
  cursor: pointer; position: relative; border: 2px solid transparent;
}
.game-card:hover { transform: translateY(-6px) scale(1.02); box-shadow: var(--shadow-card); border-color: var(--pink-200); }
.game-card-thumb { position: relative; width: 100%; padding-bottom: 72%; overflow: hidden; background: linear-gradient(135deg, var(--pink-100), var(--purple-100)); }
.game-card-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.game-card:hover .game-card-thumb img { transform: scale(1.08); }
.game-card-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0); display: flex; align-items: center; justify-content: center; transition: var(--transition); }
.game-card:hover .game-card-overlay { background: rgba(0,0,0,0.3); }
.play-overlay-btn {
  background: linear-gradient(135deg, #ff6eb4, #e63980); color: white; border: none;
  border-radius: var(--radius-full); padding: 10px 22px;
  font-family: 'Nunito', sans-serif; font-size: 14px; font-weight: 800;
  opacity: 0; transform: scale(0.8); transition: var(--transition); pointer-events: none;
  box-shadow: 0 4px 16px rgba(230,57,128,0.5);
}
.game-card:hover .play-overlay-btn { opacity: 1; transform: scale(1); }
.cat-badge {
  position: absolute; top: 10px; left: 10px;
  background: rgba(0,0,0,0.5); backdrop-filter: blur(6px);
  color: white; border-radius: var(--radius-full); padding: 3px 10px;
  font-size: 11px; font-weight: 700;
}
.new-badge {
  position: absolute; top: 10px; left: 10px;
  background: linear-gradient(135deg, #ff6eb4, #e63980);
  color: white; border-radius: var(--radius-full); padding: 3px 10px;
  font-size: 11px; font-weight: 800; letter-spacing: 0.5px;
}
.fav-btn {
  position: absolute; top: 8px; right: 8px;
  background: rgba(255,255,255,0.9); border: none; border-radius: 50%;
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  font-size: 16px; cursor: pointer; transition: var(--transition);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.fav-btn:hover { transform: scale(1.2); background: white; }
.fav-btn.active { background: var(--pink-100); }
.game-card-info { padding: 12px 14px; }
.game-card-title { font-size: 14px; font-weight: 800; color: var(--text-dark); margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.game-card-meta { display: flex; align-items: center; justify-content: space-between; }
.game-stars { font-size: 12px; color: var(--yellow-400); letter-spacing: -1px; }
.game-plays { font-size: 11px; color: var(--text-light); font-weight: 600; }

/* CATEGORY SHOWCASE */
.category-showcase { padding: 40px 0; }
.category-showcase h2 { font-size: 26px; font-weight: 900; margin-bottom: 24px; }
.category-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; }
.category-card {
  background: white; border-radius: var(--radius-lg); padding: 28px 16px;
  text-align: center; cursor: pointer; transition: var(--transition);
  box-shadow: var(--shadow-sm); border: 2px solid transparent; overflow: hidden;
}
.category-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.cat-card-icon { font-size: 40px; margin-bottom: 10px; display: block; transition: transform 0.3s ease; }
.category-card:hover .cat-card-icon { transform: scale(1.2) rotate(-5deg); }
.cat-card-name { font-size: 14px; font-weight: 800; color: var(--text-dark); }
.cat-card-count { font-size: 12px; color: var(--text-light); margin-top: 4px; }
.cat-dress { border-color: #ffc8dd; background: linear-gradient(135deg, #fff5f8, #ffe4f0); }
.cat-cooking { border-color: #ffd6a5; background: linear-gradient(135deg, #fffaf0, #fff0d4); }
.cat-puzzle { border-color: #a2d2ff; background: linear-gradient(135deg, #f0f8ff, #e0f0ff); }
.cat-makeover { border-color: #cdb4db; background: linear-gradient(135deg, #fdf5ff, #f0e4ff); }
.cat-adventure { border-color: #b5ead7; background: linear-gradient(135deg, #f5fff8, #e0fff0); }
.cat-coloring { border-color: #fdffb6; background: linear-gradient(135deg, #fffff0, #fdffd6); }

/* TAGS */
.tags-section { padding: 0 0 40px; }
.tags-section h3 { font-size: 18px; font-weight: 800; margin-bottom: 16px; }
.tags-cloud { display: flex; flex-wrap: wrap; gap: 10px; }
.tag-pill {
  background: white; border: 2px solid var(--pink-200); color: var(--pink-500);
  border-radius: var(--radius-full); padding: 6px 16px;
  font-size: 13px; font-weight: 700; cursor: pointer; transition: var(--transition);
}
.tag-pill:hover { background: var(--pink-500); color: white; border-color: var(--pink-500); transform: scale(1.05); }

/* LISTING PAGE */
#listingPage { padding: 32px 0 60px; }
.listing-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.listing-header h1 { font-size: 30px; font-weight: 900; }
.sort-select {
  background: white; border: 2px solid var(--pink-200); border-radius: var(--radius-full);
  padding: 9px 20px; font-family: 'Nunito', sans-serif; font-size: 13px;
  font-weight: 700; color: var(--text-dark); cursor: pointer; outline: none; transition: var(--transition);
}
.sort-select:focus { border-color: var(--pink-500); }
.active-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.filter-chip {
  display: flex; align-items: center; gap: 6px;
  background: var(--pink-100); color: var(--pink-500);
  border: 2px solid var(--pink-200); border-radius: var(--radius-full);
  padding: 5px 14px; font-size: 13px; font-weight: 700;
}
.filter-chip button { background: none; border: none; cursor: pointer; font-size: 14px; color: var(--pink-500); padding: 0; }
.no-results { text-align: center; padding: 80px 20px; color: var(--text-light); }
.no-results-icon { font-size: 60px; display: block; margin-bottom: 16px; }
.no-results p { font-size: 18px; font-weight: 700; }

/* FAV + PROFILE */
#favoritesPage, #profilePage { padding: 40px 0 80px; }
#favoritesPage h1 { font-size: 30px; font-weight: 900; margin-bottom: 28px; }
.profile-card { background: white; border-radius: var(--radius-xl); padding: 40px; box-shadow: var(--shadow-md); max-width: 700px; margin: 0 auto; }
.profile-top { text-align: center; margin-bottom: 32px; }
.avatar-display { font-size: 72px; line-height: 1; margin-bottom: 12px; display: block; filter: drop-shadow(0 4px 12px rgba(230,57,128,0.3)); animation: float 3s ease-in-out infinite; }
@keyframes float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-8px)} }
.username-display { font-size: 24px; font-weight: 900; color: var(--text-dark); }
.profile-email { font-size: 14px; color: var(--text-light); margin-top: 4px; }
.avatar-picker-section { margin-bottom: 24px; }
.avatar-picker-section h3 { font-size: 16px; font-weight: 800; margin-bottom: 12px; color: var(--text-mid); }
.avatar-grid, .avatar-grid-small { display: flex; flex-wrap: wrap; gap: 10px; }
.avatar-option {
  font-size: 30px; width: 52px; height: 52px; border-radius: 50%;
  background: var(--pink-100); border: 3px solid transparent;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.avatar-option:hover { border-color: var(--pink-300); transform: scale(1.1); }
.avatar-option.selected { border-color: var(--pink-500); background: var(--pink-200); transform: scale(1.1); }
.avatar-grid-small .avatar-option { font-size: 22px; width: 40px; height: 40px; }
.profile-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 32px; padding-top: 32px; border-top: 2px solid var(--pink-100); }
.stat-card { text-align: center; background: linear-gradient(135deg, #fff5f8, #fce4f4); border-radius: var(--radius-md); padding: 20px 12px; border: 2px solid var(--pink-100); }
.stat-num { display: block; font-size: 36px; font-weight: 900; color: var(--pink-500); line-height: 1; margin-bottom: 6px; }
.stat-label { font-size: 13px; font-weight: 700; color: var(--text-mid); }

/* MODALS */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(30,0,50,0.7);
  backdrop-filter: blur(6px); z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px; animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from{opacity:0} to{opacity:1} }
@keyframes fadeInDown { from{opacity:0;transform:translateY(-10px)} to{opacity:1;transform:translateY(0)} }

.game-modal {
  background: white; border-radius: var(--radius-xl);
  width: 100%; max-width: 1100px; max-height: 90vh;
  display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 24px 80px rgba(0,0,0,0.4);
  animation: slideUp 0.3s cubic-bezier(0.4,0,0.2,1);
}
@keyframes slideUp { from{transform:translateY(30px);opacity:0} to{transform:translateY(0);opacity:1} }

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px;
  background: linear-gradient(135deg, #ff6eb4, #c84bcc);
  color: white; flex-shrink: 0;
}
.modal-game-info { display: flex; flex-direction: column; gap: 4px; }
.modal-cat-badge {
  display: inline-block; background: rgba(255,255,255,0.25);
  padding: 3px 12px; border-radius: var(--radius-full);
  font-size: 11px; font-weight: 800; letter-spacing: 1px; width: fit-content;
}
.modal-header h2 { font-size: 20px; font-weight: 900; }
.modal-header-actions { display: flex; gap: 8px; }
.modal-fav-btn, .modal-fullscreen-btn, .modal-close-btn {
  background: rgba(255,255,255,0.2); border: 2px solid rgba(255,255,255,0.3);
  color: white; border-radius: 50%; width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; cursor: pointer; transition: var(--transition);
}
.modal-fav-btn:hover, .modal-fullscreen-btn:hover, .modal-close-btn:hover { background: rgba(255,255,255,0.4); transform: scale(1.1); }
.modal-close-btn { font-weight: 800; }
.modal-body { display: flex; flex: 1; overflow: hidden; }
.game-frame-wrapper { flex: 1; background: #0a0a1a; position: relative; }
#gameFrame { width: 100%; height: 100%; border: none; display: block; }
.frame-loading {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  background: #0a0a1a; color: white; gap: 16px;
}
.loading-spinner {
  width: 48px; height: 48px; border: 4px solid rgba(255,255,255,0.1);
  border-top-color: var(--pink-300); border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { 100%{transform:rotate(360deg)} }
.frame-loading p { font-family: 'Nunito', sans-serif; font-weight: 700; }
.modal-sidebar {
  width: 240px; flex-shrink: 0; overflow-y: auto; padding: 20px;
  background: #fdf5ff; border-left: 2px solid var(--pink-100);
  display: flex; flex-direction: column; gap: 18px;
}
.modal-description { font-size: 13px; color: var(--text-mid); line-height: 1.6; }
.star-rating { font-size: 18px; color: var(--yellow-400); letter-spacing: -1px; }
.plays-count { font-size: 12px; color: var(--text-light); font-weight: 700; }
.like-dislike { display: flex; gap: 10px; }
.btn-like, .btn-dislike {
  flex: 1; padding: 8px; border-radius: var(--radius-md); border: 2px solid;
  font-family: 'Nunito', sans-serif; font-size: 13px; font-weight: 700;
  cursor: pointer; transition: var(--transition);
}
.btn-like { border-color: #b5ead7; background: #f0fff8; color: #2d9d6e; }
.btn-like:hover { background: #b5ead7; }
.btn-dislike { border-color: var(--pink-200); background: var(--pink-100); color: var(--pink-500); }
.btn-dislike:hover { background: var(--pink-200); }
.modal-tags-section h4, .related-games-section h4 { font-size: 13px; font-weight: 800; color: var(--text-mid); margin-bottom: 8px; }
.modal-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.modal-tag { background: var(--purple-100); color: var(--purple-400); border-radius: var(--radius-full); padding: 4px 10px; font-size: 11px; font-weight: 700; }
.related-games-list { display: flex; flex-direction: column; gap: 10px; }
.related-game-item {
  display: flex; gap: 10px; align-items: center; cursor: pointer;
  padding: 8px; border-radius: var(--radius-md); transition: var(--transition);
  background: white; border: 2px solid transparent;
}
.related-game-item:hover { border-color: var(--pink-200); background: var(--pink-100); }
.related-game-thumb { width: 48px; height: 36px; border-radius: 8px; object-fit: cover; flex-shrink: 0; background: var(--pink-100); }
.related-game-title { font-size: 12px; font-weight: 800; color: var(--text-dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.related-game-cat { font-size: 11px; color: var(--text-light); }

/* AUTH MODAL */
.auth-modal {
  background: white; border-radius: var(--radius-xl);
  width: 100%; max-width: 420px; padding: 32px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.4);
  animation: slideUp 0.3s ease; position: relative;
}
.auth-close-btn {
  position: absolute; top: 16px; right: 16px;
  background: var(--pink-100); border: none; border-radius: 50%;
  width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800; cursor: pointer; color: var(--pink-500); transition: var(--transition);
}
.auth-close-btn:hover { background: var(--pink-200); transform: scale(1.1); }
.auth-tabs { display: flex; background: var(--pink-100); border-radius: var(--radius-full); padding: 4px; margin-bottom: 28px; }
.auth-tab { flex: 1; padding: 10px; border-radius: var(--radius-full); border: none; background: transparent; font-family: 'Nunito', sans-serif; font-size: 14px; font-weight: 700; cursor: pointer; color: var(--text-mid); transition: var(--transition); }
.auth-tab.active { background: linear-gradient(135deg, #ff6eb4, #e63980); color: white; box-shadow: 0 2px 10px rgba(230,57,128,0.4); }
.auth-form { display: none; }
.auth-form.active { display: block; }
.auth-header { text-align: center; margin-bottom: 24px; }
.auth-emoji { font-size: 48px; display: block; margin-bottom: 8px; }
.auth-header h3 { font-size: 22px; font-weight: 900; color: var(--text-dark); }
.auth-header p { font-size: 14px; color: var(--text-light); margin-top: 4px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 800; color: var(--text-mid); margin-bottom: 6px; }
.form-input { width: 100%; padding: 12px 16px; border: 2px solid var(--pink-200); border-radius: var(--radius-md); font-family: 'Nunito', sans-serif; font-size: 14px; color: var(--text-dark); outline: none; transition: var(--transition); }
.form-input:focus { border-color: var(--pink-500); box-shadow: 0 0 0 3px rgba(230,57,128,0.1); }
.auth-error { background: #fff0f3; border: 2px solid #ffc8d4; color: #c9184a; border-radius: var(--radius-md); padding: 10px 14px; font-size: 13px; font-weight: 700; margin-bottom: 12px; }
.btn-auth-submit {
  width: 100%; padding: 14px;
  background: linear-gradient(135deg, #ff6eb4, #e63980);
  color: white; border: none; border-radius: var(--radius-full);
  font-family: 'Nunito', sans-serif; font-size: 16px; font-weight: 800;
  cursor: pointer; transition: var(--transition); box-shadow: 0 4px 16px rgba(230,57,128,0.4);
}
.btn-auth-submit:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(230,57,128,0.5); }
.auth-divider { text-align: center; margin: 16px 0; position: relative; color: var(--text-light); font-size: 13px; font-weight: 700; }
.auth-divider::before, .auth-divider::after { content: ''; position: absolute; top: 50%; width: calc(50% - 50px); height: 1px; background: var(--pink-200); }
.auth-divider::before { left: 0; }
.auth-divider::after { right: 0; }
.btn-guest { width: 100%; padding: 12px; background: var(--pink-100); color: var(--text-mid); border: 2px solid var(--pink-200); border-radius: var(--radius-full); font-family: 'Nunito', sans-serif; font-size: 14px; font-weight: 700; cursor: pointer; transition: var(--transition); }
.btn-guest:hover { background: var(--pink-200); color: var(--pink-600); }

/* FOOTER */
.footer { background: linear-gradient(135deg, #2d1b3d 0%, #1a0d2e 100%); color: rgba(255,255,255,0.8); padding: 60px 0 0; margin-top: 60px; }
.footer-container { max-width: 1280px; margin: 0 auto; padding: 0 24px 40px; display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 40px; }
.footer-logo { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.footer-logo-text { font-family: 'Pacifico', cursive; font-size: 22px; color: white; }
.footer-brand p { font-size: 14px; line-height: 1.6; opacity: 0.7; max-width: 240px; }
.social-links { display: flex; gap: 12px; margin-top: 16px; font-size: 24px; }
.footer-links-group h4 { font-size: 14px; font-weight: 900; color: white; margin-bottom: 16px; text-transform: uppercase; letter-spacing: 1px; }
.footer-links-group a { display: block; font-size: 14px; color: rgba(255,255,255,0.6); margin-bottom: 10px; cursor: pointer; transition: var(--transition); }
.footer-links-group a:hover { color: var(--pink-300); transform: translateX(4px); }
.footer-newsletter h4 { font-size: 14px; font-weight: 900; color: white; margin-bottom: 12px; text-transform: uppercase; letter-spacing: 1px; }
.footer-newsletter p { font-size: 13px; opacity: 0.7; margin-bottom: 16px; }
.newsletter-input { display: flex; gap: 8px; }
.newsletter-input input { flex: 1; padding: 10px 16px; border: 2px solid rgba(255,255,255,0.2); background: rgba(255,255,255,0.1); border-radius: var(--radius-full); color: white; font-family: 'Nunito', sans-serif; font-size: 13px; outline: none; transition: var(--transition); }
.newsletter-input input::placeholder { color: rgba(255,255,255,0.4); }
.newsletter-input input:focus { border-color: var(--pink-300); }
.newsletter-input button { background: linear-gradient(135deg, #ff6eb4, #e63980); color: white; border: none; border-radius: var(--radius-full); padding: 10px 18px; font-family: 'Nunito', sans-serif; font-size: 13px; font-weight: 800; cursor: pointer; transition: var(--transition); white-space: nowrap; }
.newsletter-input button:hover { transform: scale(1.05); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); text-align: center; padding: 20px 24px; font-size: 13px; color: rgba(255,255,255,0.4); }

/* TOAST */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--text-dark); color: white; padding: 12px 24px; border-radius: var(--radius-full); font-size: 14px; font-weight: 700; z-index: 9999; box-shadow: var(--shadow-lg); animation: toastIn 0.3s ease; white-space: nowrap; font-family: 'Nunito', sans-serif; }
@keyframes toastIn { from{transform:translateX(-50%) translateY(20px);opacity:0} to{transform:translateX(-50%) translateY(0);opacity:1} }

/* RESPONSIVE */
@media (max-width: 1024px) {
  .category-tabs { display: none; }
  .hamburger { display: flex; }
  .footer-container { grid-template-columns: 1fr 1fr; gap: 32px; }
  .modal-sidebar { width: 200px; }
}
@media (max-width: 768px) {
  .nav-container { gap: 10px; }
  .search-wrapper { max-width: 220px; }
  .hero-section { height: 280px; }
  .hero-slide-content { padding: 0 48px; }
  .hero-slide-content h1 { font-size: 26px; }
  .btn-hero-play { padding: 10px 22px; font-size: 14px; }
  .challenge-card { flex-direction: column; text-align: center; }
  .game-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
  .footer-container { grid-template-columns: 1fr; gap: 24px; }
  .modal-body { flex-direction: column; }
  .modal-sidebar { width: 100%; max-height: 300px; border-left: none; border-top: 2px solid var(--pink-100); }
  .game-modal { max-height: 95vh; }
}
@media (max-width: 480px) {
  .search-wrapper { display: none; }
  .game-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
  .category-cards { grid-template-columns: repeat(3, 1fr); }
  .hero-slide-content { padding: 0 32px; }
  .hero-slide-content h1 { font-size: 20px; }
  .profile-card { padding: 24px 16px; }
}

/* ==========================================
   BENTO POKI-STYLE SHOWCASE GRID (Screenshot Match)
   ========================================== */
.bento-portal-wrapper {
  background: transparent;
  padding: 24px 0 32px 0;
  position: relative;
  overflow: visible;
}

.bento-portal-wrapper::before {
  display: none;
}

.bento-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 10;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr) 210px;
  grid-auto-rows: minmax(170px, auto);
  gap: 14px;
  margin-bottom: 14px;
}

.bento-card {
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  background: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 6px 18px rgba(180, 80, 140, 0.12), 0 2px 6px rgba(0, 0, 0, 0.04);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  aspect-ratio: 1 / 1;
}

.bento-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 14px 28px rgba(210, 60, 140, 0.22);
  z-index: 20;
}

.bento-card.bento-wide {
  aspect-ratio: auto;
}

.bento-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.bento-card:hover .bento-thumb {
  transform: scale(1.06);
}

.bento-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,0.75) 100%);
  opacity: 0;
  transition: opacity 0.2s ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 14px;
  color: white;
}

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

.bento-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 14px;
  line-height: 1.2;
  text-shadow: 0 2px 6px rgba(0,0,0,0.8);
}

.bento-play-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  background: #ff4d8d;
  color: white;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 800;
  width: fit-content;
}

.bento-rating-pill {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  border-radius: 999px;
  padding: 4px 12px;
  color: #fbbf24;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 2px;
  pointer-events: none;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.bento-cat-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bento-cat-pill {
  background: #ffffff;
  border-radius: 18px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(200, 80, 150, 0.12), 0 2px 6px rgba(0,0,0,0.03);
  border: 1.5px solid rgba(255,255,255,0.95);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  flex: 1;
  min-height: 58px;
}

.bento-cat-pill:hover {
  transform: translateX(-4px) scale(1.02);
  box-shadow: 0 8px 22px rgba(230, 57, 128, 0.2);
  background: #fff0f7;
}

.bento-cat-pill .cat-icon-wrap {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #fdf2f8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.bento-cat-pill .cat-text {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 12px;
  color: #0f172a;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.bento-mini-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  flex: 1;
}

.bento-mini-card {
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(200, 80, 150, 0.12), 0 2px 6px rgba(0,0,0,0.03);
  border: 1.5px solid rgba(255,255,255,0.95);
  background: #fff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.bento-mini-card:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(230, 57, 128, 0.22);
}

.bento-mini-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bento-ribbon-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(95px, 1fr));
  gap: 12px;
  padding-top: 4px;
}

.ribbon-card {
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 4px 14px rgba(200, 80, 150, 0.12), 0 2px 6px rgba(0,0,0,0.03);
  border: 1.5px solid rgba(255,255,255,0.95);
  cursor: pointer;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ribbon-card:hover {
  transform: translateY(-4px) scale(1.06);
  box-shadow: 0 8px 20px rgba(230, 57, 128, 0.24);
  z-index: 10;
}

.ribbon-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ribbon-card .ribbon-title-tooltip {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0,0,0,0.75);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 4px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.ribbon-card:hover .ribbon-title-tooltip {
  opacity: 1;
}

@media (max-width: 1100px) {
  .bento-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .bento-cat-col {
    grid-column: 1 / -1;
    flex-direction: row;
    flex-wrap: wrap;
  }
}

@media (max-width: 650px) {
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .bento-ribbon-row {
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 8px;
  }
}
