/* 后台管理系统完整样式 */
:root {
    --primary: #1cc088;
    --primary-dark: #0fa876;
    --secondary: #2c3e50;
    --light: #f8f9fa;
    --dark: #212529;
    --gray: #6c757d;
    --light-gray: #e9ecef;
    --border: #dee2e6;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --info: #17a2b8;
    --transition: all 0.3s ease;
}

/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f7fa;
    color: var(--dark);
    line-height: 1.6;
    font-size: 14px;
}

/* 布局 */
.admin-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background: var(--secondary);
    color: white;
    transition: var(--transition);
    position: fixed;
    height: 100%;
    z-index: 100;
}

.content {
    flex: 1;
    margin-left: 250px;
    overflow-x: hidden;
}

/* 侧边栏 */
.sidebar .logo {
    padding: 18px 20px;
    text-align: center;
    background: rgba(0,0,0,0.2);
    font-size: 1.2rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar .logo i {
    margin-right: 10px;
    font-size: 1.4rem;
}

.sidebar nav ul {
    list-style: none;
    padding: 15px 0;
}

.sidebar nav ul li a {
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.85);
    padding: 12px 20px;
    text-decoration: none;
    transition: var(--transition);
}

.sidebar nav ul li a i {
    margin-right: 10px;
    font-size: 1.1rem;
    width: 22px;
    text-align: center;
}

.sidebar nav ul li a:hover, 
.sidebar nav ul li a.active {
    background: rgba(0, 0, 0, 0.2);
    color: white;
    border-left: 4px solid var(--primary);
}

.sidebar .copyright {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 15px;
    text-align: center;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.6);
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* 顶部栏 */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    z-index: 10;
    position: sticky;
    top: 0;
}

.page-title {
    font-size: 1.3rem;
    color: var(--secondary);
    font-weight: 600;
}

.user-info {
    display: flex;
    align-items: center;
    position: relative;
}

.user-info img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    margin-right: 10px;
    object-fit: cover;
    cursor: pointer;
}

.user-dropdown {
    display: flex;
    align-items: center;
}

.user-dropdown span {
    display: block;
    font-weight: 500;
    margin-right: 8px;
}

.user-dropdown i {
    color: var(--gray);
    transition: var(--transition);
}

.user-info:hover .user-dropdown i {
    transform: rotate(180deg);
}

.user-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 6px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
    padding: 8px 0;
    width: 180px;
    display: none;
    z-index: 20;
}

.user-info:hover .user-dropdown-menu {
    display: block;
}

.user-dropdown-menu a {
    display: block;
    padding: 8px 15px;
    color: var(--dark);
    text-decoration: none;
    transition: var(--transition);
}

.user-dropdown-menu a:hover {
    background: var(--light);
    color: var(--primary);
}

.user-dropdown-menu a i {
    margin-right: 8px;
    font-size: 0.9rem;
    width: 20px;
    display: inline-block;
    transform: none !important;
}

/* 主内容区 */
.content .container {
    padding: 25px;
    max-width: 1400px;
    margin: 0 auto;
}

.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 25px;
    padding: 25px;
}

.card-title {
    font-size: 1.4rem;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border);
    color: var(--secondary);
    font-weight: 600;
    display: flex;
    align-items: center;
}

.card-title i {
    margin-right: 10px;
    color: var(--primary);
    font-size: 1.3rem;
}

.sub-card {
    background: var(--light);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid var(--border);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.sub-card h3 {
    font-size: 1.15rem;
    margin-bottom: 20px;
    color: var(--secondary);
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

/* 警告消息 */
.alert {
    padding: 12px 15px;
    margin-bottom: 25px;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.alert.success {
    background: rgba(40, 167, 69, 0.15);
    color: var(--success);
    border-left: 4px solid var(--success);
}

.alert.error {
    background: rgba(220, 53, 69, 0.15);
    color: var(--danger);
    border-left: 4px solid var(--danger);
}

.alert .close {
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: bold;
    color: inherit;
    opacity: 0.7;
    transition: var(--transition);
}

.alert .close:hover {
    opacity: 1;
}

/* 统计卡片 */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.stat-card {
    display: flex;
    align-items: center;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.06);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    opacity: 0;
    z-index: -1;
    transition: var(--transition);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-card:hover {
    color: white;
    transform: translateY(-5px);
}

.stat-card:hover .icon {
    background: white;
    color: var(--primary);
}

.stat-card:hover .count, 
.stat-card:hover small {
    color: white;
}

.stat-card .icon {
    margin-right: 15px;
    background: var(--primary);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: var(--transition);
}

.stat-card .count {
    font-size: 1.8rem;
    font-weight: bold;
    display: block;
    line-height: 1.2;
    color: var(--dark);
    transition: var(--transition);
}

.stat-card small {
    color: var(--gray);
    font-size: 0.9rem;
    transition: var(--transition);
}

/* 表单元素 */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--secondary);
    font-size: 0.9rem;
}

.form-group .form-hint {
    display: block;
    margin-top: 4px;
    color: var(--gray);
    font-size: 0.85rem;
}

.form-group input, 
.form-group textarea, 
.form-group select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.95rem;
    transition: var(--transition);
}

.form-group input:focus, 
.form-group textarea:focus, 
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(28, 192, 136, 0.15);
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
    line-height: 1.5;
}

/* 按钮 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-decoration: none;
    white-space: nowrap;
    line-height: 1;
}

.btn i {
    margin-right: 8px;
    font-size: 0.9rem;
}

.btn-sm {
    padding: 7px 12px;
    font-size: 0.85rem;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: 0 3px 8px rgba(28, 192, 136, 0.3);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--gray);
}

.btn-outline:hover {
    background: var(--light);
    border-color: var(--border);
}

.btn-link {
    background: transparent;
    color: var(--primary);
    padding: 0;
    height: auto;
}

.btn-link:hover {
    text-decoration: underline;
    background: transparent;
}

.btn-block {
    display: flex;
    width: 100%;
}

/* 表格 */
.table-responsive {
    overflow-x: auto;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    border-radius: 6px;
    border: 1px solid var(--border);
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

table th, table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 0.95rem;
}

table th {
    background: #f8fafc;
    font-weight: 600;
    color: var(--secondary);
}

table td {
    color: #4b5563;
}

table tr:last-child td {
    border-bottom: none;
}

table tr:hover {
    background: rgba(241, 245, 249, 0.5);
}

/* 操作按钮 */
.actions {
    white-space: nowrap;
    display: flex;
}

.btn-icon {
    background: none;
    border: none;
    color: var(--gray);
    cursor: pointer;
    padding: 6px;
    margin: 0 2px;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    transition: var(--transition);
}

.btn-icon:hover {
    background: rgba(28, 192, 136, 0.1);
    color: var(--primary);
}

.btn-icon.btn-delete:hover {
    background: rgba(220, 53, 69, 0.1);
    color: var(--danger);
}

/* 网格布局 */
.row {
    display: flex;
    margin-left: -12px;
    margin-right: -12px;
    flex-wrap: wrap;
}

.col, .col-6, .col-5, .col-7, .col-4, .col-8 {
    flex: 0 0 auto;
    padding-left: 12px;
    padding-right: 12px;
    margin-bottom: 15px;
}

.col {
    flex: 1;
}

.col-6 {
    width: 50%;
}

.col-5 {
    width: 41.66667%;
}

.col-7 {
    width: 58.33333%;
}

.col-4 {
    width: 33.33333%;
}

.col-8 {
    width: 66.66667%;
}

/* 作品网格 */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.portfolio-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    transition: var(--transition);
}

.portfolio-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.portfolio-image {
    position: relative;
}

.portfolio-image img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.portfolio-card:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-overlay a {
    color: white;
    font-size: 1.2rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.portfolio-overlay a:hover {
    transform: scale(1.1);
}

.portfolio-info {
    padding: 15px;
}

.portfolio-category {
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.portfolio-info h4 {
    margin-bottom: 8px;
    color: var(--secondary);
    font-size: 1.1rem;
}

.portfolio-info p {
    color: var(--gray);
    font-size: 0.95rem;
    margin-bottom: 15px;
    line-height: 1.5;
}

.portfolio-tag {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(28, 192, 136, 0.1);
    color: var(--primary);
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 500;
}

.portfolio-actions {
    display: flex;
    justify-content: flex-end;
    border-top: 1px solid var(--border);
    padding-top: 12px;
}

/* 团队卡片 */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.team-card {
    display: flex;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    transition: var(--transition);
}

.team-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.team-avatar {
    width: 100px;
    background: var(--light);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
}

.team-avatar img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid white;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.team-info {
    flex: 1;
    padding: 15px;
}

.team-info h4 {
    font-size: 1.1rem;
    color: var(--secondary);
    margin-bottom: 5px;
}

.team-info > span {
    display: block;
    color: var(--primary);
    font-size: 0.9rem;
    margin-bottom: 10px;
    font-weight: 500;
}

.team-info p {
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 10px;
    line-height: 1.5;
}

.social-links {
    display: flex;
    margin: 12px 0 15px;
}

.social-links a {
    color: var(--gray);
    margin-right: 12px;
    font-size: 1.1rem;
    transition: var(--transition);
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    text-decoration: none;
}

.social-links a:hover {
    background: rgba(28, 192, 136, 0.1);
    color: var(--primary);
}

.team-actions {
    display: flex;
    justify-content: flex-end;
    border-top: 1px solid var(--border);
    padding-top: 12px;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    overflow: auto;
}

.modal-content {
    background: white;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow: auto;
    position: relative;
    box-shadow: 0 10px 35px rgba(0,0,0,0.2);
    animation: modalAppear 0.3s ease;
}

@keyframes modalAppear {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.modal-header h3 {
    font-size: 1.3rem;
    color: var(--secondary);
    font-weight: 600;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.close-modal {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray);
    font-size: 1.4rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: var(--transition);
}

.close-modal:hover {
    background: rgba(220, 53, 69, 0.1);
    color: var(--danger);
}

/* 预览图片 */
.preview-image {
    margin-bottom: 15px;
    text-align: center;
}

.preview-image img {
    max-width: 100%;
    max-height: 120px;
    border-radius: 6px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

/* 系统信息 */
.system-info {
    background: white;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.system-info div {
    display: flex;
    justify-content: space-between;
    padding: 15px;
    border-bottom: 1px solid var(--border);
}

.system-info div:last-child {
    border-bottom: none;
}

.system-info span:first-child {
    color: var(--gray);
}

/* 活动列表 */
.activity-list {
    list-style: none;
}

.activity-list li {
    display: flex;
    padding: 15px 0;
    border-bottom: 1px solid var(--border);
}

.activity-list li:last-child {
    border-bottom: none;
}

.activity-list li i {
    font-size: 1.2rem;
    color: var(--primary);
    width: 36px;
    height: 36px;
    background: rgba(28, 192, 136, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    flex-shrink: 0;
}

.activity-list li div p {
    color: var(--dark);
    margin-bottom: 3px;
}

.activity-list li div small {
    color: var(--gray);
    font-size: 0.85rem;
}

/* 联系信息表单组 */
.contact-form-group {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: var(--light);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.contact-form-group .form-group {
    flex: 1;
    margin: 0 10px;
}

.contact-icon {
    width: 50px;
    text-align: center;
    font-size: 24px;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 分页 */
.pagination {
    display: flex;
    padding-left: 0;
    list-style: none;
    margin: 20px 0 0;
}

.page-item {
    margin: 0 3px;
}

.page-item a, 
.page-item span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: white;
    color: var(--dark);
    text-decoration: none;
    transition: var(--transition);
}

.page-item a:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.page-item.active a {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    font-weight: 500;
}

.page-item.disabled span {
    background: var(--light-gray);
    color: var(--gray);
}

/* 登录页面 */
.login-page {
    display: flex;
    min-height: 100vh;
    background: linear-gradient(120deg, #1cc088, #2c3e50);
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 420px;
}

.login-box {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    animation: fadeIn 0.6s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-box .logo {
    padding: 35px 20px;
    text-align: center;
    background: linear-gradient(120deg, var(--primary), var(--primary-dark));
}

.login-box .logo img {
    width: 80px;
    margin-bottom: 15px;
}

.login-box .logo h1 {
    color: white;
    font-size: 1.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.login-box .alert {
    margin-bottom: 0;
    border-radius: 0;
    border-left: none;
    text-align: center;
}

.login-box form {
    padding: 30px;
}

.form-group input {
    padding: 12px 15px;
}

.btn-login {
    height: 46px;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.5px;
    margin-top: 5px;
}

.login-footer {
    padding: 20px 0 25px;
    text-align: center;
    font-size: 0.9rem;
    color: var(--gray);
    background: var(--light);
}

.login-footer a {
    color: var(--primary);
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
}

.login-footer a:hover {
    text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .col-5, .col-6, .col-7, .col-4, .col-8 {
        width: 100%;
    }
    
    .stats {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 992px) {
    .sidebar {
        width: 70px;
    }
    
    .content {
        margin-left: 70px;
    }
    
    .sidebar .logo span {
        display: none;
    }
    
    .sidebar nav ul li a span {
        display: none;
    }
    
    .sidebar nav ul li a {
        justify-content: center;
        padding: 15px;
    }
    
    .sidebar nav ul li a i {
        margin-right: 0;
        font-size: 1.2rem;
    }
    
    .admin-header {
        padding: 15px;
    }
    
    .sidebar .copyright {
        font-size: 0;
        padding: 15px 0;
    }
    
    .sidebar .copyright::after {
        content: "©";
        font-size: 0.75rem;
    }
}

@media (max-width: 768px) {
    .stats {
        grid-template-columns: 1fr;
    }
    
    .portfolio-grid, 
    .team-grid {
        grid-template-columns: 1fr;
    }
    
    .content .container {
        padding: 15px;
    }
    
    .card {
        padding: 20px;
    }
    
    .user-dropdown span {
        display: none;
    }
}

@media (max-width: 576px) {
    .login-box form {
        padding: 25px 20px;
    }
    
    .modal-content {
        width: 95%;
    }
    
    .table-responsive {
        border: none;
    }
}