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

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --success-color: #27ae60;
    --background-color: #f8f9fa;
    --text-color: #333;
    --border-color: #ddd;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

header h1 {
    font-size: 2.5rem;
    font-weight: 300;
    color: var(--primary-color);
    letter-spacing: -1px;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Upload Section */
.upload-section {
    background: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: var(--shadow);
}

.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 60px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-area:hover {
    border-color: var(--secondary-color);
    background-color: #f0f8ff;
}

.upload-area.dragover {
    border-color: var(--secondary-color);
    background-color: #e8f4f8;
    transform: scale(1.02);
}

.upload-area svg {
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.upload-area p {
    color: #666;
    font-size: 1rem;
}

.file-info {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.file-name {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.participants-count {
    color: #666;
    font-size: 0.95rem;
}

/* Controls */
.controls {
    background: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--primary-color);
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--secondary-color);
}

/* Buttons */
.btn-primary,
.btn-secondary {
    width: 100%;
    padding: 14px 28px;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background-color: transparent;
    color: var(--secondary-color);
    border: 2px solid var(--secondary-color);
    margin-top: 20px;
}

.btn-secondary:hover {
    background-color: var(--secondary-color);
    color: white;
}

/* Results */
.results {
    background: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: var(--shadow);
}

.results h2 {
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--primary-color);
    margin-bottom: 24px;
    text-align: center;
}

.winners-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.winner-item {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 16px;
    animation: slideIn 0.5s ease;
}

.winner-number {
    font-size: 1.5rem;
    font-weight: 700;
    min-width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.winner-name {
    font-size: 1.1rem;
    font-weight: 500;
}

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

/* Loading */
.loading {
    background: white;
    border-radius: 8px;
    padding: 60px 30px;
    box-shadow: var(--shadow);
    text-align: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top-color: var(--secondary-color);
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading p {
    color: #666;
    font-size: 1rem;
}

/* Footer */
footer {
    text-align: center;
    padding: 40px 0;
    color: #999;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    header h1 {
        font-size: 2rem;
    }

    .upload-area {
        padding: 40px 15px;
    }

    .controls,
    .upload-section,
    .results {
        padding: 20px;
    }

    .winner-item {
        padding: 15px;
    }

    .winner-name {
        font-size: 1rem;
    }

    .winner-number {
        font-size: 1.2rem;
        min-width: 35px;
        height: 35px;
    }
}
