/* ---Reset & Base--- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: "Pixelify Sans", sans-serif;
    image-rendering: pixelated;
}

.hidden {
    display: none !important;
}

/* ---Landing--- */
#landing {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

#landing-bg {
    position: absolute;
    inset: 0;
    background-image: url('assets/images/Date_bg.png');
    background-position: center;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    z-index: 0;
    pointer-events: none;
}

/* ---Dialog Box--- */
.dialog-box {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    animation: popIn 0.4s ease-out;
}

.dialog-box .dialog-content {
    position: relative;
    width: 580px;
    min-height: 580px;
    background: url('assets/images/Date_dialogbox.png') center/100% 100% no-repeat;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding: 70px 40px 40px;
}

.dialog-text {
    color: #3d3d5c;
    font-size: 22px;
    line-height: 2;
    text-align: center;
    max-width: 340px;
    margin-bottom: -100px;
}

/* Poof out animation */
.dialog-box.poof {
    animation: poofOut 0.45s ease-in forwards;
}

/* ---Pixel Button--- */
.pixel-btn {
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.1s;
    margin-bottom: 5px;
}

.pixel-btn:hover {
    transform: scale(1.05);
}

.pixel-btn:active {
    transform: scale(0.97);
}

.pixel-btn img {
    width: 300px;
    height: auto;
    display: block;
}

.pixel-btn .btn-label {
    position: absolute;
    right: 55px;
    color: #3d3d5c;
    font-size: 22px;
    font-family: "Pixelify Sans", sans-serif;
    pointer-events: none;
}

/* ---Game Overlay--- */
#game-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    background-image: url('assets/images/Date_bg.png');
    background-position: center;
    background-size: 100% 100%;
    background-repeat: no-repeat;
}

#game-overlay::after {
    content: '';
    position: absolute;
    width: 1000px;
    max-width: calc(100vw - 40px);
    height: 700px;
    max-height: calc(100vh - 40px);
    background: #F78DA7;
    opacity: 0.45;
    border-radius: 18px;
    z-index: 0;
}

/* HUD */
.hud {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    width: 1000px;
    max-width: calc(100vw - 50px);
    margin: 0 auto;
    padding: 90px 50px 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    z-index: 2;
    transition: opacity 0.6s ease;
}

.hud.fade-out {
    opacity: 0;
}

.hud-left, .hud-center, .hud-right {
    color: white;
    font-size: 30px;
    white-space: nowrap;
}

.hud-center {
    position: absolute;
    left: 63%;
    transform: translateX(-50%);
}

/* Round intro */
.round-intro {
    position: absolute;
    z-index: 3;
    color: #006400;
    font-size: 100px;
    text-align: center;
    animation: fadeInScale 0.5s ease-out;
}

/* Arena */
#arena {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 200px;
    width: 100%;
}

.paw-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    margin-top: -120px;
}

.paw {
    width: 350px;
    height: 350px;
    object-fit: contain;
}

.paw-label {
    color: white;
    font-size: 55px;
    text-align: center;
    position: absolute; 
    top: 100%; 
    margin-top: -55px; 
    width: 100%; 
}

/* Bounce animation */
.bounce {
    animation: softBounce 0.8s ease-in-out infinite alternate;
}

/* Result display */
.result-display {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 4;
    pointer-events: none;
}

.result-display img {
    width: 220px;
    height: auto;
}

/* Choice buttons */
.choices {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 50px;
    z-index: 3;
}

.choice-btn {
    background: none;
    border: none;
    cursor: pointer;
    transition: transform 0.15s;
}

.choice-btn:hover {
    transform: scale(1.1);
}

.choice-btn:active {
    transform: scale(0.95);
}

.choice-btn img {
    width: 200px; 
    height: 200px; 
    object-fit: contain; 
    display: block;
}

.choice-btn.disabled {
    pointer-events: none;
}

/* ---Win Dialog--- */
.win-content {
    padding: 60px 30px 30px;
    gap: 16px;
    position: relative; 
    min-height: 580px; 
}

.win-header {
    display: flex;
    align-items: flex-start;
    max-width: 450px;
    position: absolute; 
    top: 180px; 
    left: 50%;
    transform: translateX(-50%); 
}

.win-gif {
    width: 140px;
    height: auto;
    margin-top: 30px;
    margin-left: -38px;
}

.win-text {
    top: 10px;
    color: #3d3d5c;
    font-size: 22px;
    line-height: 1.5;
}

#btn-claim .btn-label {
    right: auto;
    left: 160px;
}

/* ---Movie picker--- */
/* ---Movie picker--- */
.movie-content {
    padding: 60px 30px 30px;
    gap: 16px;
    position: relative; 
    min-height: 580px; 
    display: flex;
    flex-direction: column;
    align-items: center;
}

.movie-warning {
    max-width: 350px;
    position: absolute; 
    top: 190px; 
    left: 50%;
    transform: translateX(-50%); 
    font-size: 22px;
    color: #3d3d5c;
    line-height: 1.8;
    text-align: center;
}

.remaining-picks {
    color: #3d3d5c;
    font-size: 14px;
    font-style: italic;
    text-align: center;
    position: absolute;
    top: 310px;
    left: 50%;
    transform: translateX(-50%);
}

.movie-controls {
    display: flex;
    align-items: center;
    gap: 0;
    margin-top: auto;
    margin-bottom: 30px;
    position: absolute;
    bottom: 8px; 
    left: 50%;
    transform: translateX(-50%);
}

.movie-btn img {
    width: 300px;
}

.movie-btn .btn-label {
    font-size: 16px; 
    position: absolute;
    text-align: center;
    width: 180px;
    min-width: 180px;
    left: 60%;
    transform: translateX(-50%);
    top: 50%;
    transform: translate(-50%, -50%);
    white-space: normal; 
    word-break: break-word;
    line-height: 1.2;
    padding: 0 10px;
}

.movie-btn .btn-label.long {
    font-size: 14px;
    width: 160px;
    min-width: 160px;
}

.movie-btn .btn-label.short {
    font-size: 18px;
    white-space: nowrap; 
}

.movie-btn {
    margin-right: -15px; 
}

.refresh-btn {
    background: none;
    border: none;
    cursor: pointer;
    transition: transform 0.15s;
    margin-left: -25px; 
}

.refresh-btn:hover {
    transform: scale(1.1);
}

.refresh-btn img {
    width: 110px;
    height: auto;
}

/* ---KeyFrames--- */
@keyframes softBounce {
    0%   { transform: translateY(-8px); }
    100% { transform: translateY(8px); }
}

@keyframes popIn {
    0%   { opacity: 0; transform: scale(0.6); }
    80%  { transform: scale(1.05); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes poofOut {
    0%   { opacity: 1; transform: scale(1); }
    50%  { opacity: 0.5; transform: scale(1.15); }
    100% { opacity: 0; transform: scale(0); }
}

@keyframes fadeInScale {
    0%   { opacity: 0; transform: scale(0.7); }
    100% { opacity: 1; transform: scale(1); }
}

/* Overlay fade-out */
#game-overlay.fade-out::after {
    transition: opacity 0.8s ease;
    opacity: 0;
}