* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; } html, body { margin: 0; padding: 0; width: 100%; min-height: 100%; } body { background: radial-gradient(circle at center, #303030 0%, #111 70%); color: #fff; font-family: Arial, "Noto Sans JP", sans-serif; overflow-x: hidden; } #gameWrapper { width: 100%; min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 15px 10px 25px; } #hud { width: min(96vw, 1200px); display: flex; justify-content: center; align-items: stretch; gap: 12px; margin-bottom: 12px; } .hud-item { min-width: 100px; padding: 8px 20px; border-radius: 10px; background: linear-gradient( 180deg, #030c80 0%, #7876e6 100% ); box-shadow: inset 0 1px 0 rgba(255,255,255,0.15), 0 3px 10px rgba(0,0,0,0.5); text-align: center; } .hud-label { display: block; font-size: 11px; letter-spacing: 2px; color: #aaa; margin-bottom: 2px; } .hud-item > span:last-child { display: block; font-size: 22px; font-weight: bold; letter-spacing: 1px; } #gameArea { position: relative; width: min( 96vw, calc((100vh - 160px) * 5200 / 4400) ); aspect-ratio: 5200 / 4400; height: auto; flex-shrink: 0; } #gameCanvas { position: absolute; left: 50%; top: 50%; width: calc(var(--card-width, 400px) * 13); height: calc(var(--card-height, 550px) * 8); transform-origin: center center; display: grid; grid-template-columns: repeat(13, var(--card-width, 400px)); grid-template-rows: repeat(8, var(--card-height, 550px)); perspective: 1500px; } .card { width: var(--card-width, 400px); height: var(--card-height, 550px); position: relative; perspective: 1200px; cursor: pointer; user-select: none; touch-action: manipulation; } .card-inner { width: 100%; height: 100%; position: relative; transform-style: preserve-3d; transition: transform 0.65s cubic-bezier( 0.25, 0.8, 0.25, 1 ); } .card-face { position: absolute; inset: 0; width: 100%; height: 100%; backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: hidden; border-radius: 8px; box-shadow: 0 3px 8px rgba(0,0,0,0.65); } .card-back { transform: rotateY(0deg); background: #222; } .card-back img { width: 100%; height: 100%; display: block; object-fit: cover; pointer-events: none; } .card-front { transform: rotateY(180deg); background: #fff; } .card-front img { width: 100%; height: 100%; display: block; object-fit: cover; pointer-events: none; } .card.flipped .card-inner { transform: rotateY(180deg); } .card.matched { cursor: default; } .card.matched .card-inner { transform: rotateY(180deg); } .card.matched .card-front { animation: matchedEffect 0.45s ease-out; } @keyframes matchedEffect { 0% { filter: brightness(1); } 40% { filter: brightness(1.7); } 100% { filter: brightness(1); } } .card.selecting .card-front { box-shadow: 0 0 25px rgba(255,255,255,0.9); } #startMessage { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 20; width: min(90%, 440px); padding: 30px; text-align: center; border-radius: 18px; background: rgba(94, 93, 93, 0.411); text-shadow: 1px 2px 3px #0a0909; border: 4px solid #7916d4; box-shadow: 0 10px 20px rgba(0,0,0,0.8); pointer-events: none; } .message-title { font-size: 40px; font-weight: bold; margin-bottom: 15px; } .message-text { font-size: 20px; margin-bottom: 12px; } .message-sub { font-size: 14px; line-height: 1.8; font-weight: bold; color: #99ff15; text-shadow: 1px 2px 3px #0a0909; } #clearOverlay { position: absolute; inset: 0; z-index: 50; display: flex; justify-content: center; align-items: center; background:rgba(0,0,0,0.15); pointer-events: none; } #clearImage { width: 500px; height: auto; max-width: 80%; max-height: 80%; object-fit: contain; opacity: 0; transform: rotate(0deg) scale(0.05); filter: drop-shadow( 0 10px 25px rgba(0,0,0,0.8) ); } #clearOverlay.play #clearImage { animation: clearAnimation 2.5s cubic-bezier(0.15, 0.8, 0.2, 1) forwards; } @keyframes clearAnimation { 0% { opacity: 0; transform: rotate(-720deg) scale(0.05); } 15% { opacity: 1; } 100% { opacity: 1; transform: rotate(0deg) scale(1.0); } } #gameOverOverlay { position: absolute; inset: 0; z-index: 40; display: flex; justify-content: center; align-items: center; background: rgba(0, 0, 0, 0.78); } .gameover-box { width: min(90%, 500px); padding: 30px; text-align: center; border-radius: 18px; background: linear-gradient( 180deg, #353535, #111 ); border: 2px solid #aaa; box-shadow: 0 10px 50px rgba(0, 0, 0, 0.9); } #gameOverTitle { font-size: 38px; font-weight: bold; margin-bottom: 15px; } #gameOverReason { color: #ccc; margin-bottom: 25px; } .final-info { display: flex; justify-content: center; gap: 50px; font-size: 14px; color: #aaa; } .final-info span { display: block; margin-top: 5px; font-size: 30px; font-weight: bold; color: #fff; } #controls { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 15px; } #controls button { min-width: 150px; padding: 6px 18px; border: 1px solid #777; border-radius: 8px; background: linear-gradient(180deg,#e3e3ff, #814df8); color: #201f1f; font-size: 16px; font-weight: bold; cursor: pointer; box-shadow: 0 3px 8px rgba(0,0,0,0.5); transition:transform 0.1s,filter 0.15s; } #controls button:hover {filter: brightness(1.2);} #controls button:active {transform: translateY(2px);} #controls button:disabled {opacity: 0.4;cursor: default;} .modal { position: fixed; inset: 0; z-index: 100; display: flex; justify-content: center; align-items: center; padding: 20px; background:rgba(0,0,0,0.8); } .modal-box { position: relative; width: min(95vw, 600px); padding: 30px 25px; border-radius: 18px; background: linear-gradient( 180deg, #353535, #111 ); border: 2px solid #888; box-shadow: 0 15px 60px rgba(0,0,0,0.9); } .modal-box h2 { text-align: center; margin: 0 0 25px } .close-button { position: absolute; top: 10px; right: 12px; width: 35px; height: 35px; border: 0; border-radius: 50%; background: #444; color: #fff; font-size: 25px; cursor: pointer; } .ranking-row { display: grid; grid-template-columns: 50px 60px 100px 100px 80px; align-items: center; font-weight: bold; text-align: center; font-size: 20px; gap: 5px; } .ranking-rank { font-size: 30px; text-align: center; } .ranking-position { font-weight: bold; } .ranking-time, .ranking-score { text-align: right; font-weight: bold; } .ranking-score {font-size: 20px;} .ranking-note { text-align: center; margin-top: 20px; color: #777; font-size: 12px; } .hidden {display: none !important;} @media (min-width: 701px) and (max-width: 1100px) { #gameWrapper { padding: 10px 8px 18px; } #hud { width: 96vw; gap: 8px; margin-bottom: 8px; } .hud-item { min-width: 0; flex: 1; padding: 6px 10px; } .hud-item > span:last-child { font-size: 19px; } #controls { gap: 7px; margin-top: 8px; } #controls button { min-width: 130px; padding: 8px 10px; font-size: 13px; } } @media (max-width: 700px) { #gameWrapper { padding: 8px 5px 15px; } #hud { gap: 5px; margin-bottom: 7px; } .hud-item { min-width: 0; flex: 1; padding: 5px 8px; } .hud-label { font-size: 9px; } .hud-item > span:last-child { font-size: 16px; } #controls { width: 100%; display: flex; justify-content: center; align-items: center; gap: 5px; margin-top: 8px; } #controls button, #hintButton { flex: 1 1 0; min-width: 0; width: 0; box-sizing: border-box; padding: 9px 2px; font-size: 10px; line-height: 1.2; white-space: nowrap; text-align: center; letter-spacing: -0.3px; overflow: hidden; } .message-title { font-size: 28px; } .message-text {font-size: 16px;} .final-info {gap: 25px;} .ranking-row { grid-template-columns: 55px 1fr 80px 90px; font-size: 12px; } .ranking-rank {font-size: 23px;} .ranking-score {font-size: 16px;} } @media (max-width: 700px) and (orientation: landscape) { #gameArea { width: 96vw; height: auto; aspect-ratio: 5200 / 4400; } } #deleteScoresButton { display: block; width: 220px; margin: 20px auto 0; padding: 10px 15px; border: 1px solid #777; border-radius: 8px; background: linear-gradient( 180deg, #555, #222 ); color: #fff; font-size: 14px; font-weight: bold; cursor: pointer; box-shadow: 0 3px 8px rgba(0,0,0,0.5); transition: filter 0.15s,transform 0.1s;} #deleteScoresButton:hover {filter: brightness(1.2);} #deleteScoresButton:active {transform: translateY(2px);} .delete-confirm { position: absolute; inset: 0; z-index: 20; display: flex; justify-content: center; align-items: center; border-radius: 18px; background: rgba(0,0,0,0.65);} .delete-confirm-box { width: min(90%, 400px); padding: 25px 20px; text-align: center; border-radius: 14px; background: linear-gradient( 180deg, #414141, #151515 ); border: 2px solid #888; box-shadow: 0 10px 40px rgba(0,0,0,0.9); animation: deleteConfirmIn 0.2s ease-out;} @keyframes deleteConfirmIn { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } } .delete-confirm-title { font-size: 23px; font-weight: bold; margin-bottom: 15px; } .delete-confirm-text { font-size: 15px; line-height: 1.8; color: #ccc; margin-bottom: 22px; } .delete-confirm-buttons { display: flex; justify-content: center; gap: 12px; } .delete-confirm-buttons button { width: 130px; padding: 10px; border: 1px solid #777; border-radius: 8px; background: linear-gradient( 180deg, #555, #222 ); color: #fff; font-size: 14px; font-weight: bold; cursor: pointer; } .delete-confirm-buttons button:hover {filter: brightness(1.2);} .delete-confirm-buttons button:active {transform: translateY(2px);} #confirmDeleteButton { background: linear-gradient( 180deg, #7a3030, #3a1111 ); } .hidden {display: none !important;} #stopConfirm {z-index: 200;} .stop-confirm-box { width: min(90vw, 400px); padding: 28px 22px; text-align: center; border-radius: 14px; background: linear-gradient( 180deg, #414141, #151515 ); border: 2px solid #888; box-shadow: 0 10px 40px rgba(0,0,0,0.9); animation: stopConfirmIn 0.2s ease-out; } @keyframes stopConfirmIn { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } } .stop-confirm-title { font-size: 23px; font-weight: bold; margin-bottom: 15px; } .stop-confirm-text { font-size: 15px; line-height: 1.8; color: #ccc; margin-bottom: 22px; } .stop-confirm-buttons { display: flex; justify-content: center; gap: 12px; } .stop-confirm-buttons button { width: 130px; padding: 10px; border: 1px solid #777; border-radius: 8px; background: linear-gradient( 180deg, #555, #222 ); color: #fff; font-size: 14px; font-weight: bold; cursor: pointer; } .stop-confirm-buttons button:hover { filter: brightness(1.2); } .stop-confirm-buttons button:active { transform: translateY(2px); } #confirmStopButton { background: linear-gradient( 180deg, #7a3030, #3a1111 ); } #hintButton { min-width: 170px; padding: 12px 18px; border: 1px solid #777; border-radius: 8px; background: linear-gradient( 180deg, #555, #222 ); color: #fff; font-size: 15px; font-weight: bold; cursor: pointer; box-shadow: 0 3px 8px rgba(0,0,0,0.5); transition: transform 0.1s,filter 0.15s;} #hintButton:hover {filter: brightness(1.2);} #hintButton:active {transform: translateY(2px);} #hintButton:disabled {opacity: 0.4; cursor: default;} #timer.warning { color: #ff2222; animation: timerWarning 1s steps(1, end) infinite; } @keyframes timerWarning { 0% { opacity: 1; } 50% { opacity: 0.15; } 100% { opacity: 1; } } .card.flip-complete .card-front { border: 2px solid rgb(255, 33, 244); } @media (min-width: 701px) { .card.flip-complete .card-front { border: 20px solid rgb(255, 33, 244); } }