body {
    margin: 0;
    padding: 20px 10px;
    background: #111;
    font-family: 'Segoe UI', sans-serif;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
}

.fade-in {
    animation: fadeIn 1s ease-in;
}

.game-thumb {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.thumb-left img {
    max-width: 700px;
    width: 100%;
    height: auto;
    border-radius: 10px;
    margin-top: -10px;
}

.sub-thumb img {
    margin-top: -20px;
}

#cardContainer {
    position: relative;
    width: 90vw;
    max-width: 600px;
    height: 300px;
    margin-top: 20px;
    border: 2px solid #00ffe7;
    box-shadow: 0 0 18px #00ffe7;
}

/* カードデザイン */
.card {
    position: absolute;
    width: 60px;
    height: 85px;
    background-color: transparent;
    border-radius: 8px;
    cursor: pointer;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.card-inner {
    position: absolute;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.6s ease-in-out;
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 10px;
    font-weight: bold;
    font-size: 32px;
}

/* 表（〇✕） */
.card-front {
    background-color: #fefefe;
    color: #00ffe7;
    transform: rotateY(180deg);
    box-shadow: inset 0 0 8px #00ffe7;
    text-shadow: 0 0 4px #00ffe7;
}

/* ✕は赤 */
.card-front.wrong-symbol {
    color: #ff4444;
    text-shadow: 0 0 4px #ff4444;
    box-shadow: inset 0 0 8px #ff4444;
}

/* 裏（Card） */
.card-back {
    background-color: #333;
    color: #aaa;
    font-size: 16px;
}

/* カード状態 */
.card.correct {
    box-shadow: 0 0 18px #ffff33, 0 0 24px #ffff33;
}
.card.wrong {
    box-shadow: 0 0 18px #ff4444, 0 0 24px #ff4444;
}

.card.shake {
    animation: shake-absolute 0.3s;
}

.button-group {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

button {
    padding: 12px 24px;
    font-size: 16px;
    background-color: #00ffe7;
    border: none;
    color: #fff;
    font-weight: bold;
    border-radius: 10px;
    box-shadow: 0 0 12px #00ffe7, 0 0 24px #00ffe7;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 16px #00ffe7, 0 0 32px #00ffe7;
}

/* モーダル */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.modal-content {
    background: #111;
    padding: 15px 20px;
    border-radius: 15px;
    text-align: center;
    border: 2px solid #00ffe7;
    box-shadow: 0 0 20px #00ffe7;
}

.modal-content h2 {
    font-size: 20px;
    color: #ff4444;
}

.modal-content p {
    color: #00ffe7;
    font-size: 16px;
}

.modal-content button {
    padding: 10px 20px;
    font-size: 16px;
    background-color: #00ffe7;
    color: #fff;
    border: none;
    border-radius: 10px;
    box-shadow: 0 0 12px #00ffe7;
    cursor: pointer;
}

.logo-footer {
    text-align: center;
    margin-top: 30px;
}

.logo-footer img {
    max-width: 75px;
    width: 100%;
    height: auto;
    opacity: 0.6;
    transition: opacity 0.3s;
}

.logo-footer img:hover {
    opacity: 1;
}

.streak-counter {
  text-align: center;
  color: orange;
  font-weight: bold;
  font-size: 20px;
  text-shadow: 0 0 8px orange;
  margin-top: 5px;
}

.status-message {
    position: absolute;
    top: 55%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #00ffe7;
    font-size: 18px;
    text-shadow: 0 0 6px #00ffe7;
    display: none;
}

.level-select-button {
    font-size: 16px !important;
    font-weight: bold !important;
    color: #ffa500 !important;
    border: 2px solid #ffa500 !important;
    box-shadow: 0 0 10px #ffa500 !important;
    background-color: #333 !important;
}
.level-select-button:hover {
    background-color: #333 !important;
    transform: scale(1.03) !important;
}

.probability-label {
    text-align: center;
    color: #00ffe7;
    font-size: 18px;
    font-weight: bold;
    text-shadow: 0 0 6px #00ffe7;
    margin-top: 10px;
}

/* アニメーション */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.blinking {
    animation: blink 1s infinite;
}
@keyframes zoomFlip {
    0% { transform: scale(1) rotateY(0deg); }
    50% { transform: scale(1.2) rotateY(90deg); }
    100% { transform: scale(1) rotateY(180deg); }
}

.card.zoom-flip .card-inner {
    animation: zoomFlip 0.5s ease forwards;
}
@keyframes shake-absolute {
    0% { left: 0px; top: 0px; }
    20% { left: -3px; top: 0px; }
    40% { left: 3px; top: 0px; }
    60% { left: -2px; top: 0px; }
    80% { left: 2px; top: 0px; }
    100% { left: 0px; top: 0px; }
}

.result-probability {
    color: #ffa500;
    font-size: 14px;
    margin-top: -10px;
    margin-bottom: 20px;
    text-shadow: 0 0 4px #ffa500;
}
