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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    position: relative;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    padding: 40px 0;
    color: white;
}

header h1 {
    font-size: 3.5em;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    letter-spacing: -1px;
}

.subtitle {
    font-size: 1.2em;
    opacity: 0.95;
    font-weight: 400;
}

.language-switcher {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 100;
}

#languageSelect {
    padding: 8px 16px;
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

#languageSelect:hover {
    background: white;
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

main {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.wheel-container {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

#wheel {
    display: block;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.2));
}

.pointer {
    position: absolute;
    top: 50%;
    right: calc(50% - 250px);
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 20px 0 20px 40px;
    border-color: transparent transparent transparent #ff4757;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.3));
    z-index: 10;
}

.spin-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #ff6b6b 0%, #ff4757 100%);
    color: white;
    border: none;
    border-radius: 50%;
    width: 100px;
    height: 100px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(255, 71, 87, 0.4);
    z-index: 15;
}

.spin-button:hover:not(:disabled) {
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 12px 35px rgba(255, 71, 87, 0.5);
}

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

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

.controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.options-panel,
.settings-panel {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.options-panel h2,
.settings-panel h2 {
    font-size: 1.5em;
    margin-bottom: 20px;
    color: #2c3e50;
    font-weight: 600;
}

.options-list {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 20px;
    padding-right: 10px;
}

.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;
}

.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: 2px solid #dee2e6;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.color-picker:hover {
    transform: scale(1.1);
}

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

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

.option-weight {
    width: 80px;
    padding: 10px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
    transition: border-color 0.3s ease;
}

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

.btn-remove {
    width: 36px;
    height: 36px;
    border: none;
    background: #ff4757;
    color: white;
    border-radius: 8px;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-remove:hover {
    background: #ff3838;
    transform: scale(1.1);
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #f8f9fa;
    color: #495057;
    border: 2px solid #dee2e6;
    width: 100%;
}

.btn-secondary:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

.btn-danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff4757 100%);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 71, 87, 0.4);
}

.setting-group {
    margin-bottom: 25px;
}

.setting-group label {
    display: block;
    margin-bottom: 10px;
    color: #495057;
    font-weight: 500;
}

.setting-group input[type="range"] {
    width: 100%;
    margin-bottom: 5px;
}

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

#durationValue {
    display: inline-block;
    padding: 5px 10px;
    background: #f8f9fa;
    border-radius: 6px;
    font-weight: 600;
    color: #667eea;
}

.result-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.result-modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

.modal-content h2 {
    font-size: 2em;
    margin-bottom: 20px;
    color: #2c3e50;
}

.result-text {
    font-size: 2.5em;
    font-weight: 700;
    color: #667eea;
    margin: 30px 0;
    animation: pulse 0.5s ease;
}

footer {
    text-align: center;
    padding: 20px;
    color: white;
    opacity: 0.9;
}

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

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

@keyframes pulse {
    0% {
        transform: scale(0.8);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

@media (max-width: 968px) {
    .controls {
        grid-template-columns: 1fr;
    }
    
    header h1 {
        font-size: 2.5em;
    }
    
    .wheel-container {
        padding: 20px;
    }
    
    #wheel {
        width: 100%;
        max-width: 400px;
        height: auto;
    }
    
    .pointer {
        right: calc(50% - 200px);
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 2em;
    }
    
    .subtitle {
        font-size: 1em;
    }
    
    #wheel {
        max-width: 300px;
    }
    
    .pointer {
        right: calc(50% - 150px);
        border-width: 15px 0 15px 30px;
    }
    
    .spin-button {
        width: 80px;
        height: 80px;
        font-size: 16px;
    }
    
    .result-text {
        font-size: 2em;
    }
}