:root {
    --primary-color: #4ecdc4;
    --secondary-color: #ff6b6b;
    --accent-color: #ffd93d;
    --bg-dark: #0a0a0a;
    --card-dark: #1a1a1a;
    --card-hover: #2d2d2d;
    --border-color: #333;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    --shadow-hover: 0 20px 50px rgba(78, 205, 196, 0.3);
    --transition-fast: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
.container {
    flex: 1;
}

html {
    scroll-behavior: smooth;
}

body {
    background: linear-gradient(135deg, var(--bg-dark) 0%, #111 100%);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    margin: 0;
    position: relative;
}

/* Animated background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(78, 205, 196, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 107, 107, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(255, 217, 61, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-20px) rotate(1deg); }
    66% { transform: translateY(-10px) rotate(-1deg); }
}

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

/* Header - FIXED */
.header {
    padding: clamp(20px, 5vw, 20px) 0;
    display: flex;
    align-items: flex-start;
    gap: clamp(20px, 5vw, 40px);
    position: sticky;
    top: 0;
    z-index: 1000; /* Increased z-index */

    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(78, 205, 196, 0.2);
}

.logo {
    display: block;
    flex-shrink: 0;
    transition: var(--transition-fast);
    border-radius: 20px;
    overflow: hidden;
    padding: 8px;
}

.logo img {
    width: clamp(60px, 15vw, 520px); /* FIXED: Proper responsive sizing */
    height: clamp(60px, 12vw, 120px);
    object-fit: contain;
    display: block;
    border-radius: 16px;
    transition: var(--transition-fast);
}

.logo:hover {
    transform: scale(1.08) rotate(2deg);
    box-shadow: 0 20px 50px rgba(78, 205, 196, 0.4);
}

.logo:hover img {
    transform: scale(1.05);
}

/* Main Content - FIXED */
.main-content {
    padding-top: clamp(100px, 15vw, 150px) 0; /* Added top padding to clear header */
    padding-bottom: clamp(30px, 8vw, 60px);
}

/* Game Grid - FIXED */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(clamp(160px, 18vw, 260px), 1fr)); /* Smaller base size */
    gap: clamp(12px, 3vw, 25px); /* Smaller gaps */
    padding: clamp(20px, 5vw, 40px) 0; /* Reduced padding */
}

.game-tile {
    aspect-ratio: 1;
    border: 2px solid var(--border-color);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition-slow);
    position: relative;
    overflow: hidden;
    text-align: center;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.game-tile span {
    font-size: clamp(14px, 2.5vw, 20px); /* Slightly smaller text */
    font-weight: 700;
    z-index: 2;
    position: relative;
}

/* Shine effect */
.game-tile::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255,255,255,0.2), 
        transparent
    );
    transition: left 0.7s;
}

.game-tile:hover::before {
    left: 100%;
}

.game-tile:hover {
  transform: translateY(-12px);        /* card rises */
  background-size: 115%;              /* image zooms from all sides */
  border-color: var(--primary-color);
  box-shadow: var(--shadow-hover);
}
        

.game-tile:active {
    transform: translateY(-8px) scale(0.98);
}

/* Responsive Design - FIXED */
@media (max-width: 1024px) {
    .grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 18px;
    }
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: clamp(20px, 8vw, 20px) 0;
    }
    
    .container {
        padding: 0 16px;
    }
    
    .main-content {
        padding-top: clamp(120px, 20vw, 160px) 0; /* Extra top padding for mobile */
    }
    
    .grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
        justify-items: center;
    }
    
    .game-tile {
        min-height: 150px;
    }
}

@media (max-width: 600px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .logo img {
        width: 300px;
        height: 80px;
    }
    
    .main-content {
        padding-top: clamp(100px, 25vw, 140px) 0;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }
    
    .grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .game-tile {
        border-radius: 20px;
    }
    
    .main-content {
        padding-top: clamp(90px, 28vw, 130px) 0;
    }
}

@media (max-width: 360px) {
    .grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .main-content {
        padding-top: clamp(80px, 30vw, 120px) 0;
    }
}

/* Landscape Mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
    }
    
    .main-content {
        padding-top: clamp(80px, 20vw, 120px) 0;
        padding-bottom: 20px;
    }
}

/* High DPI */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .game-tile {
        border-width: 1px;
    }
}

/* Accessibility */
.game-tile:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print styles */
@media print {
    body::before {
        display: none;
    }
    
    .game-tile {
        break-inside: avoid;
    }
}


.game-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  z-index: 2;
  position: relative;
}

.game-title {
  font-size: clamp(1rem, 2.2vw, 1.6rem);  /* scales nicely on mobile & desktop */
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;

  /* Gradient text */
  background: linear-gradient(135deg, var(--accent-color), var(--secondary-color));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 12px rgba(0, 0, 0, 0.8);
  mar
}


.play-button {
  padding: 8px 16px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: #000;
  font-weight: 600;
  cursor: pointer;
  margin-top: 80%;
  transition: var(--transition-fast);
}

.play-button:hover {
  transform: translateY(-2px);
}
@media (max-width: 768px) {
.play-button {
    margin-top: 50%;
}

}
@media (min-width:767px) and (max-width: 1024px) {
.play-button {
    margin-top: 40%;
}

}
/* remove title usage */
.game-title {
  display: none;
}

/* common background behavior */
.game-tile {
  position: relative;
  background-size: 100%;
  background-position: center center;
  background-repeat: no-repeat;
  border-radius: 24px;
  overflow: hidden;
  transform-origin: center center;
  transition: transform 0.35s ease, background-size 0.35s ease;
}


/* dark overlay for text/button readability */
.game-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7), rgba(0,0,0,0.1));
  z-index: 1;
}


/* keep content above overlay */
.game-content {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-direction: column;
  height: 100%;
  padding-bottom: 16px;
}

/* per‑game backgrounds (note: “assest” folder) */
.game-tile.snake {
  background-image: url("./assest/Snakegame.jpg");
}

.game-tile.memory {
  background-image: url("./assest/Memorygame.jpg");   /* use actual filename */
}

.game-tile.number {
  background-image: url("./assest/Numbergame.jpg");
}

.game-tile.buzzer {
  background-image: url("./assest/Buzzer.jpg");
}

.game-tile.flip {
  background-image: url("./assest/Flipthecard.jpg");
}

.game-tile.space {
  background-image: url("./assest/Spacerunner.jpg");
}

.game-tile.catch {
  background-image: url("./assest/Caughttheball.jpg");
}

.game-tile.crossword {
  background-image: url("./assest/Crossword.jpg");
}

/* button positioning (no huge margin-top hacks) */
.play-button {
  padding: 8px 16px;
  border-radius: 999px;
  border: none;
  color: #000;
  font-weight: 600;
  cursor: pointer;
}

/* optional: smaller screens tweak */
@media (max-width: 768px) {
  .game-content {
    padding-bottom: 10px;
  }
}
.footer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px 0;
    text-align: center;
}

.footer p {
    margin: 0;
    color: #888;
    font-size: 14px;
}