/* cards and jigsaw modal */

 :root {
            --primary-color: #818cf8;
            --primary-hover: #6366f1;
            --secondary-color: #22d3ee;
            --bg-dark: #0f172a;
            --bg-card: #1e293b;
            --text-primary: #f8fafc;
            --text-secondary: #cbd5e1;
            --border-color: #475569;
            --shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
            --gradient: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
        }
		
		 .play-button {
            width: 100%;
            padding: 0.875rem;
            background: var(--gradient);
            color: white;
            border: none;
            border-radius: 0.5rem;
            font-size: 1rem;
            font-weight: 600;
            cursor: pointer;
            transition: opacity 0.3s ease, transform 0.2s ease;
        }

        .play-button:hover {
            opacity: 0.9;
            transform: scale(1.02);
        }

        .play-button:focus {
            outline: 3px solid var(--secondary-color);
            outline-offset: 2px;
        }

        .play-button:active {
            transform: scale(0.98);
        }
		

        /* Game Overlay */
        .game-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%; 
            min-height: 100svh;
			height: auto;
            background: rgba(0, 0, 0, 0.95);
            z-index: 10000;
            opacity: 0;
            transition: opacity 0.3s ease;
        }


/* fallback for older browsers */
@supports not (height: 1svh) {
  .game-overlay {
    min-height: 100svh;
  }
}
        .game-overlay.active {
            display: block;
        }

        .game-overlay.visible {
            opacity: 1;
        }

        .game-container {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%; 
            min-height: 100svh;
            height: auto;
            display: flex;
            align-items: center;
            justify-content: center;
        }
		
		
	/* fallback for older browsers */
   @supports not (height: 1svh) {
  .game-container {
    min-height: 100svh;
  }
}	
	/* fallback for browsers that don’t support svh */
@supports not (height: 1svh) {
  .game-container {
    min-height: 100vh;
  }
}	

        .game-iframe {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            border: none;
            background: white;
        }

        /* Loading Spinner */
        .loading-container {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            text-align: center;
            color: white;
            z-index: 10;
        }

        .spinner {
            width: 60px;
            height: 60px;
            margin: 0 auto 1rem;
            border: 4px solid rgba(255, 255, 255, 0.2);
            border-top-color: var(--primary-color);
            border-radius: 50%;
            animation: spin 1s linear infinite;
        }

        @keyframes spin {
            to { transform: rotate(360deg); }
        }

        .loading-text {
            font-size: 1.125rem;
            color: #e2e8f0;
        }

        /* Close Button */
        .close-button {
            position: fixed;
            top: 2.5rem;
            right: 0.75rem;
            width: 50px;
            height: 50px;
            background: #dc2626;
            border: 2px solid #ef4444;
            border-radius: 50%;
            color: white;
            font-size: 1.5rem;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: background 0.3s ease, transform 0.2s ease;
            z-index: 10001;
            font-weight: bold;
        }

        .close-button:hover {
            background: #b91c1c;
            transform: scale(1.1);
        }

        .close-button:focus {
            outline: 3px solid #fbbf24;
            outline-offset: 2px;
        }
