/* Flippy 3D — CSS escopado do game (cores próprias do game preservadas).
   Layout de tela cheia via modo stage. */
.jg-flippy3d{position:absolute;inset:0;width:100%;height:100%;}
.jg-flippy3d canvas{background:transparent;box-shadow:none;border-radius:0;}

:root {
            --primary: #4CAF50;
            --primary-hover: #45a049;
            --bg-overlay: rgba(0, 0, 0, 0.85);
            --text-light: #ffffff;
        }
.jg-flippy3d * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            user-select: none;
            -webkit-tap-highlight-color: transparent;
        }
.jg-flippy3d canvas {
            display: block;
            width: 100%;
            height: 100%;
        }
.jg-flippy3d #ui-layer {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            z-index: 20;
        }
.jg-flippy3d .screen {
            background-color: var(--bg-overlay);
            padding: 2.5rem;
            border-radius: 1.25rem;
            text-align: center;
            color: var(--text-light);
            pointer-events: auto;
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            border: 1px solid rgba(255,255,255,0.1);
            box-shadow: 0 0.9375rem 2.5rem rgba(0,0,0,0.8);
            width: 90%;
            max-width: 23.75rem;
            display: none;
            flex-direction: column;
            gap: 1.2rem;
            transform: scale(0.95);
            opacity: 0;
            transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        }
.jg-flippy3d .screen.active {
            display: flex;
            transform: scale(1);
            opacity: 1;
        }
.jg-flippy3d h1 { font-size: clamp(2rem, 8vw, 2.8rem); text-transform: uppercase; letter-spacing: 0.125rem; margin-bottom: 0.5rem; color: #fff;}
.jg-flippy3d h2 { font-size: clamp(1.6rem, 6vw, 2.2rem); color: #FFC107; margin-bottom: 0.5rem;}
.jg-flippy3d .score-display {
            background: rgba(0,0,0,0.6);
            padding: 1rem;
            border-radius: 0.75rem;
            font-size: 1.4rem;
        }
.jg-flippy3d .score-display span { font-weight: bold; color: #FFC107; }
.jg-flippy3d #hud {
            position: absolute;
            top: 10%;
            width: 100%;
            text-align: center;
            pointer-events: none;
            z-index: 10;
        }
.jg-flippy3d #current-score {
            font-size: clamp(3rem, 14vw, 5.5rem);
            font-weight: 900;
            color: white;
            -webkit-text-stroke: 0.1875rem black;
            text-shadow: 0.25rem 0.25rem 0 #000;
            display: none;
            transition: transform 0.1s ease;
        }
.jg-flippy3d button {
            background-color: var(--primary);
            color: white;
            border: none;
            padding: 1.2rem;
            font-size: 1.2rem;
            font-weight: bold;
            border-radius: 0.75rem;
            cursor: pointer;
            transition: all 0.1s ease;
            text-transform: uppercase;
            letter-spacing: 0.0625rem;
            width: 100%;
            box-shadow: 0 0.375rem 0 var(--primary-hover);
        }
.jg-flippy3d button:active {
            transform: translateY(6px);
            box-shadow: 0 0 0 var(--primary-hover);
        }
.jg-flippy3d .btn-secondary {
            background-color: #546E7A;
            box-shadow: 0 0.375rem 0 #37474F;
        }
.jg-flippy3d .btn-secondary:active {
            box-shadow: 0 0 0 #37474F;
        }
.jg-flippy3d .settings-group { text-align: left; margin-bottom: 0.5rem; }
.jg-flippy3d .settings-group label { font-size: 0.85rem; color: #aaa; text-transform: uppercase; font-weight: bold; display: block; margin-bottom: 0.5rem;}
.jg-flippy3d .toggle-row {
            display: flex;
            background: rgba(0,0,0,0.5);
            border-radius: 0.625rem;
            padding: 0.25rem;
        }
.jg-flippy3d .toggle-btn {
            flex: 1;
            background: transparent;
            box-shadow: none;
            padding: 0.8rem 0;
            font-size: 0.9rem;
            border-radius: 0.5rem;
            color: #888;
            transition: 0.2s;
        }
.jg-flippy3d .toggle-btn:active { transform: none; }
.jg-flippy3d .toggle-btn.active {
            background: var(--primary);
            color: white;
            box-shadow: 0 0.125rem 0.3125rem rgba(0,0,0,0.3);
        }