* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Microsoft YaHei', sans-serif;
}

:root {
    --primary: #00ffff;
    --secondary: #ff00ff;
    --accent: #ffff00;
    --dark: #0a0a1f;
    --darker: #050510;
    --light: #e0e0ff;
}

body {
    background: linear-gradient(135deg, var(--darker) 0%, var(--dark) 100%);
    color: var(--light);
    min-height: 100vh;
    line-height: 1.6;
    padding: 20px;
}

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

/* 头部样式 */
.header {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px;
    background: rgba(10, 10, 31, 0.7);
    border-radius: 15px;
    border: 1px solid rgba(0, 255, 255, 0.3);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.logo img {
    width: 50px;
    height: 50px;
    margin-right: 15px;
    filter: drop-shadow(0 0 5px var(--primary));
}

.logo h1 {
    font-size: 1.8rem;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.header h2 {
    font-size: 1.5rem;
    color: var(--accent);
    text-shadow: 0 0 10px rgba(255, 255, 0, 0.5);
}

/* 主要内容区域 */
.main-content {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

/* 倒计时样式 */
.countdown-section {
    text-align: center;
    padding: 25px;
    background: rgba(10, 10, 31, 0.7);
    border-radius: 15px;
    border: 1px solid rgba(255, 0, 255, 0.3);
    box-shadow: 0 0 20px rgba(255, 0, 255, 0.2);
}

.countdown-section h3 {
    margin-bottom: 15px;
    color: var(--secondary);
    font-size: 1.3rem;
}

.countdown {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary);
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.7);
    display: flex;
    justify-content: center;
    gap: 5px;
}

.countdown span {
    background: rgba(0, 0, 0, 0.5);
    padding: 10px 15px;
    border-radius: 8px;
    min-width: 70px;
    display: inline-block;
}

/* 参与区域样式 */
.participate-section {
    text-align: center;
    padding: 25px;
    background: rgba(10, 10, 31, 0.7);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 0, 0.3);
    box-shadow: 0 0 20px rgba(255, 255, 0, 0.2);
}

.participate-section h3 {
    margin-bottom: 20px;
    color: var(--accent);
    font-size: 1.3rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 400px;
    margin: 0 auto;
}

input, select {
    padding: 15px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

button {
    padding: 15px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    color: var(--dark);
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
}

button:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.8);
}

button:disabled {
    background: #666;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 5px;
    display: none;
}

.message.success {
    background: rgba(0, 255, 0, 0.2);
    color: #90ee90;
    border: 1px solid rgba(0, 255, 0, 0.3);
    display: block;
}

.message.error {
    background: rgba(255, 0, 0, 0.2);
    color: #ff9999;
    border: 1px solid rgba(255, 0, 0, 0.3);
    display: block;
}

/* 信息区域样式 */
.info-section {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.card {
    padding: 20px;
    background: rgba(10, 10, 31, 0.7);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

.card h4 {
    margin-bottom: 15px;
    color: var(--primary);
    font-size: 1.2rem;
}

.card ul {
    list-style-type: none;
}

.card li {
    padding: 8px 0;
    position: relative;
    padding-left: 20px;
}

.card li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--secondary);
}

.participant-count {
    font-size: 2.5rem;
    font-weight: bold;
    text-align: center;
    color: var(--accent);
    text-shadow: 0 0 10px rgba(255, 255, 0, 0.5);
}

/* 开奖结果样式 */
.results {
    margin-top: 30px;
    text-align: center;
}

.results h2 {
    margin-bottom: 15px;
    font-size: 1.8rem;
    color: var(--accent);
}

.winner-section {
    background: rgba(255, 215, 0, 0.2);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    border: 2px solid #ffd700;
}

.winner-list {
    max-height: 400px;
    overflow-y: auto;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    text-align: left;
}

.winner-item {
    padding: 15px;
    margin-bottom: 10px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.3), rgba(255, 165, 0, 0.3));
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 4px solid #ffd700;
}

.winner-rank {
    font-size: 1.2rem;
    font-weight: bold;
    color: #ffd700;
    min-width: 50px;
}

.winner-name {
    flex-grow: 1;
    font-size: 1.1rem;
    font-weight: bold;
}

.winner-time {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 10px;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: var(--accent);
}

.stat-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

/* 管理页面样式 */
.nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.nav a {
    color: var(--accent);
    text-decoration: none;
    padding: 10px 20px;
    border: 1px solid var(--accent);
    border-radius: 5px;
    transition: all 0.3s;
}

.nav a:hover {
    background: rgba(255, 255, 0, 0.2);
}

.current-activity {
    background: rgba(255, 255, 0, 0.1);
    border: 1px solid rgba(255, 255, 0, 0.3);
}

.current-activity h3 {
    color: var(--accent);
}

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

label {
    display: block;
    margin-bottom: 5px;
    color: var(--primary);
}

.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

th {
    background: rgba(0, 255, 255, 0.1);
    color: var(--primary);
}

tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.active-badge {
    background: #00ff00;
    color: #000;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: bold;
}

.action-buttons {
    display: flex;
    gap: 5px;
}

.action-buttons button {
    padding: 5px 10px;
    font-size: 0.8rem;
}

.btn-danger {
    background: linear-gradient(90deg, #ff416c, #ff4b2b);
}

.btn-secondary {
    background: linear-gradient(90deg, #666, #999);
}

/* 密码保护样式 */
.password-form {
    max-width: 400px;
    margin: 100px auto;
    padding: 30px;
    background: rgba(10, 10, 31, 0.7);
    border-radius: 15px;
    border: 1px solid rgba(0, 255, 255, 0.3);
    text-align: center;
}

.password-form h2 {
    margin-bottom: 20px;
    color: var(--primary);
}

/* 响应式设计 */
@media (min-width: 768px) {
    .main-content {
        grid-template-columns: 1fr 1fr;
    }
    
    .info-section {
        grid-column: 1 / span 2;
        grid-template-columns: 1fr 1fr;
    }
    
    .input-group {
        flex-direction: row;
    }
    
    input {
        flex: 1;
    }
    
    button {
        width: auto;
    }
}

@media (min-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr 1fr 1fr;
    }
    
    .info-section {
        grid-column: auto;
        grid-template-columns: 1fr;
    }
    
    .countdown {
        font-size: 3rem;
    }
}

@media (max-width: 600px) {
    .container {
        padding: 10px;
    }
    
    .header h1 {
        font-size: 1.5rem;
    }
    
    .countdown {
        font-size: 1.8rem;
    }
    
    .countdown span {
        min-width: 50px;
        padding: 8px 10px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .winner-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .winner-time {
        align-self: flex-end;
        margin-top: 5px;
    }
}

/* 烟花效果 */
.firework {
    position: fixed;
    width: 10px;
    height: 10px;
    background: #ffd700;
    border-radius: 50%;
    pointer-events: none;
    z-index: 1000;
}
