* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

#container {
    position: relative;  /* 親要素を相対位置にすることで、絶対位置を持つ子要素がこの範囲内で動くようにする */
    width: 100vw;
    height: 100vh;
    background: linear-gradient(45deg, #ff0000, #00ff00, #000fff, #ff00ff, #ffffff);
    background-size: 400% 400%;
    animation: gradient 10s ease infinite;
    overflow: hidden;
}

@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.randomWord {
    position: absolute;  /* これがないと要素がランダムな位置に動かない */
    font-size: 30px;
    color: #fff;
    font-family: 'Arial Black', sans-serif;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
    animation: pulse 1.5s infinite ease-in-out;
    transition: transform 0.5s ease-in-out, font-size 0.5s ease-in-out, color 0.5s ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.randomWord:hover {
    color: #ff7f50;
    font-size: 40px;
    text-shadow: 4px 4px 8px rgba(0, 0, 0, 0.7);
    transition: color 0.3s, font-size 0.3s;
}
