/* 全体の背景を怪しげな紫のグラデーションに */
#id_GameArea {
    //margin: 0;
    //padding: 0;
    //background: linear-gradient(135deg, #0d0614 0%, #1c0f2b 50%, #0d0614 100%);
    //color: #ffaa00;
    margin-top:-26px;
    font-family: 'Arial', sans-serif;
    text-align: center;
    overflow: hidden;
    user-select: none;
    //border:3px solid #ff0000;
}
#id_htittle {
    //margin-top: 25px;
    font-size: 33px;
    letter-spacing: 2px;
    text-shadow: 0 0 10px #ff5500, 2px 2px 4px #000;
}
.htittle2 {
    margin-top: -7px;
    font-size: 21px;
    letter-spacing: 2px;
    text-shadow: 0 0 10px #ff5500, 2px 2px 4px #000;
}

#info-panel {
    margin-top: 5px;
    font-size: 15px;
    margin-bottom: 5px;
    text-shadow: 1px 1px 3px #000;
    background: rgba(0, 0, 0, 0.3);
    display: inline-block;
    padding: 2px 25px;
    border-radius: 20px;
    border: 1px solid #3d235a;
    line-height:1.3;
}

/* 🏆 ハイスコア表示の装飾 */
#highscore-panel {
	font-size:120%;
    //color: #ffd700;
    color: #008000;
    font-weight: bold;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
}

.hurry-up {
    color: #ff3333;
    font-weight: bold;
    animation: blink 0.5s ease-in-out infinite alternate;
    //text-shadow: 0 0 8px #ff0000;
}
#score {
	font-size:150%;
	color:#0000ff;
}

/* ゲームステージ */
#game-stage {
    position: relative;
    //width: 80vw;
    //height: 60vh;
    max-width: 330px;
    height: 300px;
    margin: 0 auto;
    border: 4px solid #ff5500;
    border-radius: 15px;
    cursor: crosshair;
    overflow: hidden;
    box-shadow: 0 0 25px rgba(255, 85, 0, 0.3);
    //background: 
    //    radial-gradient(circle at 75% 25%, #fffde6 0%, #ffdf7a 8%, rgba(255,223,122,0.2) 15%, transparent 25%),
    //    linear-gradient(to bottom, #110724 0%, #291147 60%, #4a2113 100%);
    background:url(../images/header/HalloweenCastle10.jpg) no-repeat center center; 
    background-size:100% 100%;
    transition: background-color 0.1s ease, border-color 0.1s ease; 
}
/*
#game-stage::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50px;
    background: black;
    clip-path: polygon(0% 100%, 0% 70%, 5% 50%, 10% 80%, 18% 40%, 25% 75%, 35% 30%, 42% 65%, 50% 20%, 60% 70%, 70% 35%, 78% 80%, 88% 45%, 95% 70%, 100% 50%, 100% 100%);
    opacity: 0.85;
    pointer-events: none;
}
*/
#game-stage.damage-flash {
    background: #660000 !important;
    border-color: #ff0000;
}

.target {
    position: absolute;
    //font-size: 55px;
    font-size: 35px;
    cursor: pointer;
    transition: transform 0.1s;
    animation: float 1.2s ease-in-out infinite alternate;
    filter: drop-shadow(0px 0px 8px rgba(255, 255, 255, 0.6));
}

.target:active {
    transform: scale(0.8);
}

.explosion {
    position: absolute;
    font-size: 65px;
    pointer-events: none; 
    animation: explode 0.3s ease-out forwards;
}

.hit {
    position: absolute;
    //font-family:'Hachi Maru Pop', cursive;
    font-size:15px;
    font-weight:bold;
    pointer-events: none; 
    color:#ffffff;
    transform:rotate(-20deg);
    animation: hit 0.3s ease-out forwards;
}

#id_guidance {
	font-family: 'Hachi Maru Pop', cursive;
	font-size:17px;
	font-weight:bold;
	line-height:1.1;
}

.resuleMessage {
	position:absolute; 
	top:66%; 
	left:50%; 
	transform: translateY(10%) translateX(-50%); 
	font-size:17px; 
	font-weight:bold; 
	font-family: 'Hachi Maru Pop', cursive;
	padding: 0 9px;
	background: #e4fcff;
	border-radius: 30px;
	white-space: nowrap;
	//border:3px solid #ff0000;
    animation: fadeout 1.5s ease-out 3.5s forwards;
}

/* スタートボタン */
#start-btn {
    font-size: 18px;
    padding: 5px 25px;
    background: linear-gradient(to bottom, #ff7700, #ff4400);
    color: white;
    border: 2px solid #331100;
    border-radius: 30px;
    cursor: pointer;
    margin-top: 8px;
    font-weight: bold;
    text-shadow: 1px 1px 2px #000;
    //box-shadow: 0 5px 0 #992200, 0 8px 15px rgba(0,0,0,0.5);
    transition: all 0.1s;
}

#start-btn:hover {
    background: linear-gradient(to bottom, #ff8811, #ff5500);
    //box-shadow: 0 5px 0 #992200, 0 8px 20px rgba(255, 85, 0, 0.3);
}

#start-btn:active {
    box-shadow: 0 1px 0 #992200, 0 3px 5px rgba(0,0,0,0.5);
    transform: translateY(4px);
}

/* 蜘蛛 */
#id_kumo {
	-webkit-animation: kumo_animation 15s ease-in both;
	animation: kumo_animation 15s ease-in both;
	-webkit-animation-fill-mode: backwards;
	animation-fill-mode: backwards;
	opacity: 1.0;
	animation-iteration-count:infinite;
	animation-timing-function:ease-in-out;
	animation-delay: 1.8s;
}
/* 蜘蛛の糸 */
#id_ito {
	-webkit-animation: ito_animation 15s ease-in both;
	animation: ito_animation 15s ease-in both;
	-webkit-animation-fill-mode: backwards;
	animation-fill-mode: backwards;
	animation-iteration-count:infinite;
	animation-timing-function:ease-in-out;
	animation-delay: 1.8s;
}

@keyframes float {
    0% { transform: translateY(0px) rotate(-3deg); }
    100% { transform: translateY(-12px) rotate(3deg); }
}

@keyframes explode {
    0% { transform: scale(0.5); opacity: 1; filter: drop-shadow(0 0 5px #ff5500); }
    50% { transform: scale(1.6); opacity: 1; filter: drop-shadow(0 0 15px #ff0000); }
    100% { transform: scale(2.2); opacity: 0; }
}

@keyframes hit {
    0% { transform: scale(0.5); opacity: 1; }
    50% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(1.7); opacity: 0; }
}
@keyframes blink {
    0% { opacity: 1; }
    100% { opacity: 0.3; }
}
@keyframes fadeout {
    0% { opacity: 1.0; }
    100% { opacity: 0.0; }
}

@keyframes kumo_animation {
	0% {transform:translateY(0px);}
	20% {transform:translateY(170px);}
	60% {transform:translateY(170px);}
	87% {transform:translateY(0px);}
	100% {transform:translateY(0px);}
}
@keyframes ito_animation {
	0% {height: 5%;}
	20% {height: 60%;}
	60% {height: 60%;}
	87% {height: 5%;}
	100% {height: 5%;}
}
