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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
}

main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.roulette-container {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

#roulette {
    margin-bottom: 30px;
}

.spin-button {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    border: none;
    padding: 20px 60px;
    font-size: 1.5rem;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(238, 90, 36, 0.4);
}

.spin-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 20px rgba(238, 90, 36, 0.5);
}

.spin-button:active {
    transform: translateY(0);
}

.controls {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.options-section h2 {
    margin-bottom: 20px;
    color: #333;
}

.options-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.option-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 10px;
    transition: background 0.3s ease;
}

.option-item:hover {
    background: #e9ecef;
}

.color-picker {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.option-text {
    flex: 1;
    padding: 8px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.option-text:focus {
    outline: none;
    border-color: #667eea;
}

.option-weight {
    width: 60px;
    padding: 8px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    text-align: center;
}

.delete-button {
    width: 35px;
    height: 35px;
    border: none;
    background: #ff6b6b;
    color: white;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    transition: all 0.3s ease;
}

.delete-button:hover {
    background: #ee5a24;
    transform: scale(1.1);
}

.add-button {
    width: 100%;
    padding: 12px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.add-button:hover {
    background: #5a5fcf;
    transform: translateY(-1px);
}

.settings-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #e9ecef;
}

.settings-section h3 {
    margin-bottom: 15px;
    color: #666;
}

.setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.setting-item input[type="number"] {
    width: 80px;
    padding: 5px 10px;
    border: 2px solid #e9ecef;
    border-radius: 5px;
}

.setting-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.result-section {
    grid-column: 1 / -1;
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    text-align: center;
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-section h2 {
    margin-bottom: 20px;
    color: #333;
}

.winner-text {
    font-size: 2.5rem;
    font-weight: bold;
    color: #667eea;
    animation: bounce 0.5s ease-out;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

footer {
    grid-column: 1 / -1;
    text-align: center;
    margin-top: 40px;
    color: white;
    opacity: 0.8;
}

footer a {
    color: white;
    text-decoration: none;
    border-bottom: 1px solid white;
}

footer a:hover {
    opacity: 0.8;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    main {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .roulette-container {
        padding: 20px;
    }
    
    #roulette {
        width: 300px;
        height: 300px;
    }
    
    .spin-button {
        padding: 15px 40px;
        font-size: 1.2rem;
    }
    
    .winner-text {
        font-size: 2rem;
    }
}

/* スクロールバーのスタイリング */
.options-list::-webkit-scrollbar {
    width: 8px;
}

.options-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.options-list::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.options-list::-webkit-scrollbar-thumb:hover {
    background: #555;
}