@font-face {
  font-family: 'Fredoka';
  font-style: normal;
  font-weight: 400;
  font-stretch: normal;
  font-display: swap;
  src: url('fonts/fredoka-400.ttf') format('truetype');
}
@font-face {
  font-family: 'Fredoka';
  font-style: normal;
  font-weight: 700;
  font-stretch: normal;
  font-display: swap;
  src: url('fonts/fredoka-700.ttf') format('truetype');
}

:root {
  --font-main: 'Fredoka', system-ui, -apple-system, sans-serif;
  --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #311042 100%);
  --text-light: #ffffff;
  --text-muted: #94a3b8;
  --primary: #9b5de5;
  --success: #00f5d4;
  --radius-lg: 24px;
  --radius-md: 16px;
  --shadow-lg: 0 15px 35px rgba(0, 0, 0, 0.4);
  --transition-bounce: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-main);
  background: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text-light);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  overflow-x: hidden;
  position: relative;
}

/* Floating stars background */
body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(white, rgba(255,255,255,.2) 2px, transparent 30px),
    radial-gradient(white, rgba(255,255,255,.15) 1px, transparent 20px);
  background-size: 350px 350px, 200px 200px;
  background-position: 0 0, 40px 60px;
  opacity: 0.3;
  z-index: -1;
  pointer-events: none;
}

.container {
  width: 100%;
  max-width: 1000px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3rem;
  text-align: center;
}

/* Title Block */
.header-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.logo-badge {
  font-size: 4rem;
  animation: float 4s ease-in-out infinite;
  filter: drop-shadow(0 0 15px var(--primary));
}

h1 {
  font-size: 2.8rem;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 0 20px rgba(155, 93, 229, 0.4), 2px 2px 0px rgba(0, 0, 0, 0.4);
  letter-spacing: 0.5px;
  line-height: 1.2;
}

.subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 550px;
  line-height: 1.6;
}

/* Games Cards Grid */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  width: 100%;
  padding: 1rem;
}

.game-card {
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  backdrop-filter: blur(15px);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  text-decoration: none;
  color: var(--text-light);
  transition: var(--transition-bounce);
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.game-card:hover {
  transform: translateY(-12px) scale(1.03);
  background: rgba(30, 41, 59, 0.7);
}

/* Glow highlights for specific cards */
.game-card.math-card:hover {
  border-color: #fee440;
  box-shadow: 0 15px 40px rgba(254, 228, 64, 0.15);
}

.game-card.space-card:hover {
  border-color: var(--success);
  box-shadow: 0 15px 40px rgba(0, 245, 212, 0.15);
}

.game-card.clock-card:hover {
  border-color: #a29bfe;
  box-shadow: 0 15px 40px rgba(162, 155, 254, 0.2);
}

.game-card.vr-card:hover {
  border-color: #00f5d4;
  box-shadow: 0 15px 40px rgba(0, 245, 212, 0.25);
}

.game-card.mystery-card {
  opacity: 0.6;
  cursor: not-allowed;
  border-style: dashed;
}

.game-card.mystery-card:hover {
  transform: none;
  background: rgba(30, 41, 59, 0.5);
  box-shadow: var(--shadow-lg);
}

.card-icon {
  font-size: 5.5rem;
  transition: var(--transition-bounce);
  filter: drop-shadow(0 8px 10px rgba(0,0,0,0.3));
}

.game-card:hover .card-icon {
  transform: scale(1.1) rotate(5deg);
}

.game-card.space-card:hover .card-icon {
  animation: spinSlow 15s linear infinite;
}

.card-title {
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.3;
}

.math-card .card-title {
  color: #fee440;
}

.space-card .card-title {
  color: var(--success);
}

.clock-card .card-title {
  color: #a29bfe;
}

.vr-card .card-title {
  color: #00f5d4;
}

.card-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.5;
  flex-grow: 1;
}

.launch-btn {
  width: 100%;
  padding: 0.9rem 1.5rem;
  border-radius: 50px;
  font-family: var(--font-main);
  font-size: 1.15rem;
  font-weight: 700;
  border: none;
  color: white;
  background: var(--primary);
  box-shadow: 0 4px 0 var(--primary);
  transition: var(--transition-bounce);
  cursor: pointer;
}

.math-card .launch-btn {
  background: #e6c300;
  box-shadow: 0 4px 0 #b39800;
}
.math-card:hover .launch-btn {
  transform: translateY(-3px);
  box-shadow: 0 7px 0 #998100;
}

.space-card .launch-btn {
  background: #00cca8;
  box-shadow: 0 4px 0 #00997e;
}
.space-card:hover .launch-btn {
  transform: translateY(-3px);
  box-shadow: 0 7px 0 #008069;
}

.clock-card .launch-btn {
  background: #6c5ce7;
  box-shadow: 0 4px 0 #5b4bc4;
}
.clock-card:hover .launch-btn {
  transform: translateY(-3px);
  box-shadow: 0 7px 0 #4c3db5;
}

.vr-card .launch-btn {
  background: #8e44ad;
  box-shadow: 0 4px 0 #732d91;
}
.vr-card:hover .launch-btn {
  transform: translateY(-3px);
  box-shadow: 0 7px 0 #5b1d75;
}

.mystery-card .launch-btn {
  background: #475569;
  box-shadow: none;
  color: #94a3b8;
  cursor: not-allowed;
}

/* Keyframes */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-12px); }
}

@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
