
    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }

    body {
      font-family: 'Poppins', sans-serif;
      /* Fundo com tons de banana (amarelo → âmbar → verde suave) */
      background: linear-gradient(135deg, #fff8e1 0%, #fff3b0 45%, #f6f4d6 100%);
      min-height: 100vh;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 20px;
      overflow-x: hidden;
      position: relative;
    }

    body::before {
      content: '';
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: 
        radial-gradient(circle at 20% 50%, rgba(255, 243, 200, 0.25) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 224, 102, 0.18) 0%, transparent 50%);
      animation: float 20s ease-in-out infinite;
      pointer-events: none;
    }

    @keyframes float {
      0%, 100% { transform: translateY(0px); }
      50% { transform: translateY(-20px); }
    }

    .container {
      width: 100%;
      max-width: 1100px;
      animation: fadeIn 0.8s ease;
      position: relative;
      z-index: 1;
    }

    @keyframes fadeIn {
      from { opacity: 0; transform: translateY(-30px) scale(0.95); }
      to { opacity: 1; transform: translateY(0) scale(1); }
    }

    .button-group {
      display: flex;
      gap: 15px;
      justify-content: center;
      margin-top: 20px;
    }

    .btn-back {
      position: absolute;
      top: 12px;
      left: 12px; /* mover para canto superior esquerdo */
      right: auto;
      z-index: 60;
      font-size: 0.8em; /* menor */
      padding: 6px 8px; /* mais compacto */
      min-width: 38px;
      height: 34px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      background-color: rgba(255, 243, 186, 0.95);
      border: 2px solid rgba(255, 193, 7, 0.18);
      color: #5d4037;
      font-weight: 800;
      border-radius: 8px;
    }

    .btn-back:hover {
      background-color: rgba(255, 243, 186, 0.95);
    }

    .learn-content {
      padding: 20px;
      margin-top: 30px;
    }

    .learn-content h2 {
      text-align: center;
      margin-bottom: 30px;
      color: #fff;
    }

    .tip-section {
      background: rgba(255, 255, 255, 0.1);
      padding: 15px;
      border-radius: 10px;
      margin-bottom: 20px;
    }

    .tip-section h3 {
      color: #fff;
      margin-bottom: 10px;
      font-size: 1.2em;
    }

    .tip-section p {
      color: rgba(255, 255, 255, 0.9);
      line-height: 1.5;
    }

    .topbar {
      background: linear-gradient(135deg, rgba(255, 249, 196, 0.98) 0%, rgba(255, 243, 186, 0.95) 100%);
      backdrop-filter: blur(14px);
      padding: 30px 35px;
      border-radius: 25px 25px 0 0;
      box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
      display: flex;
      justify-content: space-between;
      align-items: center;
      border-bottom: 4px solid #ffca28; /* âmbar */
    }

    h1 {
      font-size: 32px;
      font-weight: 900;
      /* Texto com gradiente banana */
      background: linear-gradient(135deg, #ffecb3 0%, #ffd54a 50%, #ffb300 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
      display: flex;
      align-items: center;
      gap: 10px;
    }

    #record {
      background: linear-gradient(135deg, #ffd54a 0%, #ffb300 100%);
      color: #5d4037;
      padding: 12px 24px;
      border-radius: 30px;
      font-weight: 700;
      font-size: 16px;
      box-shadow: 0 8px 20px rgba(255, 193, 7, 0.25);
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .card {
      background: linear-gradient(180deg, #fffdf3 0%, #fff9e6 100%);
      backdrop-filter: blur(10px);
      padding: 45px;
      border-radius: 0 0 25px 25px;
      position: relative; /* garante que .btn-back seja posicionado dentro do card */
      overflow: visible;
      box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
      transition: all 0.3s ease;
    }

    .hidden {
      display: none;
    }

    .controls {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
      gap: 25px;
      margin-bottom: 35px;
    }

    .controls > div {
      display: flex;
      flex-direction: column;
      gap: 10px;
    }

    label {
      font-weight: 700;
      color: #8d6e2f; /* castanho suave para contraste */
      font-size: 15px;
      display: flex;
      align-items: center;
      gap: 6px;
    }

    select {
      padding: 14px 18px;
      border: 3px solid #ffcc80;
      border-radius: 15px;
      font-family: 'Poppins', sans-serif;
      font-size: 16px;
      background: white;
      color: #333;
      cursor: pointer;
      transition: all 0.3s ease;
      font-weight: 600;
    }

    select:hover {
      border-color: #ffb300;
      box-shadow: 0 5px 20px rgba(255, 193, 7, 0.18);
      transform: translateY(-2px);
    }

    select:focus {
      outline: none;
      border-color: #764ba2;
      box-shadow: 0 5px 25px rgba(102, 126, 234, 0.5);
    }

    .btn {
      padding: 18px 45px;
      background: linear-gradient(135deg, #ffd54a 0%, #ffb300 100%);
      color: #5d4037;
      border: none;
      border-radius: 15px;
      font-family: 'Poppins', sans-serif;
      font-size: 18px;
      font-weight: 700;
      cursor: pointer;
      transition: all 0.3s ease;
      box-shadow: 0 10px 25px rgba(255, 193, 7, 0.25);
      width: 100%;
      text-transform: uppercase;
      letter-spacing: 1px;
    }

    .btn:hover {
      transform: translateY(-3px) scale(1.02);
      box-shadow: 0 15px 35px rgba(102, 126, 234, 0.6);
    }

    .btn:active {
      transform: translateY(0);
    }

    .game-area {
      margin-bottom: 35px;
    }

    .display-container {
      position: relative;
      background: linear-gradient(180deg, #fffaf0 0%, #fff6e0 100%);
      padding: 60px 40px;
      border-radius: 20px;
      min-height: 180px;
      margin-bottom: 25px;
      border: 4px solid #ffcc80;
      box-shadow: 0 10px 30px rgba(255, 193, 7, 0.12), inset 0 2px 8px rgba(255, 224, 102, 0.06);
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .display-text {
      font-size: 48px;
      font-weight: 700;
      text-align: center;
      letter-spacing: 14px;
      position: relative;
      z-index: 1;
      line-height: 1.6;
      margin-top: 25px;
      color: #6b4f01; /* tom escuro para as letras principais */
      text-shadow: 1px 1px 0 rgba(255,255,255,0.6);
    }

    .letter {
      display: inline-block;
      position: relative;
      margin: 0 8px;
      transition: all 0.2s ease;
      color: #8d6e2f;
      text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.06);
    }

    .letter.current {
      color: #5d4037;
      transform: scale(1.4);
      text-shadow: 0 0 18px rgba(255, 193, 7, 0.5);
      animation: pulse 0.6s ease infinite;
    }

    .letter.typed {
      color: #558b2f; /* verde para sucesso */
      transform: scale(0.95);
      text-shadow: 0 0 8px rgba(85,139,47,0.25);
    }

    .letter.wrong {
      color: #ff5252;
      animation: shake 0.4s ease;
      text-shadow: 0 0 10px rgba(255, 82, 82, 0.5);
    }

    @keyframes pulse {
      0%, 100% { transform: scale(1.4); }
      50% { transform: scale(1.5); }
    }

    @keyframes shake {
      0%, 100% { transform: translateX(0) rotate(0deg); }
      25% { transform: translateX(-6px) rotate(-3deg); }
      75% { transform: translateX(6px) rotate(3deg); }
    }

    .bouncing-ball {
      position: absolute;
      width: 42px;
      height: 28px;
      /* aparência mais parecida com uma banana estilizada (oval) */
      background: linear-gradient(90deg, #fff59d 0%, #ffd54a 50%, #ffb300 100%);
      border-radius: 40% 60% 60% 40% / 60% 40% 60% 40%;
      top: 18px;
      left: 0;
      z-index: 10;
      transform-origin: center;
      box-shadow: 0 6px 18px rgba(255, 193, 7, 0.25);
      transition: left 0.2s ease-out, transform 0.15s ease;
      animation: ballBounce 0.6s ease-in-out infinite;
    }

    @keyframes ballBounce {
      0%, 100% { 
        transform: translateY(0) scale(1);
        animation-timing-function: ease-in;
      }
      50% { 
        transform: translateY(10px) scale(1.1, 0.9);
        animation-timing-function: ease-out;
      }
    }

    #inputField {
      width: 100%;
      padding: 22px;
      border: 4px solid #ffcc80;
      border-radius: 15px;
      font-family: 'Poppins', sans-serif;
      font-size: 22px;
      background: white;
      color: #333;
      transition: all 0.3s ease;
      text-align: center;
      letter-spacing: 8px;
      font-weight: 700;
    }

    #inputField:focus {
      outline: none;
      border-color: #764ba2;
      box-shadow: 0 0 35px rgba(118, 75, 162, 0.4);
      transform: scale(1.02);
    }

    #inputField::placeholder {
      color: rgba(102, 126, 234, 0.5);
      letter-spacing: 3px;
      font-weight: 600;
    }

    .caps-warning {
      /* Alerta mais chamativo: posicionado no topo, maior e com mais destaque */
      position: fixed;
      top: 18px;
      left: 50%;
      transform: translateX(-50%);
      z-index: 9999;
      max-width: 92%;
      background: linear-gradient(135deg, #fff176 0%, #ffd54f 50%, #ffb300 100%);
      color: #3e2723;
      padding: 16px 26px;
      border-radius: 14px;
      margin-bottom: 15px;
      font-weight: 800;
      font-size: 18px;
      text-align: center;
      box-shadow: 0 10px 30px rgba(255, 167, 38, 0.35), 0 0 40px rgba(255,193,7,0.08) inset;
      animation: capsPulse 1.2s ease-in-out infinite;
      display: none;
      align-items: center;
      justify-content: center;
      gap: 10px;
      border: 3px solid rgba(255,183,77,0.95);
      backdrop-filter: blur(6px);
    }

    .caps-warning::before {
      content: "⚠️";
      font-size: 22px;
      margin-right: 10px;
      display: inline-block;
      transform: translateY(1px);
    }

    .caps-warning.active {
      display: flex;
      animation: capsPulse 1.2s ease-in-out infinite;
      transform: translateX(-50%) scale(1.02);
      box-shadow: 0 16px 40px rgba(255, 167, 38, 0.45), 0 0 60px rgba(255,193,7,0.12) inset;
    }

    @keyframes warningPulse {
      0%, 100% { transform: scale(1); }
      50% { transform: scale(1.03); }
    }

    @keyframes capsPulse {
      0% { transform: translateX(-50%) scale(1); filter: drop-shadow(0 0 0 rgba(255,193,7,0)); }
      50% { transform: translateX(-50%) scale(1.04); filter: drop-shadow(0 8px 24px rgba(255,160,38,0.25)); }
      100% { transform: translateX(-50%) scale(1); filter: drop-shadow(0 0 0 rgba(255,193,7,0)); }
    }

    .error-message {
      background: linear-gradient(135deg, #ff5252 0%, #f44336 100%);
      color: white;
      padding: 15px 25px;
      border-radius: 15px;
      margin-bottom: 15px;
      font-weight: 600;
      font-size: 16px;
      text-align: center;
      box-shadow: 0 8px 20px rgba(244, 67, 54, 0.4);
      display: none;
      align-items: center;
      justify-content: center;
      gap: 10px;
      animation: errorSlide 0.5s ease;
    }

    .error-message.active {
      display: flex;
    }

    @keyframes errorSlide {
      0% { 
        opacity: 0;
        transform: translateY(-20px);
      }
      100% { 
        opacity: 1;
        transform: translateY(0);
      }
    }

    .panel {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
      gap: 18px;
      margin-top: 35px;
    }

    .stat {
      background: linear-gradient(135deg, #fffaf0 0%, #fff6e0 100%);
      padding: 25px 20px;
      border-radius: 18px;
      text-align: center;
      border: 3px solid #ffcc80;
      transition: all 0.3s ease;
      box-shadow: 0 5px 15px rgba(255, 193, 7, 0.12);
    }

    .stat:hover {
      transform: translateY(-5px) scale(1.05);
      box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
      border-color: #764ba2;
    }

    .stat span {
      display: block;
      font-size: 13px;
      color: #667eea;
      margin-bottom: 10px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 1px;
    }

    .stat strong {
      font-size: 32px;
      color: #ff8f00;
      font-weight: 900;
      text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.06);
    }

    #results h2 {
      color: #667eea;
      margin-bottom: 30px;
      font-size: 42px;
      text-align: center;
      text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
      font-weight: 900;
    }

    .results-container {
      display: flex;
      flex-direction: column;
      gap: 25px;
    }

    .performance-meter {
      background: linear-gradient(180deg, #fffaf0 0%, #fff7e6 100%);
      padding: 30px;
      border-radius: 18px;
      border: 3px solid #ffcc80;
      box-shadow: 0 5px 18px rgba(255, 193, 7, 0.12);
    }

    .meter-label {
      text-align: center;
      font-size: 18px;
      font-weight: 700;
      color: #667eea;
      margin-bottom: 20px;
      text-transform: uppercase;
      letter-spacing: 1px;
    }

    .meter-bar-container {
      position: relative;
      height: 60px;
      /* gradiente de performance adequado ao tema banana */
      background: linear-gradient(90deg, #ffb300 0%, #ffd54a 40%, #c5e1a5 100%);
      border-radius: 30px;
      overflow: hidden;
      box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.06);
      margin-bottom: 15px;
    }

    .meter-pointer {
      position: absolute;
      top: 50%;
      transform: translate(-50%, -50%);
      width: 8px;
      height: 80px;
      background: white;
      border: 4px solid #5d4037;
      border-radius: 4px;
      box-shadow: 0 0 12px rgba(93,64,55,0.2);
      transition: left 1s cubic-bezier(0.68, -0.55, 0.265, 1.55);
      z-index: 2;
    }

    .meter-pointer::before {
      content: '';
      position: absolute;
      top: -15px;
      left: 50%;
      transform: translateX(-50%);
      width: 0;
      height: 0;
      border-left: 12px solid transparent;
      border-right: 12px solid transparent;
      border-top: 15px solid #333;
    }

    .meter-labels {
      display: flex;
      justify-content: space-between;
      padding: 0 10px;
      font-size: 14px;
      font-weight: 600;
      color: #666;
    }

    .performance-text {
      text-align: center;
      font-size: 32px;
      font-weight: 900;
      margin-top: 20px;
      padding: 20px;
      border-radius: 15px;
      animation: resultPulse 2s ease infinite;
      color: #5d4037;
      background: linear-gradient(90deg, rgba(255,235,59,0.06), rgba(255,193,7,0.04));
    }

    @keyframes resultPulse {
      0%, 100% { transform: scale(1); }
      50% { transform: scale(1.05); }
    }

    .stats-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
      gap: 20px;
      margin: 25px 0;
    }
  /* Responsividade extra para tablets, laptops e desktops grandes */
  @media (max-width: 900px) {
    .container {
      max-width: 98vw;
      padding: 0 10px;
    }
    .topbar {
      padding: 18px 10px;
      font-size: 90%;
    }
    .card {
      padding: 18px;
    }
    .display-container {
      padding: 30px 10px;
      min-height: 100px;
    }
    .display-text {
      font-size: 24px;
      letter-spacing: 4px;
    }
    .panel {
      grid-template-columns: 1fr 1fr;
      gap: 10px;
    }
    .stat {
      padding: 12px 8px;
    }
  }

  @media (max-width: 480px) {
    body {
      padding: 5px;
    }
    .container {
      max-width: 100vw;
      padding: 0 2px;
    }
    .topbar {
      flex-direction: column;
      gap: 8px;
      padding: 10px 2px;
      border-radius: 12px 12px 0 0;
    }
    h1 {
      font-size: 16px;
      gap: 4px;
    }
    #record {
      font-size: 11px;
      padding: 6px 10px;
    }
    .card {
      padding: 10px;
      border-radius: 0 0 12px 12px;
    }
    .controls {
      grid-template-columns: 1fr;
      gap: 8px;
    }
    .display-container {
      padding: 18px 2px 10px 2px;
      min-height: 60px;
      border-radius: 10px;
      border-width: 2px;
    }
    .display-text {
      font-size: 14px;
      letter-spacing: 2px;
      margin-top: 8px;
    }
    .letter {
      margin: 0 1px;
      font-size: 13px;
    }
    #inputField {
      font-size: 13px;
      padding: 8px;
      letter-spacing: 2px;
      border-radius: 8px;
      border-width: 2px;
    }
    .panel {
      grid-template-columns: 1fr;
      gap: 6px;
    }
    .stat {
      padding: 8px 4px;
      border-radius: 8px;
    }
    .stat span {
      font-size: 9px;
    }
    .stat strong {
      font-size: 16px;
    }
    .bouncing-ball {
      width: 16px;
      height: 16px;
      top: 8px;
    }
    .combo-message {
      font-size: 18px;
    }
    .footer {
      font-size: 10px;
      padding: 6px;
      border-radius: 8px;
    }
    .caps-warning, .error-message {
      font-size: 9px;
      padding: 6px 8px;
      border-radius: 6px;
    }
    .achievement-badge {
      font-size: 13px;
      padding: 8px;
      border-radius: 8px;
    }
    .performance-text {
      font-size: 16px;
      padding: 8px;
      border-radius: 8px;
    }
    .meter-label {
      font-size: 11px;
      margin-bottom: 8px;
    }
    .meter-bar-container {
      height: 22px;
      border-radius: 10px;
      margin-bottom: 6px;
    }
    .meter-pointer {
      width: 4px;
      height: 30px;
      border-width: 2px;
      border-radius: 2px;
    }
    .meter-pointer::before {
      border-left: 6px solid transparent;
      border-right: 6px solid transparent;
      border-top: 8px solid #333;
    }
    .meter-labels {
      font-size: 8px;
      padding: 0 2px;
    }
    .stats-grid {
      grid-template-columns: 1fr;
      gap: 8px;
      margin: 10px 0;
    }
    .stat-card {
      padding: 8px;
      border-radius: 8px;
      border-width: 2px;
    }
    .stat-card .icon {
      font-size: 18px;
      margin-bottom: 4px;
    }
    .stat-card .value {
      font-size: 18px;
      margin: 4px 0;
    }
    .stat-card .label {
      font-size: 8px;
    }
  }

    .stat-card {
      background: linear-gradient(135deg, #f8f9ff 0%, #f0f2ff 100%);
      padding: 25px;
      border-radius: 15px;
      border: 3px solid #667eea;
      text-align: center;
      box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
      transition: all 0.3s ease;
    }

    .stat-card:hover {
      transform: translateY(-5px);
      box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
    }

    .stat-card .icon {
      font-size: 40px;
      margin-bottom: 10px;
    }

    .stat-card .value {
      font-size: 36px;
      font-weight: 900;
      color: #764ba2;
      margin: 10px 0;
    }

    .stat-card .label {
      font-size: 14px;
      color: #667eea;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 1px;
    }

    .achievement-badge {
      background: linear-gradient(135deg, #fff59d 0%, #ffd54a 100%);
      color: #5d4037;
      padding: 20px;
      border-radius: 15px;
      text-align: center;
      font-size: 20px;
      font-weight: 900;
      box-shadow: 0 8px 20px rgba(255, 193, 7, 0.18);
      animation: badgePulse 1.5s ease infinite;
      margin: 20px 0;
    }

    @keyframes badgePulse {
      0%, 100% { transform: scale(1); box-shadow: 0 8px 25px rgba(255, 152, 0, 0.4); }
      50% { transform: scale(1.05); box-shadow: 0 12px 35px rgba(255, 152, 0, 0.6); }
    }

    #resultSummary {
      display: none;
    }

    .footer {
      margin-top: 25px;
      text-align: center;
      color: white;
      font-size: 15px;
      padding: 18px;
      background: rgba(255, 255, 255, 0.15);
      border-radius: 15px;
      backdrop-filter: blur(10px);
      border: 2px solid rgba(255, 255, 255, 0.3);
      font-weight: 600;
    }

    .particle {
      position: absolute;
      width: 12px;
      height: 12px;
      background: linear-gradient(135deg, #667eea, #764ba2);
      border-radius: 50%;
      pointer-events: none;
      animation: particleFloat 1s ease-out forwards;
      box-shadow: 0 0 15px rgba(102, 126, 234, 0.8);
    }

    @keyframes particleFloat {
      0% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
      }
      100% {
        opacity: 0;
        transform: translate(var(--tx), var(--ty)) scale(0);
      }
    }

    .combo-message {
      position: fixed;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      font-size: 56px;
      font-weight: 900;
      color: white;
      text-shadow: 0 0 40px rgba(255, 255, 255, 0.8);
      z-index: 1000;
      pointer-events: none;
      animation: comboAppear 1.2s ease-out forwards;
      background: linear-gradient(135deg, #667eea, #764ba2, #f093fb);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
    }

    @keyframes comboAppear {
      0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.3) rotate(-10deg);
      }
      50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.3) rotate(5deg);
      }
      100% {
        opacity: 0;
        transform: translate(-50%, -120%) scale(1) rotate(0deg);
      }
    }

    @media (max-width: 600px) {
      h1 { font-size: 20px; }
      .topbar { 
        flex-direction: column; 
        gap: 18px; 
        text-align: center;
        padding: 25px;
      }
      #record {
        font-size: 14px;
        padding: 10px 20px;
      }
      .card {
        padding: 30px;
      }
      .controls {
        grid-template-columns: 1fr;
        gap: 18px;
      }
      .display-container {
        padding: 55px 20px 35px 20px;
        min-height: 130px;
      }
      .display-text { 
        font-size: 28px; 
        letter-spacing: 6px;
        line-height: 1.9;
        margin-top: 18px;
      }
      .letter {
        margin: 0 3px;
      }
      #inputField {
        font-size: 18px;
        padding: 18px;
        letter-spacing: 4px;
      }
      .panel { 
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
      }
      .stat {
        padding: 18px 12px;
      }
      .stat span {
        font-size: 11px;
      }
      .stat strong {
        font-size: 26px;
      }
      .bouncing-ball { 
        width: 28px; 
        height: 28px;
        top: 15px;
      }
      .combo-message {
        font-size: 38px;
      }
      .footer {
        font-size: 13px;
        padding: 15px;
      }
      .caps-warning, .error-message {
        font-size: 13px;
        padding: 10px 15px;
      }
     
      .btn-back {
        top: 6px;
        left: 8px; /* garantir canto superior esquerdo em mobile */
        right: auto;
        font-size: 0.75em;
        padding: 5px 8px;
        height: 30px;
        min-width: 34px;
      }
    
      .caps-warning {
        top: 10px;
        font-size: 15px;
        padding: 12px 18px;
        border-radius: 12px;
        max-width: 96%;
      }
      .caps-warning::before {
        font-size: 18px;
        margin-right: 8px;
      }
    }
