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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #B91E2D 0%, #8B1722 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
    max-width: 800px;
    width: 100%;
}

.header {
    text-align: center;
    margin-bottom: 40px;
}

.logo {
    max-width: 200px;
    margin-bottom: 20px;
}

.title {
    color: #B91E2D;
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 10px;
}

.subtitle {
    color: #666;
    font-size: 16px;
}

.upload-section {
    background: #f8f8f8;
    border: 3px dashed #C9A163;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    margin-bottom: 30px;
    transition: all 0.3s ease;
}

.upload-section:hover {
    background: #fff8f0;
    border-color: #B91E2D;
}

.upload-section.dragover {
    background: #fff8f0;
    border-color: #B91E2D;
    transform: scale(1.02);
}

.file-input-label {
    display: inline-block;
    background: linear-gradient(135deg, #C9A163 0%, #b89153 100%);
    color: white;
    padding: 15px 40px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(201, 161, 99, 0.4);
}

.file-input-label:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(201, 161, 99, 0.6);
}

#fileInput {
    display: none;
}

.file-info {
    margin-top: 15px;
    color: #666;
    font-size: 14px;
}

.rotation-display {
    background: linear-gradient(135deg, #B91E2D 0%, #8B1722 100%);
    border-radius: 15px;
    padding: 60px 30px;
    margin-bottom: 30px;
    min-height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.rotation-display::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(201, 161, 99, 0.1) 0%, transparent 70%);
    animation: pulse 3s ease-in-out infinite;
}

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

.email-display {
    font-size: 36px;
    font-weight: bold;
    color: #C9A163;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    margin-bottom: 20px;
    animation: slideIn 0.3s ease;
    position: relative;
    z-index: 1;
    word-break: break-all;
    max-width: 100%;
}

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

.status-text {
    color: white;
    font-size: 18px;
    position: relative;
    z-index: 1;
}

.winner-announcement {
    background: linear-gradient(135deg, #C9A163 0%, #b89153 100%);
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    animation: celebrate 0.6s ease;
}

@keyframes celebrate {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); opacity: 1; }
}

.winner-text {
    font-size: 28px;
    color: white;
    font-weight: bold;
    margin-bottom: 15px;
}

.winner-email {
    font-size: 32px;
    color: #B91E2D;
    font-weight: bold;
    word-break: break-all;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #C9A163;
    animation: confetti-fall 3s ease-out forwards;
}

@keyframes confetti-fall {
    to {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

.controls {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.btn {
    padding: 15px 50px;
    border: none;
    border-radius: 50px;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

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

.btn-start {
    background: linear-gradient(135deg, #B91E2D 0%, #8B1722 100%);
    color: white;
}

.btn-start:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(185, 30, 45, 0.4);
}

.btn-reset {
    background: linear-gradient(135deg, #C9A163 0%, #b89153 100%);
    color: white;
}

.btn-reset:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(201, 161, 99, 0.4);
}

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

.sparkle {
    position: absolute;
    font-size: 30px;
    animation: sparkle 1s ease-in-out infinite;
}

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

.sparkle.s1 { top: 20%; left: 10%; }
.sparkle.s2 { top: 30%; right: 15%; }
.sparkle.s3 { bottom: 25%; left: 20%; }
.sparkle.s4 { bottom: 30%; right: 10%; }
