/* GameZone Custom CSS - Mobile First Design */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --primary-50: #eff6ff;
  --primary-100: #dbeafe;
  --primary-200: #bfdbfe;
  --primary-300: #93c5fd;
  --primary-400: #60a5fa;
  --primary-500: #3b82f6;
  --primary-600: #2563eb;
  --primary-700: #1d4ed8;
  --primary-800: #1e40af;
  --primary-900: #1e3a8a;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
  background-color: #111827;
  color: #ffffff;
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Container untuk mobile-first */
.container {
  max-width: 428px;
  margin: 0 auto;
  padding: 0 16px;
  width: 100%;
}

/* Header Sticky */
.sticky-header {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 428px;
  z-index: 50;
  background: rgba(17, 24, 39, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(55, 65, 81, 0.3);
}

/* Game Card Animations */
.game-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.game-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
}

.game-card:active {
  transform: translateY(0) scale(0.98);
}

.game-card .play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  opacity: 0;
}

.game-card:hover .play-overlay {
  background: rgba(0, 0, 0, 0.4);
  opacity: 1;
}

.game-card .play-button {
  width: 48px;
  height: 48px;
  background: rgba(59, 130, 246, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  transform: scale(0.8);
  transition: all 0.3s ease;
}

.game-card:hover .play-button {
  transform: scale(1);
  background: rgb(59, 130, 246);
}

/* Modal Styles */
.game-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  padding: 16px;
}

.game-modal-content {
  background: #1f2937;
  border-radius: 16px;
  width: 100%;
  max-width: 400px;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.game-iframe {
  width: 100%;
  aspect-ratio: 16/9;
  border: none;
  background: #374151;
}

/* Bottom Navigation */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 428px;
  z-index: 40;
  background: rgba(17, 24, 39, 0.95);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(55, 65, 81, 0.3);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px;
  gap: 4px;
  color: #9ca3af;
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
}

.nav-item.active {
  color: #3b82f6;
}

.nav-item:hover {
  color: #60a5fa;
}

/* Search Overlay */
.search-overlay {
  position: fixed;
  top: 64px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 428px;
  z-index: 45;
  background: rgba(17, 24, 39, 0.98);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(55, 65, 81, 0.3);
}

/* Menu Overlay */
.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.menu-content {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 428px;
  background: #1f2937;
  border-radius: 24px 24px 0 0;
  padding: 24px;
}

/* Notification Styles */
.notification {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 396px;
  z-index: 70;
  background: #059669;
  color: white;
  padding: 16px;
  border-radius: 12px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.notification.error {
  background: #dc2626;
}

.notification.warning {
  background: #d97706;
}

.notification.info {
  background: #2563eb;
}

/* Loading Spinner */
.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #374151;
  border-top: 4px solid #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Category Button Styles */
.category-btn {
  padding: 8px 16px;
  border-radius: 20px;
  background: #374151;
  color: #d1d5db;
  border: none;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.category-btn.active {
  background: #3b82f6;
  color: white;
}

.category-btn:hover {
  background: #4b5563;
}

.category-btn.active:hover {
  background: #2563eb;
}

/* Scrollbar Styles */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #374151;
}

::-webkit-scrollbar-thumb {
  background: #6b7280;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

/* Hide scrollbar for horizontal scroll */
.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

/* Ripple Effect */
.ripple {
  position: relative;
  overflow: hidden;
}

.ripple::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.ripple:active::before {
  width: 300px;
  height: 300px;
}

/* Fade In Animation */
.fade-in {
  animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Slide Up Animation */
.slide-up {
  animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(100%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Pulse Animation */
.pulse {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* Ad Container */
.ad-container {
  background: #374151;
  text-align: center;
  color: #9ca3af;
  font-size: 14px;
}

/* Safe Area for iOS */
.safe-top {
  padding-top: env(safe-area-inset-top);
}

.safe-bottom {
  padding-bottom: env(safe-area-inset-bottom);
}

/* Touch Feedback */
.touch-feedback {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

/* Landscape Mode Adjustments */
@media screen and (orientation: landscape) and (max-height: 500px) {
  .sticky-header {
    height: 56px;
  }
  
  .bottom-nav {
    height: 56px;
  }
  
  .nav-item {
    padding: 6px;
    gap: 2px;
  }
  
  .nav-item span {
    font-size: 10px;
  }
}

/* Larger Mobile Screens */
@media (min-width: 428px) {
  .container {
    max-width: 100%;
    padding: 0 10px;
  }
  
  .sticky-header,
  .bottom-nav,
  .search-overlay,
  .menu-content {
    max-width: 100%;
  }
}

/* Tablet Adjustments */
@media (min-width: 768px) {
  .container {
    max-width: 500px;
  }
  
  .sticky-header,
  .bottom-nav,
  .search-overlay,
  .menu-content {
    max-width: 500px;
  }
  
  .game-modal-content {
    max-width: 600px;
  }
}

/* Desktop Adjustments - Still Mobile Style */
@media (min-width: 1024px) {
  .container {
    max-width: 600px;
  }
  
  .sticky-header,
  .bottom-nav,
  .search-overlay,
  .menu-content {
    max-width: 600px;
  }
  
  .game-modal-content {
    max-width: 800px;
  }
}

/* Focus Styles for Accessibility */
button:focus,
.nav-item:focus,
.game-card:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  .game-card {
    border: 2px solid #ffffff;
  }
  
  .nav-item {
    border: 1px solid transparent;
  }
  
  .nav-item.active {
    border-color: #3b82f6;
  }
}

