body, html {
    font-family: 'M PLUS Rounded 1c', sans-serif;
    background: linear-gradient(to bottom, #f0e6ff, #d2f4ff, #a4eaff); /* 明るく可愛らしいグラデーション */
    color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    text-align: center;
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
    padding: 20px 0;
    box-sizing: border-box;
}

.container {
    background-color: rgba(255, 255, 255, 0.9);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(5px);
    border: 2px solid rgba(255, 255, 255, 1);
    max-width: 400px;
    width: 90%;
    margin: auto;
    z-index: 1;
    position: relative;
    box-sizing: border-box;
}

header h1 {
    color: #6a5acd;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
    font-size: 2.2em;
    margin-bottom: 5px;
}

header p {
    color: #555;
    font-size: 0.9em;
}

#star-index-display {
    padding: 20px 0;
    border-bottom: 1px dashed #ccc;
    position: relative;
}

#index-value {
    font-size: 4.5em;
    font-weight: bold;
    color: #ff69b4;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

#index-message {
    font-size: 1.3em;
    color: #6a5acd;
    margin-top: 10px;
}

#cute-character {
    width: 100px;
    height: 100px;
    margin: 20px auto;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: transform 0.5s ease;
    animation: float-animation 3s ease-in-out infinite alternate;
}

@keyframes float-animation {
    0% { transform: translateY(0px) rotate(0deg); }
    100% { transform: translateY(-15px) rotate(-5deg); }
}

#details {
    margin-top: 20px;
}

#details h2 {
    color: #555;
    font-size: 1.2em;
    border-bottom: 2px solid #ff91a4;
    display: inline-block;
    padding-bottom: 5px;
}

#details p {
    margin: 5px 0;
    color: #555;
}

#refresh-btn {
    padding: 12px 24px;
    margin-top: 20px;
    border: none;
    background-color: #ff91a4;
    color: white;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1.1em;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#refresh-btn:hover {
    transform: scale(1.05);
    background-color: #ff7f95;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.weather-box {
    background-color: rgba(255, 255, 255, 0.8);
    padding: 15px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
    text-align: left;
}

.weather-box h3 {
    margin-top: 0;
    color: #6a5acd;
    font-size: 1.2em;
    border-bottom: 1px solid #ff91a4;
    padding-bottom: 5px;
}

.weather-box p {
    margin: 5px 0;
}

footer {
    font-size: 0.8em;
    color: #888;
    margin-top: 20px;
}

#takase02 {
    position: fixed;
    width: 80px;
    height: 80px;
    top: 5%;
    left: 10%;
    animation: takase-move 20s linear infinite, takase-blink 3s infinite;
    z-index: 10;
    object-fit: contain;
}

#iwaya02 {
    position: fixed;
    width: 80px; /* takase02と同じサイズに */
    height: 80px; /* takase02と同じサイズに */
    bottom: 5%;
    right: 15%;
    /* takase02と同じアニメーションを適用 */
    animation: takase-move 22s linear infinite reverse, takase-blink 4s infinite; /* 逆方向・少し異なる秒数で個性も出す */
    z-index: 10;
    object-fit: contain;
}

@keyframes takase-move {
    0% { transform: translate(0vw, 0vh) rotate(0deg); }
    25% { transform: translate(20vw, 15vh) rotate(30deg); }
    50% { transform: translate(5vw, 30vh) rotate(-20deg); }
    75% { transform: translate(30vw, 20vh) rotate(15deg); }
    100% { transform: translate(0vw, 0vh) rotate(0deg); }
}

@keyframes takase-blink {
    0%, 20%, 40%, 60%, 80%, 100% { opacity: 1; }
    10%, 30%, 50%, 70%, 90% { opacity: 0; }
}

/* iwaya02はtakase-moveとtakase-blinkを使い回す */
/* iwaya-move と iwaya-pulse は不要になる */

@media (max-width: 768px) {
    #takase02 {
        width: 60px;
        height: 60px;
        top: 2%;
        left: 5%;
    }
    #iwaya02 {
        width: 60px;
        height: 60px;
        bottom: 2%;
        right: 5%;
    }
}
