body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background-color: #2c3e50;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
}

.container {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    text-align: center;
    max-width: 500px;
    width: 90%;
    position: relative;
    z-index: 10;
}

h1 {
    margin-bottom: 2rem;
    color: #2c3e50;
}

.roulette-wrapper {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 0 auto 2.5rem;
}

.roulette-container {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    overflow: hidden;
}

canvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* 画像の代わりにCSSで作る中心のピン */
.center-pin {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background-color: white;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    z-index: 5;
}

/* 針の画像 */
.pointer-img {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px; /* 画像のサイズに合わせて調整 */
    height: auto;
    z-index: 20;
    filter: drop-shadow(0 3px 3px rgba(0,0,0,0.3));
}

.controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    text-align: left;
}

textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #eee;
    border-radius: 12px;
    resize: vertical;
    box-sizing: border-box;
    font-size: 1rem;
}
textarea:focus {
    border-color: #3498db;
    outline: none;
}

.spin-btn {
    background: linear-gradient(to bottom, #e74c3c, #c0392b); /* ボタンを赤系に変更 */
    color: white;
    border: none;
    padding: 15px;
    font-size: 1.3rem;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.3s;
    font-weight: bold;
    box-shadow: 0 4px 0 #962d22;
}

.spin-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #962d22;
}

.spin-btn:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #962d22;
}

.spin-btn:disabled {
    background: #bdc3c7;
    box-shadow: none;
    color: #7f8c8d;
    cursor: not-allowed;
    transform: none;
}

.result {
    font-size: 1.5rem;
    font-weight: bold;
    min-height: 2rem;
    text-align: center;
    margin-top: 1rem;
}

/* 紙吹雪 */
#confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: #f00;
}

@keyframes fall {
    0% { transform: translateY(-10vh) rotate(0deg); opacity: 1; }
    100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}