/* 全体のスタイル */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background-color: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
}

/* 入力セクション */
.input-section {
    margin-bottom: 30px;
}

label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
}

textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    height: 100px;
    resize: vertical;
    font-size: 16px;
}

/* ルーレットセクション */
.roulette-section {
    position: relative;
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.roulette {
    position: relative;
    width: 400px;
    height: 400px;
    margin: 0 auto;
    border-radius: 50%;
    background-color: #3498db;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    will-change: transform;
}

.roulette-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform-origin: center;
    z-index: 5;
}

.name-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none;
}

.roulette-item-text {
    position: absolute;
    width: 120px;
    text-align: center;
    padding: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: white;
    font-weight: bold;
    font-size: 18px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
    z-index: 10;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    will-change: transform, left, top;
}

.result-container {
    position: relative;
    margin-top: 20px;
    text-align: center;
    width: 100%;
}

.result {
    background-color: rgba(255, 255, 255, 0.9);
    color: #333;
    padding: 15px 20px;
    border-radius: 10px;
    font-size: 20px;
    font-weight: bold;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    display: inline-block;
}

.result a {
    color: #0066c0;
    text-decoration: none;
    transition: color 0.2s;
}

.result a:hover {
    color: #ff9900;
    text-decoration: underline;
}

.roulette-pointer {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-top: 30px solid #e74c3c;
    z-index: 30;
}

/* ボタンセクション */
.button-section {
    text-align: center;
    margin-top: 20px;
}

.button {
    padding: 12px 30px;
    margin: 0 10px;
    font-size: 18px;
    font-weight: bold;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.1s;
}

#start-button {
    background-color: #2ecc71;
    color: white;
}

#start-button:hover {
    background-color: #27ae60;
}

#stop-button {
    background-color: #e74c3c;
    color: white;
}

#stop-button:hover {
    background-color: #c0392b;
}

.button:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
}

.button:active {
    transform: scale(0.98);
}

/* レスポンシブ対応 */
@media (max-width: 600px) {
    .container {
        padding: 15px;
    }
    
    .roulette {
        width: 300px;
        height: 300px;
    }
    
    .result {
        font-size: 16px;
    }
    
    .roulette-item-text {
        width: 100px;
        font-size: 16px;
    }
    
    .button {
        padding: 10px 20px;
        font-size: 16px;
    }
}
