* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', sans-serif;
    background: #f5f5f5;
}

/* 登录页面 */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #FFB6C1, #DDA0DD);
}

.login-card {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
}

.login-card h1 {
    text-align: center;
    color: #FFB6C1;
    margin-bottom: 30px;
}

.error-message {
    background: #ffebee;
    color: #c62828;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 20px;
    text-align: center;
}

.btn-login {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #FFB6C1, #DDA0DD);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.3s;
}

.btn-login:hover {
    transform: scale(1.02);
}

.login-tip {
    text-align: center;
    margin-top: 15px;
    color: #666;
    font-size: 14px;
}

/* 管理后台布局 */
.admin-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background: linear-gradient(180deg, #FFB6C1, #DDA0DD);
    color: white;
    padding: 30px 0;
}

.sidebar h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 24px;
}

.sidebar nav a {
    display: block;
    padding: 15px 30px;
    color: white;
    text-decoration: none;
    transition: background 0.3s;
}

.sidebar nav a:hover,
.sidebar nav a.active {
    background: rgba(255, 255, 255, 0.2);
}

.main-content {
    flex: 1;
    padding: 40px;
    background: #f5f5f5;
}

.main-content h1 {
    color: #FFB6C1;
    margin-bottom: 30px;
}

.main-content h2 {
    color: #666;
    margin: 30px 0 20px;
}

/* 表单样式 */
.admin-form {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: bold;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group textarea,
.form-group input[type="file"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.form-group textarea {
    resize: vertical;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #999;
    font-size: 12px;
}

.btn-submit {
    padding: 12px 30px;
    background: linear-gradient(135deg, #FFB6C1, #DDA0DD);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: transform 0.3s;
}

.btn-submit:hover {
    transform: scale(1.02);
}

/* 照片网格 */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.photo-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.photo-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.photo-card p {
    padding: 10px;
    text-align: center;
    color: #666;
}

.btn-delete {
    display: block;
    text-align: center;
    padding: 8px;
    background: #f44336;
    color: white;
    text-decoration: none;
    transition: background 0.3s;
}

.btn-delete:hover {
    background: #d32f2f;
}

/* 音乐列表 */
.music-list {
    background: white;
    border-radius: 10px;
    overflow: hidden;
}

.music-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.music-item:last-child {
    border-bottom: none;
}

.music-info strong {
    display: block;
    margin-bottom: 5px;
    color: #333;
}

.music-info small {
    color: #999;
}

.music-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.badge-active {
    padding: 5px 15px;
    background: #4caf50;
    color: white;
    border-radius: 15px;
    font-size: 12px;
}

.btn-small {
    padding: 5px 15px;
    background: #2196f3;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 12px;
}

.btn-small:hover {
    background: #1976d2;
}

/* 停车指南 */
.parking-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.parking-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.parking-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.parking-card p {
    padding: 10px;
    color: #666;
    line-height: 1.6;
    font-size: 14px;
}

/* 响应式 */
@media (max-width: 768px) {
    .admin-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* ===== 积分系统管理页面美化样式 ===== */

/* 管理页面头部 */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px 0;
    border-bottom: 3px solid #f0f0f0;
}

.admin-header h1 {
    color: #333;
    font-size: 2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 15px;
}

.admin-header h1 i {
    color: #4CAF50;
    font-size: 1.8rem;
}

.header-actions {
    display: flex;
    gap: 10px;
}

/* 按钮样式升级 */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn-primary {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
}

.btn-secondary {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, #FF9800, #F57C00);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #F44336, #D32F2F);
    color: white;
}

.btn-info {
    background: linear-gradient(135deg, #00BCD4, #0097A7);
    color: white;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 12px;
}

/* 网格布局美化 */
.members-grid, .tasks-grid, .rewards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    margin-top: 25px;
}

/* 卡片样式美化 */
.member-card, .task-card, .reward-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
    position: relative;
    overflow: hidden;
}

.member-card::before, .task-card::before, .reward-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #4CAF50, #2196F3, #FF9800);
}

.member-card:hover, .task-card:hover, .reward-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

/* 成员卡片特殊样式 */
.member-avatar {
    text-align: center;
    margin-bottom: 20px;
}

.member-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #f0f0f0;
    transition: all 0.3s ease;
}

.member-card:hover .member-avatar img {
    border-color: #4CAF50;
    transform: scale(1.05);
}

.avatar-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #E3F2FD, #BBDEFB);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-size: 32px;
    color: #2196F3;
    border: 4px solid #f0f0f0;
}

.member-info {
    text-align: center;
    margin-bottom: 20px;
}

.member-info h3 {
    margin: 0 0 8px 0;
    color: #333;
    font-size: 1.3rem;
    font-weight: 600;
}

.member-role {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.member-role.child {
    background: linear-gradient(135deg, #E3F2FD, #BBDEFB);
    color: #1976D2;
}

.member-role.parent {
    background: linear-gradient(135deg, #F3E5F5, #E1BEE7);
    color: #7B1FA2;
}

.member-level {
    margin-top: 8px;
    font-size: 14px;
    color: #666;
    font-style: italic;
}

.member-points {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #F8F9FA, #E9ECEF);
    border-radius: 12px;
}

.points-display {
    text-align: center;
}

.current-points, .total-points {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #4CAF50;
    margin-bottom: 4px;
}

.points-label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.member-stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
    padding: 15px;
    border: 2px solid #f0f0f0;
    border-radius: 12px;
    background: #fafafa;
}

.stat-item {
    text-align: center;
}

.stat-value {
    display: block;
    font-weight: 700;
    color: #333;
    font-size: 1.1rem;
}

.stat-label {
    font-size: 11px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

.member-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.member-actions .btn {
    flex: 1;
    min-width: 80px;
    justify-content: center;
}

/* 任务卡片样式 */
.task-header, .reward-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.task-icon, .reward-icon {
    font-size: 2rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.task-status, .reward-status {
    position: relative;
}

/* 开关样式 */
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 30px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.slider:before {
    position: absolute;
    content: "";
    height: 24px;
    width: 24px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

input:checked + .slider {
    background: linear-gradient(135deg, #4CAF50, #45a049);
}

input:checked + .slider:before {
    transform: translateX(30px);
}

.task-content, .reward-content {
    margin-bottom: 20px;
}

.task-title, .reward-title {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 1.2rem;
    font-weight: 600;
}

.task-description, .reward-description {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 15px;
}

.task-points, .reward-cost {
    text-align: center;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 15px;
}

.task-points {
    background: linear-gradient(135deg, #F8F9FA, #E9ECEF);
}

.reward-cost {
    background: linear-gradient(135deg, #FFF3E0, #FFE0B2);
}

.points-value, .cost-value {
    display: block;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.points-value.positive {
    color: #4CAF50;
}

.points-value.negative {
    color: #F44336;
}

.cost-value {
    color: #FF9800;
}

.points-label, .cost-label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 奖励特殊样式 */
.reward-image {
    text-align: center;
    margin-bottom: 15px;
}

.reward-image img {
    max-width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.reward-stock {
    text-align: center;
    margin-bottom: 15px;
    padding: 8px;
    border-radius: 8px;
    font-size: 14px;
}

.stock-value.in-stock {
    color: #4CAF50;
    background: rgba(76, 175, 80, 0.1);
}

.stock-value.low-stock {
    color: #FF9800;
    background: rgba(255, 152, 0, 0.1);
}

.stock-value.out-of-stock {
    color: #F44336;
    background: rgba(244, 67, 54, 0.1);
}

/* 分类标题样式 */
.category-section {
    margin-bottom: 40px;
}

.category-title {
    color: #333;
    border-bottom: 3px solid #4CAF50;
    padding-bottom: 12px;
    margin-bottom: 25px;
    font-size: 1.4rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-title i {
    color: #4CAF50;
}

.task-count, .reward-count {
    color: #666;
    font-size: 0.9em;
    font-weight: normal;
}

/* 模态框美化 */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    padding: 25px 25px 0 25px;
    border-bottom: 2px solid #f0f0f0;
    margin-bottom: 20px;
    position: relative;
}

.modal-header h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 1.3rem;
    font-weight: 600;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #f0f0f0;
    color: #666;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #F44336;
    color: white;
    transform: scale(1.1);
}

.modal-body {
    padding: 0 25px;
}

.modal-footer {
    padding: 20px 25px 25px 25px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.modal-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.modal-btn.cancel {
    background: #f0f0f0;
    color: #666;
}

.modal-btn.cancel:hover {
    background: #e0e0e0;
}

.modal-btn.confirm {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
}

.modal-btn.confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

/* 表单美化 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.form-group small {
    display: block;
    margin-top: 6px;
    color: #666;
    font-size: 12px;
    font-style: italic;
}

/* 图标和颜色选择器 */
.icon-selector, .color-selector {
    position: relative;
}

.icon-options {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.icon-options span {
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.icon-options span:hover {
    background: #f0f0f0;
    transform: scale(1.1);
}

.icon-options span.selected {
    border-color: #4CAF50;
    background: rgba(76, 175, 80, 0.1);
}

.color-selector input[type="color"] {
    width: 60px;
    height: 40px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    padding: 0;
}

/* 状态指示器 */
.task-card.inactive, .reward-card.unavailable {
    opacity: 0.7;
    filter: grayscale(0.3);
}

.task-card.inactive::before, .reward-card.unavailable::before {
    background: #ccc;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .members-grid, .tasks-grid, .rewards-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .admin-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .header-actions {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .member-actions {
        flex-direction: column;
    }
    
    .member-actions .btn {
        min-width: auto;
    }
    
    .modal-content {
        margin: 10% auto;
        width: 95%;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 20px;
    }
    
    .member-card, .task-card, .reward-card {
        padding: 20px;
    }
    
    .modal-header, .modal-body, .modal-footer {
        padding-left: 20px;
        padding-right: 20px;
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #4CAF50;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 成功动画 */
.success-animation {
    animation: successPulse 0.6s ease-in-out;
}

@keyframes successPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* 工具提示 */
.tooltip {
    position: relative;
    cursor: help;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    z-index: 1000;
}

.tooltip:hover::after {
    opacity: 1;
}