/* 密码验证界面 */
.password-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0f2027 0%, #203a43 25%, #2c5364 50%, #203a43 75%, #0f2027 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: overlayFadeIn 0.5s ease;
}

.password-overlay.hidden {
    animation: overlayFadeOut 0.5s ease forwards;
}

@keyframes overlayFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes overlayFadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
        visibility: hidden;
    }
}

.password-box {
    background: #ffffff;
    padding: 50px 60px;
    border-radius: 25px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 100px rgba(100, 180, 255, 0.6);
    text-align: center;
    min-width: 400px;
    position: relative;
    animation: boxBounceIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes boxBounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3) translateY(-100px);
    }
    50% {
        transform: scale(1.05) translateY(0);
    }
    70% {
        transform: scale(0.95);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.password-box::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(45deg, #667eea, #764ba2, #f093fb, #4facfe);
    background-size: 400% 400%;
    border-radius: 25px;
    z-index: -1;
    animation: borderGlow 4s ease infinite;
}

@keyframes borderGlow {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.password-icon {
    font-size: 4em;
    margin-bottom: 20px;
    animation: iconPulse 2s ease-in-out infinite;
    filter: drop-shadow(0 5px 15px rgba(102, 126, 234, 0.5));
}

@keyframes iconPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.password-box h2 {
    color: #2c3e50;
    margin-bottom: 30px;
    font-size: 2em;
    font-weight: 700;
    letter-spacing: 1px;
}

.password-box input[type="password"] {
    width: 100%;
    padding: 18px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1.3em;
    font-weight: 600;
    text-align: center;
    letter-spacing: 8px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    background: #f8f9fa;
    color: #2c3e50;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.password-box input[type="password"]:focus {
    outline: none;
    border-color: #667eea;
    background: #ffffff;
    box-shadow: 
        0 0 0 4px rgba(102, 126, 234, 0.2),
        0 4px 20px rgba(102, 126, 234, 0.3);
    transform: scale(1.02);
}

.password-box button {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.3em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s ease;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    position: relative;
    overflow: hidden;
    letter-spacing: 2px;
}

.password-box button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.password-box button:hover::before {
    width: 400px;
    height: 400px;
}

.password-box button:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.5);
}

.password-box button:active {
    transform: translateY(-1px) scale(1);
}

.password-error {
    color: #e74c3c;
    margin-top: 15px;
    font-size: 1.05em;
    min-height: 20px;
    font-weight: 700;
    animation: errorShake 0.5s ease;
}

@keyframes errorShake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-10px);
    }
    75% {
        transform: translateX(10px);
    }
}

.container.hidden {
    display: none;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #4A90E2;
    --success: #52C41A;
    --warning: #FAAD14;
    --danger: #F5222D;
    --info: #13C2C2;
    --purple: #722ED1;
    --bg-light: #F5F7FA;
    --bg-white: #FFFFFF;
    --text-dark: #2C3E50;
    --text-gray: #6C757D;
    --border: #E8EAED;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-hover: 0 4px 16px rgba(0,0,0,0.12);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #0f2027 0%, #203a43 25%, #2c5364 50%, #203a43 75%, #0f2027 100%);
    background-size: 400% 400%;
    animation: gradientShift 20s ease infinite;
    min-height: 100vh;
    padding: 20px;
    color: var(--text-dark);
    position: relative;
    overflow-x: hidden;
}

/* 动态背景渐变动画 */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* 浮动粒子效果 - 增强版 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(100, 200, 255, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(150, 220, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 90% 20%, rgba(200, 230, 255, 0.08) 0%, transparent 50%);
    animation: floatParticles 25s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes floatParticles {
    0%, 100% {
        transform: translateY(0) scale(1);
        opacity: 0.4;
    }
    50% {
        transform: translateY(-30px) scale(1.15);
        opacity: 0.6;
    }
}

/* 装饰性光效 */
.light-effect {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.25;
    pointer-events: none;
    z-index: 0;
}

.light-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(100, 180, 255, 0.6) 0%, transparent 70%);
    top: 5%;
    left: 5%;
    animation: float1 18s ease-in-out infinite;
}

.light-2 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(150, 200, 255, 0.5) 0%, transparent 70%);
    bottom: 5%;
    right: 5%;
    animation: float2 22s ease-in-out infinite;
}

.light-3 {
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(200, 230, 255, 0.55) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    animation: float3 25s ease-in-out infinite;
}

@keyframes float1 {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(80px, -50px) scale(1.1);
    }
    66% {
        transform: translate(-50px, 60px) scale(0.9);
    }
}

@keyframes float2 {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(-60px, 50px) scale(1.15);
    }
    66% {
        transform: translate(60px, -60px) scale(0.85);
    }
}

@keyframes float3 {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        transform: translate(calc(-50% + 50px), calc(-50% - 50px)) scale(1.2);
    }
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: 
        0 10px 50px rgba(0,0,0,0.3),
        0 0 100px rgba(100, 180, 255, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    overflow: hidden;
    position: relative;
    z-index: 1;
    animation: containerFadeIn 1s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* 容器内部光效 */
.container::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: containerShine 8s ease-in-out infinite;
    pointer-events: none;
}

@keyframes containerShine {
    0% {
        left: -100%;
    }
    50%, 100% {
        left: 200%;
    }
}

@keyframes containerFadeIn {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Header */
header {
    background: linear-gradient(135deg, #0f2027 0%, #203a43 25%, #2c5364 50%, #203a43 75%, #0f2027 100%);
    background-size: 400% 400%;
    animation: headerGradient 10s ease infinite;
    color: white;
    padding: 60px 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

@keyframes headerGradient {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* 星光效果 */
header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20% 30%, white, transparent),
        radial-gradient(2px 2px at 60% 70%, white, transparent),
        radial-gradient(1px 1px at 50% 50%, white, transparent),
        radial-gradient(1px 1px at 80% 10%, white, transparent),
        radial-gradient(2px 2px at 90% 60%, white, transparent),
        radial-gradient(1px 1px at 33% 80%, white, transparent),
        radial-gradient(1px 1px at 15% 90%, white, transparent);
    background-size: 200% 200%;
    animation: stars 20s linear infinite;
    opacity: 0.6;
}

@keyframes stars {
    from {
        transform: translateY(0);
    }
    to {
        transform: translateY(-100px);
    }
}

/* 光晕旋转效果 */
header::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 50%);
    animation: headerRotate 30s linear infinite;
}

@keyframes headerRotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

header h1 {
    font-size: 3em;
    margin: 0;
    position: relative;
    z-index: 1;
    text-shadow: 
        0 0 10px rgba(255, 255, 255, 0.8),
        0 0 20px rgba(100, 200, 255, 0.6),
        0 0 30px rgba(100, 200, 255, 0.4),
        0 2px 10px rgba(0, 0, 0, 0.3);
    animation: titleGlow 3s ease-in-out infinite;
    letter-spacing: 2px;
    font-weight: 700;
}

@keyframes titleGlow {
    0%, 100% {
        text-shadow: 
            0 0 10px rgba(255, 255, 255, 0.8),
            0 0 20px rgba(100, 200, 255, 0.6),
            0 0 30px rgba(100, 200, 255, 0.4),
            0 2px 10px rgba(0, 0, 0, 0.3);
    }
    50% {
        text-shadow: 
            0 0 20px rgba(255, 255, 255, 1),
            0 0 30px rgba(100, 200, 255, 0.8),
            0 0 40px rgba(100, 200, 255, 0.6),
            0 0 50px rgba(100, 200, 255, 0.4),
            0 2px 10px rgba(0, 0, 0, 0.3);
    }
}

/* Dashboard */
.dashboard {
    padding: 30px 40px;
    background: var(--bg-light);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, #ffffff 0%, #f0f8ff 100%);
    padding: 25px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    transition: all 0.4s ease;
    border-left: 4px solid;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent 0%, rgba(100, 180, 255, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(100, 180, 255, 0.3) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-card:hover::after {
    width: 300px;
    height: 300px;
}

.stat-card:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 
        0 12px 30px rgba(0, 0, 0, 0.15),
        0 0 40px rgba(100, 180, 255, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.stat-icon {
    font-size: 2.8em;
    opacity: 0.9;
    position: relative;
    z-index: 1;
    animation: iconFloat 3s ease-in-out infinite;
}

@keyframes iconFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

.stat-card.primary { border-color: var(--primary); }
.stat-card.success { border-color: var(--success); }
.stat-card.warning { border-color: var(--warning); }
.stat-card.info { border-color: var(--info); }

.stat-icon {
    font-size: 2.5em;
    opacity: 0.9;
}

.stat-content h3 {
    font-size: 0.9em;
    color: var(--text-gray);
    margin-bottom: 8px;
    font-weight: 500;
}

.stat-number {
    font-size: 1.8em;
    font-weight: bold;
    color: var(--text-dark);
}

/* Priority Stats */
.priority-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.priority-item {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.priority-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    transform: translateX(-100%);
    transition: transform 0.5s ease;
}

.priority-item:hover::after {
    transform: translateX(100%);
}

.priority-item:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(30, 60, 114, 0.12);
}

.priority-item.must-buy { border-left: 4px solid var(--danger); }
.priority-item.important { border-left: 4px solid var(--warning); }
.priority-item.optional { border-left: 4px solid var(--info); }
.priority-item.later { border-left: 4px solid var(--text-gray); }

.priority-label {
    font-weight: 600;
    color: var(--text-dark);
}

.priority-count {
    font-size: 1.5em;
    font-weight: bold;
    color: var(--primary);
}

.priority-completed {
    font-size: 0.85em;
    color: var(--text-gray);
}

/* Filters */
.filters {
    padding: 25px 40px;
    background: white;
    border-bottom: 2px solid var(--border);
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-group label {
    font-weight: 500;
    color: var(--text-dark);
    white-space: nowrap;
}

.filter-group select,
.filter-group input[type="text"] {
    padding: 10px 15px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 0.95em;
    transition: all 0.3s ease;
    min-width: 150px;
    background: white;
}

.filter-group select {
    cursor: pointer;
    padding-right: 35px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%232a5298' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-color: white;
}

.filter-group select:hover,
.filter-group input[type="text"]:hover {
    border-color: #2a5298;
    box-shadow: 0 2px 8px rgba(42, 82, 152, 0.1);
}

.filter-group select:focus,
.filter-group input[type="text"]:focus {
    outline: none;
    border-color: #2a5298;
    box-shadow: 0 0 0 3px rgba(42, 82, 152, 0.1);
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
}

/* 筛选器下拉框选项 */
.filter-group select option {
    padding: 10px;
    background: white;
    color: var(--text-dark);
}

.filter-group select option:checked {
    background: #e8f0ff;
    color: #1e3c72;
    font-weight: 600;
}

.search-group {
    flex: 1;
    min-width: 250px;
}

.search-group input {
    width: 100%;
}

/* Table Section */
.table-section {
    padding: 30px 40px;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.table-header h2 {
    color: var(--text-dark);
    font-size: 1.5em;
}

.btn-add {
    background: linear-gradient(135deg, #2a5298 0%, #1e3c72 100%);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 10px;
    font-size: 1.05em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s ease;
    box-shadow: 
        0 6px 20px rgba(30, 60, 114, 0.4),
        0 0 20px rgba(100, 180, 255, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.btn-add::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-add::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: buttonShine 3s ease-in-out infinite;
}

@keyframes buttonShine {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    50%, 100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

.btn-add:hover::before {
    width: 400px;
    height: 400px;
}

.btn-add:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 
        0 10px 30px rgba(30, 60, 114, 0.5),
        0 0 40px rgba(100, 180, 255, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-add:active {
    transform: translateY(-1px) scale(1.02);
}

.table-wrapper {
    overflow-x: auto;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

th {
    padding: 16px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 0.9em;
    white-space: nowrap;
}

th.sortable {
    cursor: pointer;
    user-select: none;
    transition: background 0.2s ease;
}

th.sortable:hover {
    background: rgba(255, 255, 255, 0.1);
}

.sort-icon {
    font-size: 0.8em;
    opacity: 0.7;
    margin-left: 4px;
}

tbody tr {
    border-bottom: 1px solid var(--border);
    transition: all 0.2s ease;
    animation: rowFadeIn 0.3s ease;
}

tbody tr td {
    vertical-align: top;
}

@keyframes rowFadeIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes rowFadeOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(20px);
    }
}

tbody tr:hover {
    background: linear-gradient(90deg, #f8f9ff 0%, #e8f0ff 50%, #f8f9ff 100%);
    box-shadow: 0 2px 8px rgba(30, 60, 114, 0.08);
}

td {
    padding: 14px 12px;
    font-size: 0.9em;
}

.editable-cell {
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    user-select: none;
}

.editable-cell:hover {
    background: linear-gradient(135deg, #e8f0ff 0%, #f0f5ff 100%);
    box-shadow: inset 0 0 0 1px rgba(30, 60, 114, 0.1);
}

.editable-cell:hover::after {
    content: '✏️';
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8em;
    opacity: 0.6;
    animation: editIconPulse 1.5s ease infinite;
}

/* 点击涟漪效果 */
.editable-cell:active {
    transform: scale(0.98);
}

.editable-cell.clicking {
    animation: cellClick 0.3s ease;
}

@keyframes cellClick {
    0% {
        transform: scale(1);
        box-shadow: inset 0 0 0 0 rgba(42, 82, 152, 0.3);
    }
    50% {
        transform: scale(0.97);
        box-shadow: inset 0 0 0 3px rgba(42, 82, 152, 0.3);
    }
    100% {
        transform: scale(1);
        box-shadow: inset 0 0 0 0 rgba(42, 82, 152, 0);
    }
}

/* 涟漪效果 */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(42, 82, 152, 0.4);
    transform: scale(0);
    animation: rippleEffect 0.6s ease-out;
    pointer-events: none;
}

@keyframes rippleEffect {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* 保存成功动画 */
.cell-saved {
    animation: cellSaved 0.5s ease;
}

@keyframes cellSaved {
    0%, 100% {
        background: transparent;
    }
    50% {
        background: linear-gradient(135deg, #d4f4dd 0%, #e8f5e9 100%);
        box-shadow: inset 0 0 0 2px rgba(82, 196, 26, 0.3);
    }
}

@keyframes editIconPulse {
    0%, 100% {
        opacity: 0.6;
        transform: translateY(-50%) scale(1);
    }
    50% {
        opacity: 1;
        transform: translateY(-50%) scale(1.1);
    }
}

.brand-cell, .note-cell {
    min-width: 200px;
    max-width: 400px;
    white-space: pre-wrap;
    word-wrap: break-word;
    vertical-align: top;
    padding: 14px 12px;
    line-height: 1.6;
}

.brand-cell {
    min-width: 180px;
}

.note-cell {
    min-width: 250px;
}

.brand-display, .note-display {
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 20px;
    word-wrap: break-word;
    white-space: pre-wrap;
}

.brand-display:hover, .note-display:hover {
    background: #f0f0f0;
}

.brand-display:empty::before, .note-display:empty::before {
    content: '点击添加';
    color: var(--text-gray);
    font-style: italic;
}

.quick-edit-input {
    padding: 8px;
    border: 2px solid #2a5298;
    border-radius: 6px;
    font-size: 0.9em;
    font-family: inherit;
    outline: none;
    background: white;
    box-shadow: 0 0 0 3px rgba(42, 82, 152, 0.1);
    animation: inputFocusIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    transition: all 0.3s ease;
}

.quick-edit-input:hover {
    border-color: #1e3c72;
    box-shadow: 0 0 0 3px rgba(42, 82, 152, 0.15);
}

.quick-edit-input:focus {
    border-color: #1e3c72;
    box-shadow: 0 0 0 4px rgba(42, 82, 152, 0.2);
}

/* 文本输入框 */
input[type="text"].quick-edit-input,
input[type="number"].quick-edit-input {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
}

/* 文本域 */
textarea.quick-edit-input {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
    resize: vertical;
    min-height: 60px;
    max-height: 300px;
    overflow-y: auto;
}

/* 下拉框特殊样式 */
select.quick-edit-input {
    cursor: pointer;
    padding: 12px 35px 12px 15px;
    background: linear-gradient(135deg, #ffffff 0%, #e8f4ff 100%);
    border: 3px solid #2a5298;
    box-shadow: 
        0 4px 15px rgba(42, 82, 152, 0.2),
        inset 0 1px 3px rgba(255, 255, 255, 0.8);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='%232a5298' d='M8 12L2 6h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    transition: all 0.3s ease;
    font-weight: 600;
    color: #1e3c72;
}

select.quick-edit-input:hover {
    border-color: #1e3c72;
    box-shadow: 
        0 6px 20px rgba(42, 82, 152, 0.3),
        0 0 0 3px rgba(42, 82, 152, 0.1),
        inset 0 1px 3px rgba(255, 255, 255, 0.8);
    transform: translateY(-2px);
    background: linear-gradient(135deg, #ffffff 0%, #d4e8ff 100%);
}

select.quick-edit-input:focus {
    border-color: #1e3c72;
    box-shadow: 
        0 0 0 5px rgba(42, 82, 152, 0.25),
        0 8px 25px rgba(42, 82, 152, 0.4),
        inset 0 1px 3px rgba(255, 255, 255, 0.8);
    background: linear-gradient(135deg, #ffffff 0%, #d4e8ff 100%);
}

/* 下拉框选项样式 - 修复显示问题 */
select.quick-edit-input option {
    padding: 12px 15px;
    background: white;
    color: #1e3c72;
    font-size: 1em;
    font-weight: 500;
    border-bottom: 1px solid #e8eaed;
}

/* 选中的选项 */
select.quick-edit-input option:checked,
select.quick-edit-input option[selected] {
    background: linear-gradient(135deg, #2a5298 0%, #1e3c72 100%);
    color: white;
    font-weight: 700;
}

/* 悬停的选项 */
select.quick-edit-input option:hover {
    background: linear-gradient(135deg, #e8f4ff 0%, #d4e8ff 100%);
    color: #1e3c72;
}

@keyframes inputFocusIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.priority-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.priority-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.priority-必买 {
    background: linear-gradient(135deg, #ff4d4f 0%, #ff7875 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(255, 77, 79, 0.3);
}

.priority-重要 {
    background: linear-gradient(135deg, #faad14 0%, #ffc53d 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(250, 173, 20, 0.3);
}

.priority-按需 {
    background: linear-gradient(135deg, #13c2c2 0%, #36cfc9 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(19, 194, 194, 0.3);
}

.priority-可延后 {
    background: linear-gradient(135deg, #8c8c8c 0%, #bfbfbf 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(140, 140, 140, 0.3);
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.status-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.status-未开始 {
    background: linear-gradient(135deg, #d9d9d9 0%, #f0f0f0 100%);
    color: #595959;
    box-shadow: 0 2px 8px rgba(217, 217, 217, 0.3);
}

.status-已列入预算 {
    background: linear-gradient(135deg, #1890ff 0%, #40a9ff 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(24, 144, 255, 0.3);
}

.status-比价中 {
    background: linear-gradient(135deg, #fa8c16 0%, #ffa940 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(250, 140, 22, 0.3);
}

.status-已下单 {
    background: linear-gradient(135deg, #f5222d 0%, #ff4d4f 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(245, 34, 45, 0.3);
}

.status-已买\/已完成 {
    background: linear-gradient(135deg, #52c41a 0%, #73d13d 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(82, 196, 26, 0.3);
}

.btn-edit, .btn-delete {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.2em;
    transition: all 0.2s ease;
}

.btn-delete {
    background: transparent;
    color: var(--text-gray);
    transition: all 0.3s ease;
    position: relative;
}

.btn-delete::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: #fff1f0;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
    z-index: -1;
}

.btn-delete:hover::before {
    width: 40px;
    height: 40px;
}

.btn-delete:hover {
    color: var(--danger);
    transform: scale(1.2) rotate(10deg);
}

/* Space Summary */
.space-summary {
    padding: 30px 40px;
    background: var(--bg-light);
}

.space-summary h2 {
    margin-bottom: 20px;
    color: var(--text-dark);
}

.space-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.space-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border-top: 4px solid var(--primary);
    position: relative;
    overflow: hidden;
}

.space-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(30, 60, 114, 0.05), transparent);
    transition: left 0.5s ease;
}

.space-card:hover::before {
    left: 100%;
}

.space-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(30, 60, 114, 0.15);
    border-top-color: #2a5298;
}

.space-card h3 {
    color: var(--text-dark);
    margin-bottom: 15px;
    font-size: 1.2em;
}

.space-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.space-info-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9em;
}

.space-info-label {
    color: var(--text-gray);
}

.space-info-value {
    font-weight: 600;
    color: var(--text-dark);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    header {
        padding: 30px 20px;
    }

    header h1 {
        font-size: 1.8em;
    }

    .dashboard,
    .filters,
    .table-section,
    .space-summary {
        padding: 20px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .filters {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group select,
    .filter-group input {
        width: 100%;
    }
}
