/* 管理页面样式 */
:root {
    --primary-purple: #7a0085;
    --primary-purple-dark: #5a0063;
    --secondary-orange: #ff7f00;
    --secondary-orange-dark: #e66a00;
    --secondary-orange-light: #ff9f40;
}

.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--primary-purple);
}

.admin-title {
    color: var(--primary-purple);
    font-size: 1.8em;
    font-weight: 600;
}

.admin-actions {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background-color: var(--primary-purple);
    color: white;
}

.btn-primary:hover {
    background-color: #5a0063;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(122, 0, 133, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(122, 0, 133, 0.2);
}

.btn-primary:focus {
    outline: 2px solid rgba(122, 0, 133, 0.5);
    outline-offset: 2px;
}

.btn-secondary {
    background-color: var(--secondary-orange);
    color: white;
}

.btn-secondary:hover {
    background-color: var(--secondary-orange-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 127, 0, 0.3);
}

.btn-secondary:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(255, 127, 0, 0.2);
}

.btn-secondary:focus {
    outline: 2px solid rgba(255, 127, 0, 0.5);
    outline-offset: 2px;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* 搜索和筛选区域 */
.search-filter-container {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    min-width: 300px;
    position: relative;
}

.search-input {
    width: 100%;
    height: 40px;
    padding: 0 110px 0 15px;
    border: 2px solid #ddd;
    border-radius: 25px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s ease;
    background-color: white;
    box-sizing: border-box;
}

.search-input:focus {
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 3px rgba(122, 0, 133, 0.1);
}

.search-button {
    position: absolute;
    right: 2px;
    top: 45%;
    transform: translateY(-50%);
    background-color: var(--primary-purple);
    color: white;
    border: none;
    border-radius: 20px;
    width: 100px;
    height: 36px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(122, 0, 133, 0.2);
    font-size: 14px;
    font-weight: 500;
}

.search-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.search-button:hover::before {
    left: 100%;
}

.search-button:hover {
    background-color: #5a0063;
    transform: translateY(-50%) scale(1.02);
    box-shadow: 0 4px 8px rgba(122, 0, 133, 0.3);
}

.search-button:active {
    transform: translateY(-50%) scale(0.98);
    box-shadow: 0 2px 4px rgba(122, 0, 133, 0.2);
}

.search-button:focus {
    outline: 2px solid rgba(122, 0, 133, 0.5);
    outline-offset: 2px;
}

.filter-select {
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 25px;
    font-size: 14px;
    outline: none;
    background-color: white;
}

/* 数据表格 */
.data-table-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

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

.data-table th,
.data-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.data-table th {
    background-color: var(--primary-purple);
    color: white;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table tr:hover {
    background-color: #f9f9f9;
}

.data-table tr:nth-child(even) {
    background-color: #f5f5f5;
}

/* 状态标签 */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-active {
    background-color: rgba(122, 0, 133, 0.1);
    color: var(--primary-purple);
}

.status-inactive {
    background-color: rgba(255, 127, 0, 0.1);
    color: var(--secondary-orange);
}

/* 操作按钮 */
.action-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
}

.action-btn {
    padding: 10px 18px;
    border: none;
    border-radius: 25px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
    min-width: 80px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.action-btn:hover::before {
    left: 100%;
}

.action-btn:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.action-btn:active {
    transform: translateY(0) scale(0.97);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.action-btn:focus {
    outline: 2px solid rgba(122, 0, 133, 0.6);
    outline-offset: 3px;
}

.action-btn-edit {
    background-color: var(--primary-purple);
    color: white;
}

.action-btn-edit:hover {
    background-color: var(--primary-purple-dark);
}

.action-btn-delete {
    background-color: var(--secondary-orange);
    color: white;
}

.action-btn-delete:hover {
    background-color: var(--secondary-orange-dark);
}

/* 按钮图标 */
.action-btn::after {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.action-btn-edit::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z'/%3E%3C/svg%3E");
}

.action-btn-delete::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z'/%3E%3C/svg%3E");
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    padding: 15px;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.page-btn {
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background-color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.page-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(122, 0, 133, 0.1), transparent);
    transition: left 0.6s ease;
}

.page-btn:hover::before {
    left: 100%;
}

.page-btn:hover {
    border-color: var(--primary-purple);
    color: var(--primary-purple);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(122, 0, 133, 0.1);
}

.page-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(122, 0, 133, 0.1);
}

.page-btn:focus {
    outline: 2px solid rgba(122, 0, 133, 0.5);
    outline-offset: 2px;
}

.page-btn.active {
    background-color: var(--primary-purple);
    color: white;
    border-color: var(--primary-purple);
    box-shadow: 0 2px 4px rgba(122, 0, 133, 0.2);
}

.page-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.page-btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 30px;
    border-radius: 12px;
    width: 80%;
    max-width: 500px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.modal-title {
    color: var(--primary-purple);
    font-size: 1.2em;
    font-weight: 600;
}

.close {
    color: #aaa;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 24px;
    border-radius: 15px;
    position: relative;
}

.close:hover {
    color: var(--primary-purple);
    background-color: rgba(122, 0, 133, 0.1);
    transform: rotate(90deg);
}

.close:focus {
    outline: 2px solid rgba(122, 0, 133, 0.5);
    outline-offset: 2px;
}

.close:active {
    transform: rotate(90deg) scale(0.9);
}

/* 表单 */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s ease;
}

.form-input:focus {
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 3px rgba(122, 0, 133, 0.1);
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .admin-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .admin-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .search-filter-container {
        flex-direction: column;
    }
    
    .search-box {
        min-width: 100%;
    }
    
    .data-table-container {
        overflow-x: auto;
    }
    
    .data-table {
        min-width: 600px;
    }
}