body {
    background: linear-gradient(to top, #ffb3ed 0%, #ffffff 100%);
    background-attachment: fixed;
    color: #ffffff;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    position: relative; 
    overflow-x: hidden;
    cursor: url("littlebunny2-mimidestino/Normal Select.cur") 2 7, url("cursor.svg") 4 3, auto;
}

button {
    cursor: inherit;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0; 
    width: 100vw;
    height: 100vh;
    background-image: url('fluttershy.png'); 
    background-repeat: no-repeat;
    background-position: center;
    background-size: 70%; 
    opacity: 0.15; 
    z-index: -1; 
}
 #botao {
  background-color: #ffb3ed; 
  color: #ffffff; 
  
  padding: 12px 28px; 
  border: none; 
  border-radius: 50px; 
  
  font-family: 'Comic Sans MS', 'Quicksand', sans-serif; 
  font-size: 16px;
  font-weight: bold;
  cursor: inherit; 
  box-shadow: 0 6px 12px rgba(255, 183, 178, 0.4);
  transition: all 0.3s ease;
}
#botao:hover {
    background-color: #ffd4e7;
  transform: translateY(-3px); 
    box-shadow: 0 0 14px rgba(255, 255, 255, .8), 0 0 28px rgba(255, 179, 237, .9);
}


#botao:active {
  transform: translateY(1px); 
  box-shadow: 0 3px 6px rgba(255, 154, 238, 0.3);
}
@keyframes flutuar {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); } 
    100% { transform: translateY(0px); }
}
h1 {
    font-size: 6rem; 
    font-family: 'Comic Sans MS', 'Chalkboard SE', cursive, sans-serif; 
    text-shadow: 2px 5px 7px rgba(101, 0, 66, 0.30); 
    margin-top: 0;
    margin-bottom: 15px; 
    color: #ffb3ed;
    animation: flutuar 4s ease-in-out infinite; 
}

p {
    margin-top: 0;
    margin-bottom: 5px;
    color: #faffbf;
    font-family: 'Comic Sans MS', 'Chalkboard SE', cursive, sans-serif;
    text-shadow: 2px 5px 7px rgba(82, 71, 13, 0.337);
    font-size: 1.5rem; 
}

canvas {
    border: 4px solid #ffa7e3;
    border-radius: 8px;
    box-shadow: 0px 10px 30px rgba(255, 141, 206, 0.5);
}

.b1 { top: -10px; left: -20px; animation-delay: 0s; }
.b2 { top: 10px; right: -25px; animation-delay: 0.7s; }
.b3 { bottom: -5px; left: 40%; animation-delay: 1.3s; }

.app-shell {
    display: grid;
    width: 100%;
    min-height: calc(100vh - 40px);
    place-items: center;
}

.intro {
    max-width: 700px;
    text-align: center;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 450ms ease, transform 450ms ease;
}

.intro.sumindo {
    opacity: 0;
    transform: translateY(-14px);
}

.intro h1 {
    margin: 0 0 18px;
}

.intro p {
    margin: 8px 0;
    line-height: 1.5;
}

.game-stage {
    width: min(1100px, 96vw);
    opacity: 0;
    transform: translateY(12px) scale(.985);
    transition: opacity 500ms ease, transform 500ms ease;
    text-align: center;
}

.game-stage.visivel {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.game-heading {
    display: flex;
    width: min(960px, 100%);
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 0 auto 12px;
    opacity: 1;
    transition: opacity 900ms ease, visibility 0s linear 900ms;
}

.game-heading p {
    margin: 0;
    color: #fff;
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    font-weight: 700;
    text-shadow: 0 2px 3px rgba(0, 0, 0, .45);
}

#pontuacao {
    white-space: nowrap;
}

.canvas-wrap {
    position: relative;
    width: 100%;
    max-height: 72vh;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border: 4px solid #ffa7e3;
    border-radius: 8px;
    background: #759f69;
}

#game-canvas {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    opacity: 1;
    transition: opacity 900ms ease;
}

.webcam-preview {
    position: absolute;
    top: 14px;
    right: 14px;
    width: clamp(88px, 15vw, 150px);
    aspect-ratio: 1;
    overflow: hidden;
    border: 3px solid #fff;
    border-radius: 8px;
    background: rgba(28, 44, 31, .7);
    opacity: 1;
    transition: opacity 900ms ease;
}

.webcam-preview canvas {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 0;
    object-fit: cover;
    box-shadow: none;
}

.win-screen {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: transparent;
    opacity: 0;
    visibility: hidden;
    transition: opacity 900ms ease, visibility 0s linear 900ms;
}

.canvas-wrap.vitoria-fade #game-canvas,
.canvas-wrap.vitoria-fade .webcam-preview {
    opacity: 0;
}

.canvas-wrap.vitoria-final {
    border-color: transparent;
    background: transparent;
}

.canvas-wrap.vitoria-final .win-screen {
    opacity: 1;
    visibility: visible;
    transition: opacity 900ms ease;
}

.win-image {
    display: block;
    width: auto;
    height: min(62%, 340px);
    max-width: 90%;
    object-fit: contain;
    mix-blend-mode: darken;
}

.win-screen p {
    margin: 0;
    color: #fff;
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(80, 35, 58, .45);
    animation: flutuar 4s ease-in-out infinite;
}

.win-restart,
.restart-button {
    padding: 8px 18px;
    border: 0;
    border-radius: 24px;
    color: #fff;
    background: #f2a3c7;
    font: inherit;
    font-weight: 700;
    cursor: inherit;
    transition: background-color 200ms ease, box-shadow 200ms ease, transform 200ms ease;
}

.win-restart:hover,
.restart-button:hover,
.win-restart:focus-visible,
.restart-button:focus-visible {
    background-color: #ffd4e7;
    box-shadow: 0 0 14px rgba(255, 255, 255, .8), 0 0 28px rgba(255, 179, 237, .9);
}

.win-restart {
    margin-top: 4px;
}

.keyboard-controls {
    margin: 12px 0 0;
    color: #fff;
    font-size: 1rem;
    line-height: 1.5;
    text-shadow: 0 2px 3px rgba(0, 0, 0, .45);
    transition: opacity 900ms ease, visibility 0s linear 900ms;
}

.error-message {
    max-width: 720px;
    margin: 14px auto 0;
    color: #fff;
    font-weight: 700;
    line-height: 1.5;
    transition: opacity 900ms ease, visibility 0s linear 900ms;
}

.restart-button {
    margin-top: 14px;
    transition: opacity 900ms ease, visibility 0s linear 900ms, background-color 200ms ease, box-shadow 200ms ease, transform 200ms ease;
}

.game-stage.cutscene .game-heading,
.game-stage.cutscene .keyboard-controls,
.game-stage.cutscene .error-message,
.game-stage.cutscene .restart-button {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

[hidden] {
    display: none !important;
}

@media (max-width: 600px) {
    .game-stage {
        width: 100%;
    }

    .canvas-wrap {
        max-height: 62vh;
    }
}

@media (prefers-reduced-motion: reduce) {
    .intro,
    .game-stage,
    .game-heading,
    #game-canvas,
    .webcam-preview,
    .win-screen,
    .keyboard-controls,
    .error-message,
    .restart-button,
    .win-screen p {
        transition-duration: .01ms;
        animation-duration: .01ms;
    }
}
