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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    color: #fff;
}

#app {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 页面切换 */
.page {
    display: none;
}

.page.active {
    display: block;
}

/* 头部 */
.header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header h1 {
    font-size: 28px;
    background: linear-gradient(90deg, #e94560, #ff6b6b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 按钮样式 */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

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

.btn-primary {
    background: linear-gradient(135deg, #e94560, #ff6b6b);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(233, 69, 96, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.2);
}

.btn-success {
    background: linear-gradient(135deg, #00b894, #00cec9);
    color: white;
}

.btn-success:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 184, 148, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #d63031, #e74c3c);
    color: white;
}

.btn-danger:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(214, 48, 49, 0.4);
}

.btn-back {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 16px;
}

.btn-back:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-large {
    padding: 16px 40px;
    font-size: 20px;
}

.btn-small {
    padding: 6px 12px;
    font-size: 14px;
}

/* 首页操作区 */
.actions {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

/* 活动列表 */
.activity-list {
    display: grid;
    gap: 20px;
}

.activity-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}

.activity-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.activity-card h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #e94560;
}

.activity-card-info {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.activity-card-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* 编辑页面 */
.edit-container {
    display: grid;
    gap: 30px;
}

.form-section {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
}

.form-section h2 {
    font-size: 18px;
    margin-bottom: 20px;
    color: #e94560;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.8);
}

.form-group input[type="text"],
.form-group input[type="number"] {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: white;
    font-size: 16px;
}

.form-group input:focus {
    outline: none;
    border-color: #e94560;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #e94560;
}

/* 奖品设置 */
.prize-item {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    display: grid;
    gap: 15px;
}

.prize-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.prize-header h4 {
    color: #ff6b6b;
}

.prize-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.prize-image-preview {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

/* 参与人员 */
.participant-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.participant-count {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

/* 表单操作 */
.form-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* 弹窗 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: #1a1a2e;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h2 {
    color: #e94560;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    padding: 0 10px;
}

.modal-body {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
}

.participant-input {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.participant-input input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: white;
    font-size: 16px;
}

.participant-list {
    display: grid;
    gap: 8px;
}

.participant-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
}

.participant-item.blacklisted {
    opacity: 0.5;
    text-decoration: line-through;
}

/* 抽奖页面 */
.lottery-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    padding: 20px;
}

.prize-selector {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 25px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
}

.prize-selector select {
    padding: 10px 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 16px;
    cursor: pointer;
}

.prize-selector select option {
    background: #1a1a2e;
    color: white;
}

#prize-remaining {
    color: #00b894;
    font-weight: bold;
}

.prize-display {
    text-align: center;
}

.prize-image-container {
    width: 200px;
    height: 200px;
    margin: 0 auto 20px;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
}

.prize-image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

#prize-name-display {
    font-size: 32px;
    color: #e94560;
}

.lottery-display {
    width: 100%;
    max-width: 800px;
    min-height: 150px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lottery-names {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    font-size: 36px;
    font-weight: bold;
    color: #fff;
}

.lottery-name {
    padding: 10px 25px;
    background: linear-gradient(135deg, #e94560, #ff6b6b);
    border-radius: 8px;
    animation: pulse 0.1s infinite;
}

.lottery-name.winner {
    animation: winner 0.5s ease;
    background: linear-gradient(135deg, #f1c40f, #f39c12);
}

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

@keyframes winner {
    0% { transform: scale(1.2); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.lottery-actions {
    display: flex;
    gap: 20px;
}

.winners-display {
    text-align: center;
    padding: 20px;
    background: rgba(241, 196, 15, 0.1);
    border: 2px solid #f1c40f;
    border-radius: 12px;
    width: 100%;
    max-width: 600px;
}

.winners-display h3 {
    color: #f1c40f;
    margin-bottom: 15px;
}

#current-winners {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

#current-winners span {
    padding: 8px 16px;
    background: #f1c40f;
    color: #1a1a2e;
    border-radius: 6px;
    font-weight: bold;
}

/* 抽奖页面已中奖汇总 */
.lottery-winners-summary {
    width: 100%;
    max-width: 800px;
    margin-top: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
}

.lottery-winners-summary h3 {
    color: #00b894;
    margin-bottom: 15px;
    font-size: 18px;
}

.lottery-winners-summary .prize-winner-group {
    margin-bottom: 15px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.lottery-winners-summary .prize-winner-group:last-child {
    margin-bottom: 0;
}

.lottery-winners-summary .prize-winner-title {
    color: #e94560;
    font-size: 14px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.lottery-winners-summary .prize-winner-title img {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    object-fit: cover;
}

.lottery-winners-summary .winner-names {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.lottery-winners-summary .winner-name {
    padding: 4px 12px;
    background: rgba(0, 184, 148, 0.2);
    border: 1px solid #00b894;
    color: #00b894;
    border-radius: 4px;
    font-size: 14px;
}

.lottery-winners-summary .empty-hint {
    color: rgba(255, 255, 255, 0.4);
    font-size: 14px;
}

/* 中奖名单页面 */
.winners-container {
    display: grid;
    gap: 20px;
}

.winners-actions {
    display: flex;
    gap: 15px;
}

.all-winners-list {
    display: grid;
    gap: 20px;
}

.prize-winners {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
}

.prize-winners h3 {
    color: #e94560;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.prize-winners h3 img {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    object-fit: cover;
}

.winner-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.winner-tag {
    padding: 8px 16px;
    background: rgba(241, 196, 15, 0.2);
    border: 1px solid #f1c40f;
    color: #f1c40f;
    border-radius: 6px;
}

/* 响应式 */
@media (max-width: 768px) {
    .header h1 {
        font-size: 20px;
    }

    .btn {
        padding: 10px 16px;
        font-size: 14px;
    }

    .btn-large {
        padding: 14px 28px;
        font-size: 16px;
    }

    .lottery-names {
        font-size: 24px;
    }

    .prize-fields {
        grid-template-columns: 1fr;
    }
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.5);
}

.empty-state h3 {
    margin-bottom: 10px;
}
