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

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #fff;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.title {
    text-align: center;
    margin-bottom: 3rem;
}

.gradient-text {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(45deg, #fff, #f0f0f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    display: block;
    font-size: 1.2rem;
    font-weight: 400;
    opacity: 0.8;
    margin-top: 0.5rem;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.wheel-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

#wheelCanvas {
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.3));
    border-radius: 50%;
}

.spin-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #ff6b6b, #ff8e53);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.spin-button:hover {
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.spin-button:active {
    transform: translate(-50%, -50%) scale(0.95);
}

.spin-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 107, 107, 0.3) 0%, transparent 70%);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0% { transform: translate(-50%, -50%) scale(0.8); opacity: 0.5; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(0.8); opacity: 0.5; }
}

.controls {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.input-section, .settings-section, .history-section {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.input-section h3, .settings-section h3, .history-section h3 {
    margin-bottom: 1rem;
    font-weight: 600;
}

#namesInput {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    font-size: 1rem;
    resize: vertical;
    min-height: 120px;
}

.input-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.btn-secondary {
    flex: 1;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.btn-primary {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #ff6b6b, #ff8e53);
    border: none;
    border-radius: 10px;
    color: white;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.setting-group {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.setting-group label {
    flex: 1;
    font-weight: 500;
}

.setting-group input[type="range"] {
    flex: 2;
    -webkit-appearance: none;
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    outline: none;
}

.setting-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: #ff6b6b;
    border-radius: 50%;
    cursor: pointer;
}

.setting-group span {
    min-width: 30px;
    text-align: right;
    font-weight: 600;
}

.winners-list {
    list-style: none;
    max-height: 200px;
    overflow-y: auto;
}

.winners-list li {
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    margin-bottom: 0.5rem;
    border-radius: 8px;
    animation: slideIn 0.3s ease;
}

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

.empty-state {
    text-align: center;
    opacity: 0.5;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #667eea, #764ba2);
    padding: 3rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.winner-name {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 1rem 0;
    background: linear-gradient(45deg, #fff, #f0f0f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

header {
    position: relative;
    text-align: center;
    margin-bottom: 3rem;
}

.settings-button {
    position: absolute;
    top: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.settings-button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.settings-content {
    padding: 1rem 0;
}

.settings-content .setting-group {
    margin-bottom: 1.5rem;
}

.settings-content .setting-group:last-child {
    margin-bottom: 2rem;
}

/* Hide settings section in controls */
.settings-section {
    display: none;
}

@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .title {
        margin-bottom: 2rem;
    }
    
    .gradient-text {
        font-size: 2rem;
    }
    
    .settings-button {
        position: static;
        margin: 1rem auto;
        display: block;
    }
}