* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Microsoft YaHei', sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
}

h2 {
    margin-bottom: 20px;
    color: #2c3e50;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

/* 表单样式 */
.add-event {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

input[type="text"],
input[type="datetime-local"],
textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

textarea {
    resize: vertical;
}

button {
    cursor: pointer;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    transition: background-color 0.3s;
}

.btn-add {
    background-color: #4CAF50;
    color: white;
}

.btn-add:hover {
    background-color: #45a049;
}

/* 事件列表样式 */
.events-container {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.no-events {
    text-align: center;
    padding: 20px;
    color: #888;
    font-style: italic;
}

.event-card {
    border-radius: 8px;
    margin-bottom: 20px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: relative;
    border-left: 5px solid #4CAF50; /* 默认颜色，会被JS覆盖 */
}

.event-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.event-title {
    font-size: 20px;
    color: #2c3e50;
}

.event-actions {
    display: flex;
    gap: 10px;
}

.btn-edit {
    background-color: #3498db;
    color: white;
}

.btn-edit:hover {
    background-color: #2980b9;
}

.btn-delete {
    background-color: #e74c3c;
    color: white;
}

.btn-delete:hover {
    background-color: #c0392b;
}

.countdown {
    display: flex;
    justify-content: space-between;
    margin: 15px 0;
    text-align: center;
}

.time-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.days, .hours, .minutes, .seconds {
    font-size: 28px;
    font-weight: bold;
    background-color: #f8f9fa;
    border-radius: 5px;
    padding: 10px 15px;
    min-width: 60px;
    display: inline-block;
}

.time-label {
    margin-top: 5px;
    font-size: 14px;
    color: #666;
}

.target-date {
    text-align: right;
    color: #666;
    font-size: 14px;
    margin-top: 10px;
}

.event-notes {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    white-space: pre-line;
    color: #555;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 20px;
    border-radius: 8px;
    width: 80%;
    max-width: 600px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
}

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #e74c3c;
}

.btn-save {
    background-color: #3498db;
    color: white;
}

.btn-save:hover {
    background-color: #2980b9;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .countdown {
        flex-wrap: wrap;
    }
    
    .time-block {
        flex-basis: 50%;
        margin-bottom: 10px;
    }
    
    .days, .hours, .minutes, .seconds {
        font-size: 24px;
        min-width: 50px;
    }
    
    .event-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .event-actions {
        margin-top: 10px;
    }
}

.expired {
    opacity: 0.7;
    background-color: #f8d7da;
}


/* 用户信息样式 */
.user-info {
    margin-top: 15px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.current-user-id {
    margin-right: 20px;
    font-size: 14px;
    color: #666;
}

.current-user-id span {
    font-weight: bold;
    color: #333;
}

.user-level {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 5px;
}

.level-info, .exp-info {
    font-size: 14px;
    color: #666;
}

.level-name, .exp-value {
    font-weight: bold;
    color: #333;
}

/* 新增徽章布局样式 */
.level-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.level-badge {
    position: relative;
    top: -2px;
}

.level-badge img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #eeff00;
}

/* 新增按钮样式 */
.button-group {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

.btn-help {
    background-color: #6c757d;
    color: white;
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-help:hover {
    background-color: #5a6268;
}

.btn-save-id {
    background-color: #3498db;
    color: white;
}

.btn-save-id:hover {
    background-color: #2980b9;
}

/* 事件完成/未完成按钮 */
.event-complete-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
}

.btn-complete {
    background-color: #4CAF50;
    color: white;
    flex: 1;
    margin-right: 10px;
}

.btn-complete:hover {
    background-color: #45a049;
}

.btn-incomplete {
    background-color: #e74c3c;
    color: white;
    flex: 1;
    margin-left: 10px;
}

.btn-incomplete:hover {
    background-color: #c0392b;
}

/* 自定义对话框 */
.custom-alert {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.alert-content {
    background-color: white;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    max-width: 400px;
    width: 90%;
    text-align: center;
}

.alert-content h3 {
    margin-top: 0;
    color: #333;
}

.alert-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.btn-early-complete {
    background-color: #9C27B0;
    color: white;
}

.btn-early-complete:hover {
    background-color: #7B1FA2;
}

.btn-complete {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.btn-incomplete {
    background-color: #f44336;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.btn-complete:hover {
    background-color: #45a049;
}

.btn-incomplete:hover {
    background-color: #d32f2f;
}

/* 后台管理入口 */
.admin-section {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.btn-admin {
    background-color: #607D8B;
    color: white;
}

.btn-admin:hover {
    background-color: #455A64;
}

/* 后台管理面板 */
.admin-login, .admin-panel {
    margin-top: 20px;
}

.admin-user-info {
    margin-top: 20px;
    padding: 15px;
    background-color: #f5f5f5;
    border-radius: 5px;
}

.user-exp-info {
    margin-bottom: 15px;
    font-weight: bold;
}

.btn-login, .btn-load, .btn-update {
    background-color: #3498db;
    color: white;
    margin-left: 10px;
}

.btn-login:hover, .btn-load:hover, .btn-update:hover {
    background-color: #2980b9;
}