/* 全局变量 */
:root {
    --primary: #2962ff;
    --primary-dark: #0039cb;
    --secondary: #00b8d4;
    --success: #00c853;
    --warning: #ffab00;
    --error: #ff1744;
    --gray-100: #f5f7fa;
    --gray-200: #e4e7eb;
    --gray-300: #cbd2d9;
    --gray-500: #7b8794;
    --gray-700: #323f4b;
    --text: #1e293b;
    --white: #ffffff;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
    --border-radius: 12px;
    --border-radius-sm: 8px;
}

/* 重置与基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--gray-100);
    background-image: linear-gradient(120deg, #f5f7fa 0%, #e4e7eb 100%);
    min-height: 100vh;
}

h1, h2, h3 {
    font-weight: 600;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
}

button, input, select, textarea {
    font: inherit;
    outline: none;
}

/* 布局 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 按钮 */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: var(--border-radius-sm);
    background-color: var(--gray-200);
    color: var(--gray-700);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    box-shadow: var(--shadow);
}

.btn:hover {
    background-color: var(--gray-300);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

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

.btn.primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

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

.logout-btn {
    background: none;
    border: none;
    color: var(--gray-700);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 5px 10px;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
}

.logout-btn:hover {
    background-color: var(--gray-200);
    color: var(--error);
}

/* 头部 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav {
    display: flex;
    gap: 15px;
    align-items: center;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 5px 15px;
    border-radius: 50px;
    background: var(--gray-100);
    transition: var(--transition);
}

.user-profile:hover {
    background: var(--gray-200);
}

.user-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--gray-200);
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.user-gender {
    font-size: 0.8rem;
    color: var(--gray-500);
}

/* 主要区域 */
.featured-section {
    margin-top: 40px;
    padding: 30px;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.featured-section h1 {
    margin-bottom: 24px;
    font-size: 2rem;
    color: var(--gray-700);
    position: relative;
    padding-bottom: 15px;
}

.featured-section h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 2px;
}

/* 分类选择器 */
.category-selector {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.category-btn {
    padding: 8px 20px;
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: 50px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.category-btn:hover, .category-btn.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

/* 进度网格 */
.progress-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.progress-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.progress-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.card-header {
    padding: 20px 20px 0;
}

.card-tags {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.tag {
    font-size: 0.8rem;
    padding: 6px 12px;
    border-radius: 20px;
    background: var(--gray-200);
    font-weight: 500;
}

.tag[data-status="pending"] {
    background: var(--gray-300);
    color: var(--gray-700);
}

.tag[data-status="developing"] {
    background: var(--secondary);
    color: var(--white);
}

.tag[data-status="testing"] {
    background: var(--warning);
    color: var(--white);
}

.tag[data-status="completed"] {
    background: var(--success);
    color: var(--white);
}

.card-title {
    font-size: 1.3rem;
    margin-bottom: 16px;
    color: var(--gray-700);
}

.card-body {
    padding: 0 20px;
    flex-grow: 1;
}

.card-body p {
    color: var(--gray-500);
    line-height: 1.7;
}

.card-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.requester-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.requester-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--gray-200);
}

.requester-name {
    font-size: 0.85rem;
    color: var(--gray-500);
}

.create-time {
    font-size: 0.8rem;
    color: var(--gray-500);
}

.progress-container {
    padding: 20px;
}

.progress-bar {
    height: 10px;
    background: var(--gray-200);
    border-radius: 10px;
    overflow: hidden;
    margin-top: 8px;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 10px;
    transition: width 0.5s ease;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 0.9rem;
    color: var(--gray-500);
}

/* 模态框 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal:not(.hidden) {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--white);
    border-radius: var(--border-radius);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 30px;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    box-shadow: var(--shadow-hover);
}

.modal:not(.hidden) .modal-content {
    transform: translateY(0);
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--gray-500);
    transition: var(--transition);
}

.close-btn:hover {
    color: var(--gray-700);
    transform: rotate(90deg);
}

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

label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: var(--gray-700);
}

input, textarea, select {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius-sm);
    background: var(--white);
    transition: var(--transition);
    box-shadow: var(--shadow);
}

input:focus, textarea:focus, select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(41, 98, 255, 0.2);
}

textarea {
    resize: vertical;
    min-height: 120px;
}

/* 登录选项 */
.login-options {
    display: flex;
    gap: 24px;
    justify-content: center;
    margin-top: 30px;
}

.login-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 20px 30px;
    background: var(--gray-100);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    box-shadow: var(--shadow);
}

.login-option:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-position: center;
    background-repeat: no-repeat;
    background-size: 70%;
}

.icon.wechat {
    background-color: #07c160;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="white" d="M9.5,4C5.36,4 2,6.69 2,10C2,11.89 3.08,13.5 4.78,14.58L4,17L6.5,15.5C7.39,15.81 8.37,16 9.41,16C9.44,16 9.46,16 9.5,16C9.5,16 9.46,16 9.41,16C10.56,16 11.64,15.76 12.62,15.3L11.81,18L14.25,16.25C15.29,15.39 16,14.18 16,13L16,12.72C15.17,13.23 14.22,13.58 13.19,13.73C13.08,13.51 12.94,13.29 12.78,13.09C12.78,13.08 12.78,13.08 12.78,13.07C14.69,12.38 16,10.75 16,9C16,6.24 13.09,4 9.5,4M9.5,6A2.5,2.5 0 0,1 12,8.5A2.5,2.5 0 0,1 9.5,11A2.5,2.5 0 0,1 7,8.5A2.5,2.5 0 0,1 9.5,6M16.5,12C14,12 12,14 12,16.5C12,19 14,21 16.5,21C19,21 21,19 21,16.5C21,14 19,12 16.5,12M16.5,14A1.5,1.5 0 0,1 18,15.5A1.5,1.5 0 0,1 16.5,17A1.5,1.5 0 0,1 15,15.5A1.5,1.5 0 0,1 16.5,14Z"/></svg>');
}

.icon.alipay {
    background-color: #1677ff;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="white" d="M5.23,2H18.77C19.77,2 20.5,2.7 20.5,3.5V10.11C17.86,8.79 14.72,8 12,8C9.28,8 6.14,8.79 3.5,10.11V3.5C3.5,2.7 4.23,2 5.23,2M12,10C16.15,10 19.58,10.94 22,12.5V18.77C22,19.77 21.3,20.5 20.5,20.5H3.5C2.7,20.5 2,19.77 2,18.77V12.5C4.42,10.94 7.85,10 12,10M12,15C10.34,15 9,16.34 9,18C9,19.66 10.34,21 12,21C13.66,21 15,19.66 15,18C15,16.34 13.66,15 12,15Z"/></svg>');
}

/* Toast 提示 */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: var(--border-radius-sm);
    background: var(--white);
    box-shadow: var(--shadow-hover);
    color: var(--gray-700);
    font-weight: 500;
    z-index: 2000;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast::before {
    content: '';
    width: 6px;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
    border-radius: var(--border-radius-sm) 0 0 var(--border-radius-sm);
}

.toast-info::before {
    background: var(--primary);
}

.toast-success::before {
    background: var(--success);
}

.toast-error::before {
    background: var(--error);
}

.toast-warning::before {
    background: var(--warning);
}

/* 空状态 */
.empty {
    text-align: center;
    padding: 40px;
    color: var(--gray-500);
    font-size: 1.1rem;
    grid-column: 1 / -1;
}

