     :root{
            --board-size: 360px;
            --grid: 3;
            --gap: 8px;
            --piece-radius: 12px;
            --yellow-primary: #FFD700; 
            --yellow-light: #FFFACD;    
            --yellow-dark: #FFD700;     
            --yellow-accent: #FFEA00;   
            --yellow-muted: #F5DEB3;    
        }

        body {
            font-family: 'Comic Neue', cursive;
            margin: 0;
            padding: 0;
            color: var(--cor-texto);
            background-color: #f5f5f5;
            line-height: 1.6;
        }
        

            .game-footer {
            background: #f9f9f9;
            padding: 20px;
            border-top: 1px solid #eee;
        }

        .details-container {
            margin-bottom: 20px;
        }

        details {
            background: white;
            border-radius: 10px;
            padding: 15px;
            margin-bottom: 15px;
            box-shadow: 0 2px 5px rgba(0,0,0,0.05);
        }

        summary {
            font-weight: 600;
            cursor: pointer;
            outline: none;
            color: #e4d506;
        }

        .details-content {
            margin-top: 10px;
            color: #555;
            line-height: 1.5;
        }

        .container-meio{
            margin:0; padding:24px;
      
            background: #fff;
            display:flex; align-items:center; justify-content:center;
            min-height:100vh;
        }
        .game{
            width:min(95vw, 980px);
           background: linear-gradient(135deg,#FFFDE7,#FFF9C4);
            border-radius:20px;
            box-shadow:0 10px 30px rgba(0,0,0,.08);
            overflow:hidden;
            border: 2px solid var(--yellow-dark);
        }
        .game__header{
            padding:18px 22px; text-align:center; color:#333;
            background: linear-gradient(90deg, var(--yellow-primary), var(--yellow-accent));
            border-bottom: 2px solid var(--yellow-dark);
        }
        .game__header h1{ margin:0; font-size:24px; font-weight:700; }
        .game__content{ 
            display:grid; 
            grid-template-columns: 1fr auto; 
            gap:24px; 
            padding:24px; 
        }

        /* Tabuleiro */
        .board{
            width:var(--board-size); height:var(--board-size);
            display:grid;
            grid-template-columns: repeat(var(--grid), 1fr);
            grid-template-rows: repeat(var(--grid), 1fr);
            gap:var(--gap); padding:var(--gap);
            background: var(--yellow-light);
            border:2px dashed rgba(255, 215, 0, 0.5);
            border-radius:16px; margin:auto;
            background-size: var(--board-size) var(--board-size);
            background-position:center;
            background-repeat:no-repeat;
            opacity:2;
            background-blend-mode: multiply;
            background-color: rgba(255,255,255,0.7);
        }
        .slot{
            border-radius:var(--piece-radius);
            background: rgba(255, 250, 205, 0.7);
            position:relative;
            overflow:hidden;
            display:flex; align-items:center; justify-content:center;
            transition: all 0.2s;
            border: 1px solid rgba(255, 215, 0, 0.3);
        }
        .slot.highlight{ 
            background:rgba(255, 235, 0, 0.7); 
            box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
        }

        /* Peças */
        .tray{ 
            min-width: 260px; 
            display:flex; 
            flex-wrap:wrap; 
            gap:10px; 
            padding:10px;
            background: var(--yellow-light);
            border-radius: 12px;
            align-content: flex-start;
            border: 1px solid var(--yellow-muted);
        }
        .piece{
            width: calc((var(--board-size) - (var(--gap) * (var(--grid) + 1))) / var(--grid));
            height: calc((var(--board-size) - (var(--gap) * (var(--grid) + 1))) / var(--grid));
            box-shadow: 0 4px 10px rgba(0,0,0,.12);
            background-size: var(--board-size) var(--board-size);
            background-repeat:no-repeat;
            cursor:grab; 
            user-select:none;
            position: relative;
            transition: transform 0.2s;
            border-radius: 10px;
            border: 1px solid var(--yellow-dark);
            background-color: var(--yellow-muted);
        }
        .piece:active{ 
            cursor:grabbing; 
            transform: scale(1.05);
            z-index: 10;
            box-shadow: 0 0 15px var(--yellow-accent);
        }

        /* Painel lateral */
        .panel{ 
            min-width: 260px; 
            display:flex; 
            flex-direction:column; 
            gap:14px; 
        }
        .controls-row { 
            display:flex; 
            gap:10px; 
            flex-wrap:wrap; 
            align-items:center;
            justify-self: center;
            background: var(--yellow-light);
            padding: 14px;
            border-radius: 12px;
            border: 1px solid var(--yellow-muted);
        }
        .btn{
            border:0; border-radius:999px;
            padding:10px 16px; font-weight:600; cursor:pointer;
            background: linear-gradient(135deg, var(--yellow-primary), var(--yellow-accent)); 
            color:#333;
            box-shadow:0 4px 10px rgba(255, 215, 0, 0.3);
            font-size: 14px;
            white-space: nowrap;
            transition: all 0.3s;
        }
        .btn:hover {
            background: linear-gradient(135deg, var(--yellow-accent), var(--yellow-primary));
            transform: translateY(-2px);
        }
        .btn-outline{ 
            background:#ffff; 
            color: rgb(0, 0, 0); 
            border:2px solid var(--yellow-dark); 
            box-shadow: none;
            font-family: 'Comic Neue', cursive;
            border-radius: 10px;
        }
        .btn-outline:hover { 
            background: var(--yellow-accent); 
            color: #000000ff; 
            border:2px solid var(--yellow-accent); 
        }
        .btn-voltar{ 
            background: var(--yellow-primary); 
            color: #333; 
            border:2px solid var(--yellow-dark); 
            box-shadow: none;
            text-decoration: none;
            font-family: 'Comic Neue', cursive;
        }
        .btn-voltar:hover { 
            background: var(--yellow-accent); 
            color: #333333ff; 
            border:2px solid var(--yellow-primary); 
            font-family: 'Comic Neue', cursive;
        }
        select.btn-outline { 
            padding: 8px 16px; 
            border-radius: 999px;
            border: 2px solid var(--yellow-dark);
            background: #fff;
            color: #333;
            font-weight: 600;
            cursor: pointer;
            min-width: 120px;
        }
        select.btn-outline:hover {
            border: 2px solid var(--yellow-accent);
        }

           .upload-container {
            display: flex;
            flex-direction: column;
            gap: 10px;
            padding: 10px;
            background: rgba(255, 255, 255, 0.7);
            border-radius: 10px;
            margin-bottom: 10px;
            font-family: 'Comic Neue', cursive;
        }
        .upload-btn {
            position: relative;
            overflow: hidden;
            display: inline-block;
        }
        .upload-btn input[type="file"] {
            position: absolute;
            left: 0;
            font-family: 'Comic Neue', cursive;
            top: 0;
            opacity: 0;
            width: 100%;
            height: 100%;
            cursor: pointer;
        }

        /* Mensagem (ganhou) */
        .overlay{
            position:fixed; inset:0; background:rgba(0,0,0,.7);
            display:flex; align-items:center; justify-content:center;
            opacity:0; visibility:hidden; transition:.2s; z-index:1000;
            font-family: 'Comic Neue', cursive;
        }
        .overlay.active{ opacity:1; visibility:visible; }
        .modal{
            background:#fff; border-radius:18px; padding:28px;
            font-family: 'Comic Neue', cursive;
            width:min(420px, 90vw); text-align:center;
            box-shadow:0 10px 30px rgba(0,0,0,.35);
            border: 3px solid var(--yellow-primary);
        }
        .modal .emoji{ font-size:56px; margin-bottom:10px; color: var(--yellow-accent); }
        .modal .title{ font-size:20px; font-weight:700; color: var(--yellow-dark); }

     
        .confetti {
            position: absolute;
            width: 10px;
            height: 10px;
            background: #FFD600;
            top: -10px;
            opacity: 0.8;
            z-index: 1000;
            border-radius: 2px;
        }
        
        @keyframes talk {
            0% { transform: scale(1); }
            100% { transform: scale(1.05); }
        }
        
        @keyframes mouth-move {
            0% { height: 4px; }
            100% { height: 8px; }
        }
        
        @keyframes confetti-fall {
            0% {
                transform: translateY(0) rotate(0deg);
                opacity: 1;
            }
            100% {
                transform: translateY(100vh) rotate(360deg);
                opacity: 0;
            }
        }