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

/* 全屏覆盖层 */
.fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: all 0.5s ease;
    opacity: 0;
    visibility: hidden;
}

.fullscreen-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* 全屏结果显示 */
.fullscreen-result {
    text-align: center;
    color: white;
}

.fullscreen-winners {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin: 40px 0;
    max-width: 95%;
}

.fullscreen-winner {
    font-size: 5rem;
    font-weight: bold;
    color: white;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.8);
    margin-bottom: 20px;
    flex: 0 0 calc(25% - 30px);
    min-width: auto;
    max-width: none;
    white-space: nowrap;
    text-align: center;
    padding: 20px 40px;
    border-radius: 20px;
    background-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
    .fullscreen-winner {
        font-size: 3rem;
        min-width: 150px;
    }
}

@keyframes fullscreenWinnerAppear {
    0% {
        transform: scale(0.8) rotate(0deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.fullscreen-label {
    font-size: 3rem;
    margin-bottom: 40px;
    animation: fadeIn 2s ease-out;
}

/* 全屏抽签过程样式 */
.draw-process {
    text-align: center;
    color: white;
}

.draw-process-label {
    font-size: 4rem;
    margin-bottom: 40px;
    animation: pulse 1s ease-in-out infinite;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.8);
}

.draw-process-name {
    font-size: 10rem;
    font-weight: bold;
    color: white;
    text-shadow: 0 0 50px rgba(255, 255, 255, 0.8);
}

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

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

/* 礼花效果 */
.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    background-color: #f00;
    opacity: 0;
    animation: confetti-fall 3s linear infinite;
    z-index: 9999;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(-10vh) translateX(0) rotate(0deg);
        opacity: 1;
    }
    50% {
        transform: translateY(50vh) translateX(var(--horizontal-speed, 50px)) rotate(360deg);
        opacity: 1;
    }
    100% {
        transform: translateY(110vh) translateX(calc(var(--horizontal-speed, 50px) * -1)) rotate(720deg);
        opacity: 0;
    }
}

/* 增强的抽签动画 */
.enhanced-drawing {
    animation: enhancedDrawSpin 0.05s linear infinite;
    transform: scale(1.1);
    box-shadow: 0 0 50px rgba(255, 255, 255, 0.8);
}

@keyframes enhancedDrawSpin {
    0% { transform: rotate(0deg) scale(1.1); }
    100% { transform: rotate(360deg) scale(1.1); }
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #868581 0%, #4E5161 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    padding: 30px;
    max-width: 1200px;
    width: 100%;
    backdrop-filter: blur(10px);
}

header {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    margin-bottom: 30px;
}

.logo-container {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
}

.logo {
    width: 150px;
    height: auto;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.logo:hover {
    opacity: 1;
    transform: scale(1.05);
}

header h1 {
    font-size: 2.5rem;
    color: #FD2007;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    animation: pulse 2s ease-in-out infinite;
    margin: 0;
    text-align: center;
}

@media (max-width: 768px) {
    .logo-container {
        position: static;
        text-align: center;
        margin-bottom: 20px;
    }
    
    .logo {
        width: 120px;
    }
    
    header h1 {
        margin-left: 0;
        font-size: 2rem;
    }
}

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

.setup-section {
    background: linear-gradient(135deg, #FD2007 0%, #C21E0A 100%);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 30px;
    color: white;
}

.input-group {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.input-group:last-child {
    margin-bottom: 0;
}

.input-group label {
    margin-right: 5px;
    font-weight: bold;
    min-width: 60px;
    white-space: nowrap;
}

.input-group input, .input-group select {
    padding: 8px 12px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-right: 15px;
    outline: none;
    transition: all 0.3s ease;
    cursor: pointer;
    width: auto;
    min-width: 80px;
}

.input-group input:focus, .input-group select:focus {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.input-group button {
    padding: 10px 20px;
    background: #FD2007;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.input-group button:hover {
    background: #C21E0A;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.names-section {
    margin-bottom: 30px;
}

.names-section h2 {
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

#nameInputs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.name-input-item {
    display: flex;
    align-items: center;
    background: #f8f9fa;
    padding: 10px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.name-input-item:hover {
    background: #e9ecef;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.name-input-item input {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
    outline: none;
    font-size: 0.9rem;
}

.name-input-item input:focus {
    border-color: #667eea;
}

.name-input-item span {
    margin-right: 10px;
    font-weight: bold;
    color: #667eea;
    min-width: 20px;
    text-align: center;
}

.draw-section {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.draw-btn, .reset-btn {
    padding: 15px 40px;
    font-size: 1.2rem;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.draw-btn {
    background: linear-gradient(135deg, #FD2007 0%, #C21E0A 100%);
    color: white;
    box-shadow: 0 10px 20px rgba(253, 32, 7, 0.3);
}

.draw-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(253, 32, 7, 0.4);
}

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

.reset-btn {
    background: linear-gradient(135deg, #868581 0%, #4E5161 100%);
    color: white;
    box-shadow: 0 10px 20px rgba(134, 133, 129, 0.3);
}

.reset-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(134, 133, 129, 0.4);
}

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

.result-section {
    background: linear-gradient(135deg, #FD2007 0%, #C21E0A 100%);
    padding: 20px;
    border-radius: 15px;
    color: white;
}

.result-section h2 {
    text-align: center;
    margin-bottom: 20px;
}

.result-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.winner-card {
    background: white;
    color: #333;
    padding: 20px 30px;
    border-radius: 15px;
    font-size: 1.5rem;
    font-weight: bold;
    text-align: center;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    animation: winnerAppear 1s ease-out;
    transform-origin: center;
}

@keyframes winnerAppear {
    0% {
        transform: scale(0) rotate(180deg);
        opacity: 0;
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.drawing {
    animation: drawSpin 0.1s linear infinite;
}

@keyframes drawSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@media (max-width: 768px) {
    .container {
        padding: 20px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .input-group {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .input-group input {
        margin-bottom: 10px;
        width: 100%;
    }
    
    #nameInputs {
        grid-template-columns: 1fr;
    }
    
    .draw-section {
        flex-direction: column;
        align-items: center;
    }
    
    .draw-btn, .reset-btn {
        width: 100%;
        max-width: 300px;
    }
}