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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    overflow: hidden;
    height: 100vh;
}

.container {
    display: flex;
    height: 100vh;
}

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

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

.spin-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

#spinBtn {
    background: #ff4757;
    color: white;
    border: none;
    border-radius: 50%;
    width: 80px;
    height: 80px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 71, 87, 0.4);
    transition: all 0.3s ease;
}

#spinBtn:hover {
    background: #ff3742;
    transform: scale(1.05);
}

#spinBtn:active {
    transform: scale(0.95);
}

.sidebar {
    width: 320px;
    background: #2c3e50;
    display: flex;
    flex-direction: column;
    border-left: 1px solid #34495e;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #34495e;
}

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.tab {
    background: #34495e;
    color: #bdc3c7;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.tab.active {
    background: #3498db;
    color: white;
}

.count {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    margin-left: 5px;
}

.hide-btn {
    background: #34495e;
    color: #bdc3c7;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    float: right;
}

.tab-content {
    display: none;
    flex: 1;
    overflow-y: auto;
}

.tab-content.active {
    display: flex;
    flex-direction: column;
}

.controls {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 20px;
    border-bottom: 1px solid #34495e;
    flex-wrap: wrap;
}

.control-btn {
    background: #34495e;
    color: #bdc3c7;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.control-btn:hover {
    background: #404b5c;
}

.advanced-checkbox {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #bdc3c7;
    margin-left: auto;
}

.participants-list {
    flex: 1;
    padding: 10px;
}

.participant-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: #34495e;
    border-radius: 8px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.participant-item:hover {
    background: #404b5c;
}

.participant-item.hidden {
    opacity: 0.5;
    background: #2c3e50;
}

.participant-controls {
    display: flex;
    gap: 5px;
}

.control-icon {
    width: 24px;
    height: 24px;
    background: #5a6c7d;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.3s ease;
}

.control-icon:hover {
    background: #6c7d8e;
}

.control-icon.active {
    background: #3498db;
    color: white;
}

.participant-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #5a6c7d;
}

.participant-name {
    flex: 1;
    font-weight: 500;
}

.participant-weight {
    background: #5a6c7d;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: bold;
}

.add-entry-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 15px;
    margin: 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.add-entry-btn:hover {
    background: #2980b9;
}

.results-list {
    padding: 20px;
}

.result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #34495e;
    border-radius: 8px;
    margin-bottom: 10px;
}

.result-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.result-info {
    flex: 1;
}

.result-name {
    font-weight: 500;
    margin-bottom: 2px;
}

.result-time {
    font-size: 12px;
    color: #bdc3c7;
}

.sidebar-footer {
    padding: 15px 20px;
    border-top: 1px solid #34495e;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #bdc3c7;
}

.changelog {
    color: #3498db;
    text-decoration: none;
}

.changelog:hover {
    text-decoration: underline;
}

/* Wheel spinning animation */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.spinning {
    animation: spin 3s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: 300px;
    }

    .wheel-container {
        flex: 1;
    }

    #wheelCanvas {
        width: 300px;
        height: 300px;
    }
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: #2c3e50;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    max-width: 400px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.modal-overlay.show .modal {
    transform: scale(1);
}

.modal-header {
    padding: 25px 25px 0 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #34495e;
}

.modal-header h2 {
    margin: 0;
    color: #fff;
    font-size: 24px;
    font-weight: bold;
}

.modal-close {
    background: none;
    border: none;
    color: #bdc3c7;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #34495e;
    color: #fff;
}

.modal-body {
    padding: 30px 25px;
    text-align: center;
}

.winner-avatar {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.winner-avatar img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #3498db;
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.3);
}

.winner-info h3 {
    margin: 0 0 10px 0;
    color: #fff;
    font-size: 28px;
    font-weight: bold;
}

.winner-message {
    margin: 0;
    color: #bdc3c7;
    font-size: 16px;
}

.modal-footer {
    padding: 0 25px 25px 25px;
    display: flex;
    gap: 15px;
    justify-content: center;
}

.modal-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
}

.modal-btn.primary {
    background: #3498db;
    color: white;
}

.modal-btn.primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.modal-btn.secondary {
    background: #34495e;
    color: #bdc3c7;
}

.modal-btn.secondary:hover {
    background: #404b5c;
    color: #fff;
    transform: translateY(-2px);
}

/* Modal animations */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes modalFadeOut {
    from {
        opacity: 1;
        transform: scale(1);
    }

    to {
        opacity: 0;
        transform: scale(0.8);
    }
}