@charset "utf-8";

/*=========== 基礎設定 ===========*/
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: rgba(0,0,0,0);
}

body {
    font-family: "メイリオ", Meiryo, sans-serif;
    background-color: #d6f528;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center; /* 垂直方向の中央 */
    align-items: center;     /* 水平方向の中央 */
    min-height: 100vh;       /* 画面の高さを基準にする */
    margin: 0;
    padding: 20px;
    overflow: hidden; 
}

/* --- タイトル(h1) --- */
h1 {
    font-size: clamp(15px, 4vw, 20px);
    margin: 15px 0 20px;
    line-height: 1.3;
}

/* --- ルーレット本体 --- */
.roulette-container {
    width: 200px; /* スマホでの基本サイズ */
    height: 200px;
    margin: 50px auto; 
    position: relative;
    cursor: pointer;
    border-radius: 50%;
    background-color: #f0f0f0;
    flex-shrink: 0;
}

/* --- 写真の設定 --- */
.roulette-inner img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: none;
    z-index: 10;
    /* 止まった時の拡大を滑らかにする */
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* --- 光る文字(p) --- */
p {
    font-weight: bold;
    position: relative;
    display: inline-block;
    color: #333;
    overflow: hidden;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    background: linear-gradient(to right, #333 0%, #333 45%, #fff 50%, #333 55%, #333 100%);
    background-size: 140% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine 3s linear infinite;
}

/* --- 閉じるボタン --- */
.close-button {
    padding: 5px 25px;
    font-size: 15px;
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
}

/* --- その他演出 --- */
.roulette-container::before {
    content: "TOUCH!";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #999;
    font-weight: bold;
}
.roulette-container.started::before { display: none; }

@keyframes shine {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}
/* ★PC・タブレット向けの調整 */
@media (min-width: 900px) {
    .roulette-container {
        width: 300px; /* PCでは大きくする */
        height: 300px;
        margin: 50px auto; /* 上下の余白も広げて中央感を出す */
    }
    h1 {
        font-size: 30px; /* 文字も少し大きく */
        margin-top: 20px;
    }
    p {
        font-size: 15px;
        margin-top: 25px;
    }
}

/* --- 写真の設定 --- */
.roulette-inner img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: none;
    z-index: 10;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}