body {
    /* グラデーションを少し透過させて動画が見えるように設定（rgbaを使用） */
    background: radial-gradient(circle at 50% 20%, rgba(0, 8, 20, 0.7), rgba(0, 0, 0, 0.9));
    color: #00f7ff;
    font-family: sans-serif;
    text-align: center;
    margin: 0;
    overflow: hidden;
    user-select: none;
    touch-action: manipulation;
    transition: transform 0.05s, background 0.3s;
}

/* 他のスタイルは変更なし */
#boss-container {
    margin-top: 5px;
    position: relative;
    z-index: 5;
    display: none;
}

.boss-image-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 2px;
    cursor: pointer;
    transition: transform 0.1s;
}

.boss-image-wrapper:active {
    transform: scale(0.92);
}

#boss-image {
    max-height: 120px;
    filter: drop-shadow(0 0 0px transparent);
    animation: pulse 3s infinite ease-in-out;
    transition: filter 0.5s ease;
}

#boss-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 50px;
    pointer-events: none;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.hp-bar-container {
    width: 85%;
    height: 16px;
    background: #222;
    border: 2px solid #00f7ff;
    margin: 2px auto;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 10px #00f7ff;
}

#hp-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #00f7ff, #bd00ff);
    transition: width 0.3s ease;
}

#bonus-ui {
    color: #fff;
    font-size: 11px;
    background: rgba(0, 247, 255, 0.2);
    display: inline-block;
    padding: 2px 8px;
    border-radius: 20px;
    border: 1px solid #00f7ff;
    margin-bottom: 2px;
}

#bonus-type {
    font-weight: bold;
}

#type-timer {
    font-family: monospace;
    margin-left: 5px;
    color: #aaa;
}

.overlay-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 200;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 20px;
}

#boss-select-screen {
    z-index: 210;
}

#boss-list-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    max-height: 70vh;
    overflow-y: auto;
    width: 95%;
}

.boss-card {
    background: #111;
    border: 2px solid #00f7ff;
    padding: 20px;
    margin: 10px;
    width: 300px;
    cursor: pointer;
    border-radius: 10px;
    transition: 0.2s;
    position: relative;
    font-size: 18px;
}

.boss-card strong {
    font-size: 22px;
    display: block;
    margin-bottom: 5px;
}

.boss-card:hover {
    background: #1a1a1a;
    box-shadow: 0 0 15px #00f7ff;
}

.ongoing-label {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #bd00ff;
    color: white;
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 3px;
}

.special-boss-card {
    border: 3px solid #ff0000 !important;
    box-shadow: 0 0 15px #ff0000;
}

#setup-screen {
    display: none;
}

.collection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 12px;
    width: 95%;
    max-height: 65vh;
    overflow-y: auto;
    background: #111;
    padding: 10px;
    border: 1px solid #00f7ff;
    margin: 0 auto;
}

.mini-card {
    width: 100%;
    aspect-ratio: 5 / 7;
    border: 1px solid #555;
    cursor: pointer;
    font-size: 12px;
    background-size: cover;
    position: relative;
    border-radius: 5px;
    background-position: center;
}

.mini-card.selected {
    border: 3px solid #ffeb3b;
    box-shadow: 0 0 15px #ffeb3b;
    transform: scale(0.95);
}

.field {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 4px;
    width: fit-content;
    margin: 5px auto;
    position: relative;
    z-index: 5;
    justify-items: center;
}

.card {
    height: 22vh;
    max-height: 120px;
    aspect-ratio: 5 / 7;
    border: 1.5px solid #00f7ff;
    border-radius: 5px;
    background: #111 no-repeat center;
    background-size: cover;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 0 5px #00f7ff;
    position: relative;
    transition: 0.3s;
    overflow: hidden;
}

.card.bonus-glow {
    border-color: gold !important;
    box-shadow: 0 0 12px gold !important;
    animation: cardBlink 2s infinite ease-in-out;
}

@keyframes cardBlink {
    0% { filter: brightness(1); }
    50% { filter: brightness(1.2); }
    100% { filter: brightness(1); }
}

.card.selection-glow {
    border-color: #fff !important;
    box-shadow: 0 0 20px #fff, inset 0 0 10px #fff !important;
    cursor: pointer;
    animation: selectionPulse 0.5s infinite alternate;
    z-index: 50;
}

@keyframes selectionPulse {
    from { transform: scale(1); filter: brightness(1); }
    to { transform: scale(1.05); filter: brightness(1.5); }
}

.card.god-aura {
    box-shadow: 0 0 12px #fff700, inset 0 0 8px #fff700;
    border-color: #fff700;
}

.attacking {
    animation: attack-jump 0.3s ease-out !important;
    z-index: 10;
}

@keyframes attack-jump {
    0% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0); }
}

.card-name {
    font-size: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 1px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.card-stats {
    background: rgba(0, 0, 0, 0.8);
    padding: 1px;
    font-weight: bold;
    color: yellow;
    font-size: 9px;
}

#reward-screen {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 300;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.damage-pop {
    position: absolute;
    color: #00f7ff;
    font-size: 28px;
    font-weight: bold;
    text-shadow: 1px 1px 0 #000;
    pointer-events: none;
    animation: fadeUp 0.8s forwards;
    z-index: 100;
}

.critical-pop {
    color: #ff0055 !important;
    font-size: 40px !important;
    text-shadow: 0 0 10px #ff0055, 2px 2px 0 #000;
}

.tokage-pop {
    color: gold !important;
    font-size: 55px !important;
    text-shadow: 0 0 20px #ffeb3b, 3px 3px 0 #000;
    z-index: 150;
}

@keyframes fadeUp {
    0% { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: translateY(-100px) scale(1.6); }
}

.big-atk-up {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 80px;
    font-weight: bold;
    font-style: italic;
    text-shadow: 0 0 20px #00f7ff, 0 0 40px #bd00ff, 4px 4px 0 #000;
    z-index: 2500;
    pointer-events: none;
    animation: bigAtkAnim 1s ease-out forwards;
}

@keyframes bigAtkAnim {
    0% { opacity: 0; transform: translate(-50%, -40%) scale(0.5); filter: blur(10px); }
    20% { opacity: 1; transform: translate(-50%, -50%) scale(1.2); filter: blur(0px); }
    80% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -60%) scale(1.5); }
}

#special-cutin {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 220px;
    height: 308px;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    border: 4px solid gold;
    border-radius: 10px;
    z-index: 1000;
    display: none;
    opacity: 0;
    pointer-events: none;
    box-shadow: 0 0 50px gold, inset 0 0 20px white;
}

@keyframes cutInWithFadeOut {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(2.5); filter: brightness(5); }
    15% { opacity: 1; transform: translate(-50%, -50%) scale(1); filter: brightness(1.2); }
    75% { opacity: 1; transform: translate(-50%, -50%) scale(1.05); filter: brightness(1.2); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); filter: brightness(0.5); }
}

#flash-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    opacity: 0;
    z-index: 2000;
    pointer-events: none;
}

.energy-orb {
    position: fixed;
    width: 35px;
    height: 35px;
    background: radial-gradient(circle, #fff, #00f7ff);
    border-radius: 50%;
    z-index: 100;
    cursor: pointer;
    box-shadow: 0 0 15px #00f7ff;
    animation: orbBounce 4s infinite alternate ease-in-out;
}

.offline-orb {
    position: fixed;
    width: 55px;
    height: 55px;
    background: radial-gradient(circle, #ff0000, #550000);
    border-radius: 50%;
    z-index: 110;
    cursor: pointer;
    box-shadow: 0 0 20px #ff0000;
    animation: orbBounce 3s infinite alternate ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 9px;
    border: 1px solid #fff;
}

@keyframes orbBounce {
    from { transform: translate(0, 0); }
    to { transform: translate(15px, 15px); }
}

#effect-canvas {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 1;
}

#quit-btn-container {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 150;
    display: none;
}

#bgm-switch-container {
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 150;
}

#bgm-toggle-btn {
    background: rgba(0, 0, 0, 0.6);
    color: #00f7ff;
    border: 1px solid #00f7ff;
    padding: 6px 10px;
    font-size: 11px;
    border-radius: 5px;
    cursor: pointer;
    box-shadow: 0 0 5px #00f7ff;
}

button {
    padding: 6px 12px;
    cursor: pointer;
    background: #00f7ff;
    border: none;
    font-weight: bold;
    border-radius: 5px;
    font-size: 12px;
}

button:disabled {
    background: #555;
}

.exit-btn {
    background: #444;
    color: #fff;
    margin-top: 15px;
    border: 1px solid #00f7ff;
}

.tokage-rainbow-bg {
    animation: rainbowAnim 0.5s infinite linear !important;
}

@keyframes rainbowAnim {
    0% { background: rgba(255, 0, 0, 0.3); }
    20% { background: rgba(255, 255, 0, 0.3); }
    40% { background: rgba(0, 255, 0, 0.3); }
    60% { background: rgba(0, 255, 255, 0.3); }
    80% { background: rgba(0, 0, 255, 0.3); }
    100% { background: rgba(255, 0, 255, 0.3); }
}

#boost-btn {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1500;
    padding: 20px;
    background: red;
    color: white;
    border: 4px solid white;
    border-radius: 50%;
    font-weight: bold;
    box-shadow: 0 0 30px red;
    cursor: pointer;
    animation: pulse 1s infinite;
    display: none;
    font-size: 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 100px;
    min-height: 100px;
}

#boost-timer-display {
    display: block;
    font-size: 24px;
    margin-top: 5px;
    font-family: monospace;
}

#idle-resume-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 3000;
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

#idle-resume-btn {
    padding: 20px 40px;
    font-size: 24px;
    background: #ffeb3b;
    color: #000;
    border: 4px solid #fff;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 0 20px #ffeb3b;
    font-weight: bold;
}

#selection-guide {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 247, 255, 0.9);
    color: #000;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: bold;
    z-index: 2000;
    display: none;
    box-shadow: 0 0 15px #00f7ff;
    pointer-events: none;
    font-size: 14px;
}