:root { --bg-color: #0b0f19; --text-color: #f8fafc; --panel-bg: #111827; --btn-height: 80px; --btn-height-active: 100px; --font-family: "Inter", sans-serif; } .mock-form { background: var(--panel-bg); padding: 30px; border-radius: 12px; border: 1px solid #1f2937; } h2 { margin-top: 0; font-size: 1.2rem; margin-bottom: 2rem; } .input-group { margin-bottom: 2rem; display: flex; flex-direction: column; gap: 8px; } .input-group label { font-size: 0.9rem; color: #94a3b8; } .input-group input { background: #0f172a; border: 1px solid #334155; padding: 10px; color: white; border-radius: 6px; } .button-wrapper { width: 100%; } #runBtn { display: none; } /* Button Base Styles */ #gameBtn { position: relative; width: 100%; /* Full width */ height: var(--btn-height); border: none; border-radius: 8px; cursor: pointer; font-family: var(--font-family); font-size: 1.2rem; font-weight: 600; transition: height 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.3s; overflow: hidden; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); outline: none; display: flex; justify-content: center; align-items: center; -webkit-tap-highlight-color: transparent; } /* Active / Game State */ #gameBtn.active { height: var(--btn-height-active); /* Slight expansion */ background: #1e293b !important; cursor: default; } /* Text Transition */ .btn-text { transition: opacity 0.3s, transform 0.3s; display: block; } #gameBtn.active .btn-text { opacity: 0; transform: translateY(-20px); pointer-events: none; } .game-prevent-click-container { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: all; z-index: 1; } /* Game Container */ .game-container { position: absolute; top: 50%; left: 50%; width: min(248px, 90%); height: 100%; transform: translate(-50%, -50%); opacity: 0; pointer-events: none; transition: opacity 0.5s 0.2s; display: flex; justify-content: center; align-items: center; z-index: 10; } /* body:has(#gameBtn.active:focus) { height: 101% !important; overflow: hidden; .game-btn.active { padding: 20px; } } */ #gameBtn.active .game-container { opacity: 1; pointer-events: auto; } /* Pause Overlay */ #gameBtn.paused::after { content: "SPIEL PAUSIERT"; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.7); color: rgb(from var(--body-text-color) r g b / calc(alpha - 0.6)); display: flex; justify-content: center; align-items: center; font-weight: 800; font-size: 1.5rem; z-index: 100; letter-spacing: 2px; backdrop-filter: blur(2px); } /* Progress Bar */ #gameBtn .game-button-progress-bar { /* display: none; */ position: absolute; bottom: 0; left: 0; height: 4px; width: 100%; background: rgba(255, 255, 255, 0.1); z-index: 120; } .progress-fill { height: 100%; width: 0%; background-color: var(--primary-600); /* Use primary color for progress */ transition: width 0.1s linear; } .complete.error .progress-fill { background-color: var(--error-border-color); } /* Points Wrapper (Non-blocking) */ .points-wrapper { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); display: flex; align-items: center; gap: 15px; z-index: 30; opacity: 0; pointer-events: none; transition: opacity 0.3s; } #gameBtn.active:has(.simon-board) .points-wrapper, #gameBtn.active:has(#snakeCanvas) .points-wrapper { opacity: 1; pointer-events: none; } /* Completion Controls (Non-blocking) */ .completion-controls { position: absolute; right: 15px; top: 50%; transform: translateY(-50%); display: flex; align-items: center; gap: 15px; z-index: 120; opacity: 0; pointer-events: none; transition: opacity 0.3s; } #gameBtn.complete .completion-controls { opacity: 1; pointer-events: none; } .completion-text, .points-text-wrapper { font-size: 0.9rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; background: rgba(0, 0, 0, 0.4); padding: 4px 8px; border-radius: 4px; pointer-events: none; } .points-text { font-size: 0.6rem; } .completion-text { color: #10b981; /* Success Green */ } .complete.error .completion-text { color: var(--error-border-color); } .close-game-btn { background: rgba(255, 255, 255, 0.1); border: none; color: white; width: 32px; height: 32px; border-radius: 50%; display: flex; justify-content: center; align-items: center; pointer-events: all; cursor: pointer; transition: background 0.2s; } .close-game-btn:hover { background: rgba(239, 68, 68, 0.5); /* Red hover */ } /* GAME SPECIFICS */ .game-title { display: none; /* Hide title to save space */ } .game-over { animation: shake 0.82s cubic-bezier(0.36, 0.07, 0.19, 0.97); transform: translate3d(0, 0, 0); } /* Snake Canvas */ canvas#snakeCanvas { background: transparent; /* Border is optional, maybe remove for cleaner look? Keeping generic border for now */ border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 4px; image-rendering: pixelated; } /* Memory Grid */ .memory-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; height: 100%; align-content: center; } .memory-card { width: 32px; /* Smaller cards */ height: 32px; background: #334155; border-radius: 4px; cursor: pointer; display: flex; justify-content: center; align-items: center; font-size: 1rem; color: transparent; transition: transform 0.3s, background 0.3s; user-select: none; } .memory-card.flipped { /* background: var(--card-color, #e2e8f0); */ background: hsl(from var(--card-color) calc(h + 180) s l / calc(alpha - 0.6)); color: #0f172a; transform: rotateY(180deg); } /* Simon Game */ .simon-board { display: flex; /* Row layout */ justify-content: center; align-items: center; gap: 15px; width: 100%; height: 100%; } .simon-btn { width: 50px; height: 50px; border-radius: 12px; cursor: pointer; opacity: 0.3; transition: opacity 0.1s, transform 0.1s; background-color: currentColor; /* Use color from text-color trick or inline style */ } .simon-btn:active { transform: scale(0.95); } .simon-btn.lit { opacity: 1; box-shadow: 0 0 20px currentColor; transform: scale(1.05); } .simon-green { color: #4ade80; } .simon-red { color: #f87171; } .simon-yellow { color: #facc15; } .simon-blue { color: #60a5fa; } @keyframes tilt-shaking { 0% { transform: rotate(0deg); } 25% { transform: rotate(5deg); } 50% { transform: rotate(0eg); } 75% { transform: rotate(-5deg); } 100% { transform: rotate(0deg); } } @keyframes shake { 10%, 90% { transform: translate3d(-1px, 0, 0); } 20%, 80% { transform: translate3d(2px, 0, 0); } 30%, 50%, 70% { transform: translate3d(-4px, 0, 0); } 40%, 60% { transform: translate3d(4px, 0, 0); } }