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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #ffffff;
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

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

header {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}

header h1 {
    color: #1a1a1a;
    font-size: 2.5rem;
    font-weight: 800;
}

.btn-reset {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    padding: 12px 24px;
    background: #ff6b6b;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
    font-family: 'Inter', sans-serif;
}

.btn-reset:hover {
    background: #ff5252;
    transform: translateY(-50%) translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 20px;
    align-items: start;
}

/* Input Section */
.input-section {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border: 1px solid #f0f0f0;
}

.input-section h2 {
    margin-bottom: 15px;
    color: #1a1a1a;
    font-weight: 700;
}

.input-group {
    margin-bottom: 15px;
}

#clubInput {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    resize: vertical;
    font-family: inherit;
}

#clubInput:focus {
    outline: none;
    border-color: #667eea;
}

.button-group {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
    flex: 1;
}

.btn-primary {
    background: #1a1a1a;
    color: white;
}

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

.btn-secondary {
    background: #e0e0e0;
    color: #333;
}

.btn-secondary:hover {
    background: #d0d0d0;
}

.clubs-list {
    margin-top: 20px;
}

.clubs-list h3 {
    color: #1a1a1a;
    margin-bottom: 10px;
    font-size: 16px;
    font-weight: 600;
}

#clubsList {
    list-style: none;
    max-height: 200px;
    overflow-y: auto;
}

#clubsList li {
    padding: 8px 12px;
    margin-bottom: 5px;
    background: #f5f5f5;
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#clubsList li .club-name {
    flex: 1;
}

#clubsList li .remove-btn {
    background: #ff6b6b;
    color: white;
    border: none;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

#clubsList li .remove-btn:hover {
    background: #ff5252;
}

/* Wheel Section */
.wheel-section {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.wheel-container {
    position: relative;
    width: 500px;
    height: 500px;
    margin: 0 auto;
}

.pointer {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-top: 40px solid #ff6b6b;
    z-index: 10;
    filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.3));
}

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

.center-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: none;
    background: #1a1a1a;
    color: white;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.3s;
    z-index: 5;
}

.center-button:hover {
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 7px 25px rgba(0, 0, 0, 0.4);
}

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

.center-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.instruction {
    margin-top: 20px;
    text-align: center;
    color: #666;
    font-size: 16px;
}

.powered-by {
    margin-top: 10px;
    font-size: 14px;
    color: #999;
    font-weight: 500;
}

/* Results Section */
.results-section {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border: 1px solid #f0f0f0;
}

.results-section h2 {
    margin-bottom: 20px;
    color: #1a1a1a;
    font-weight: 700;
}

.current-winner {
    background: #1a1a1a;
    color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    margin-bottom: 20px;
}

.current-winner .label {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 10px;
}

.current-winner .winner-name {
    font-size: 24px;
    font-weight: bold;
}

.results-history h3 {
    color: #1a1a1a;
    margin-bottom: 10px;
    font-size: 16px;
    font-weight: 600;
}

#resultsList {
    list-style: none;
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 15px;
}

#resultsList li {
    padding: 10px 12px;
    margin-bottom: 5px;
    background: #f5f5f5;
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#resultsList li .result-number {
    background: #1a1a1a;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

#resultsList li .result-name {
    flex: 1;
    margin-left: 10px;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 1fr;
    }

    .wheel-container {
        width: 400px;
        height: 400px;
    }

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

@media (max-width: 768px) {
    header h1 {
        font-size: 1.8rem;
    }

    .wheel-container {
        width: 300px;
        height: 300px;
    }

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

    .center-button {
        width: 80px;
        height: 80px;
        font-size: 16px;
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease-in-out;
}

.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
}

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

.modal-content h2 {
    color: #1a1a1a;
    margin-bottom: 20px;
    font-size: 28px;
    font-weight: 700;
}

.modal-club-name {
    font-size: 32px;
    font-weight: 800;
    color: #1a1a1a;
    margin: 20px 0;
    padding: 20px;
    background: #f5f5f5;
    border-radius: 10px;
}

.modal-question {
    font-size: 16px;
    color: #666;
    margin-bottom: 30px;
}

.modal-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.modal-buttons .btn {
    flex: 1;
    padding: 15px 25px;
    font-size: 16px;
}

.btn-danger {
    background: #ff6b6b;
    color: white;
}

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

/* Animation for spinning */
@keyframes celebrate {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.celebrate {
    animation: celebrate 0.5s ease-in-out 3;
}

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

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