:root {
    --primary-color: #1E3A8A;
    --primary-dark: #1E3A8A;
    --secondary-color: #CBD5E1;
    --background-light: #FFFFFF;
    --background-dark: #F1F5F9;
    --text-dark: #1E293B;
    --text-light: #FFFFFF;
    --text-muted: #64748B;
    --border-color: #CBD5E1;
    --success-color: #4CAF50;
    --warning-color: #FF9800;
    --danger-color: #F44336;
    --white: #FFFFFF;
    --shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.05);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
    font-size: 18px;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--background-dark);
    color: var(--text-dark);
}

/* 头部样式 */
.header {
    background: var(--primary-color);
    display: flex;
    align-items: center;
    padding: 16px 24px;
    justify-content: space-between;
}

.logo {
    color: var(--text-light);
    font-size: 24px;
    font-weight: 500;
    line-height: 32px;
    width: 129px;
    align-items: center;
    display: flex;
    text-overflow: ellipsis;
    min-height: 32px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tabs {
    display: flex;
    gap: 24px;
}

.tab {
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 8px;
}

.tab.active {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-light);
}

.user-actions {
    display: flex;
    gap: 12px;
}

.login-btn, .logout-btn {
    background: transparent;
    border: 1px solid var(--text-light);
    border-radius: 8px;
    color: var(--text-light);
    padding: 8px 16px;
    cursor: pointer;
    font-size: 14px;
    line-height: 20px;
}

.login-btn:hover, .logout-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.search-container {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    padding-left: 32px;
    padding-right: 32px;
    margin-top: 8px;
    gap: 24px;
}

.search-box {
    background: var(--background-light);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    width: 576px;
    gap: 12px;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    padding-left: 16px;
    padding-right: 16px;
}

.search-icon {
    width: 20px;
    height: 20px;
    margin-top: 14px;
    margin-bottom: 14px;
    background-image: url('https://miaoduo.fbcontent.cn/private/resource/image/1997bd8a187a4bd-cac82e9f-1999-4718-830e-9e090bc4a729.svg');
    background-size: cover;
    --svg-fill-colors: rgb(100, 116, 139);
}

.search-input {
    width: 100%;
    border: none;
    outline: none;
    color: var(--text-muted);
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
    align-items: center;
    display: flex;
    text-overflow: ellipsis;
    min-height: 48px;
}

.search-input::placeholder {
    color: #9CA3AF;
}

.create-project-btn {
    background: #2563EB;
    border-radius: 12px;
    display: flex;
    gap: 8px;
    align-items: center;
    flex-direction: row;
    padding: 0 24px;
    color: #FFFFFF;
    font-size: 16px;
    line-height: 24px;
    min-height: 48px;
    border: none;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.create-project-btn:hover {
    background: #1D4ED8;
}

.create-project-icon {
    width: 20px;
    height: 20px;
    margin-top: 14px;
    margin-bottom: 14px;
    background-image: url('https://miaoduo.fbcontent.cn/private/resource/image/1997b5975ef3fa9-6ebca62f-f452-4d18-b6d7-6d2228e3754f.svg');
    background-size: cover;
    --svg-fill-colors: rgb(255, 255, 255);
}

.projects-container {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: stretch;
    gap: 24px;
    padding: 32px;
    flex-wrap: wrap;
}

.project-card {
    background: var(--background-light);
    box-shadow: var(--shadow);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    overflow: hidden;
    flex-grow: 1;
    flex-basis: calc(25% - 18px);
    max-width: calc(25% - 18px);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

@media (max-width: 1200px) {
    .project-card {
        flex-basis: calc(50% - 12px);
        max-width: calc(50% - 12px);
    }
    
    .search-box {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .content-container {
        margin-left: 0;
        padding: 16px;
    }

    .project-card {
        flex-basis: 100%;
        max-width: 100%;
    }
    
    .search-container {
        flex-direction: column;
        gap: 16px;
        align-items: center;
        padding-left: 16px;
        padding-right: 16px;
        margin-top: 16px;
        margin-bottom: 16px;
    }
    
    .search-box {
        width: 100%;
    }
    
    .projects-container {
        padding: 16px;
    }
    
    .header {
        padding: 12px 16px;
    }
    
    .header-right {
        gap: 16px;
    }
}

/* 左侧边栏 */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 250px;
    height: 100%;
    background-color: var(--background-light);
    box-shadow: var(--shadow);
}

.content-container {
    padding: 24px;
}

.project-image {
    width: 100%;
    height: 140px;
    background-size: cover;
    background-position: center;
}

.project-title {
    margin-top: 12px;
    display: flex;
    align-items: flex-start;
    min-height: 28px;
    padding-left: 16px;
    color: #1E293B;
    font-size: 18px;
    line-height: 28px;
    align-items: center;
    display: flex;
    text-overflow: ellipsis;
    min-height: 28px;
}

.project-description {
    display: flex;
    align-items: flex-start;
    min-height: 20px;
    padding-left: 16px;
    color: var(--text-muted);
    font-weight: 400;
    line-height: 20px;
    width: 100%;
    align-items: center;
    display: flex;
    text-overflow: ellipsis;
    min-height: 20px;
    padding-right: 16px;
    margin-top: 4px;
}

.project-footer {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    padding: 16px;
    align-items: center;
    margin-top: 12px;
}

.views-container {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 4px;
}

.views-icon {
    width: 16px;
    height: 16px;
    margin-top: 2px;
    background-image: url('https://miaoduo.fbcontent.cn/private/resource/image/1997bd8a187290a-9a63c27c-8750-4ee7-afa1-e748a81f698f.svg');
    background-size: cover;
    --svg-fill-colors: rgb(100, 116, 139);
}

.views-count {
    color: var(--text-muted);
    font-weight: 400;
    line-height: 20px;
    align-items: center;
    display: flex;
    text-overflow: ellipsis;
    min-height: 20px;
    margin-left: 4px;
}

.visit-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    cursor: pointer;
    border-radius: var(--border-radius);
    transition: background-color 0.2s ease;
}

.visit-container:hover {
    background-color: rgba(37, 99, 235, 0.1);
}

.visit-icon {
    width: 16px;
    height: 16px;
    margin-top: 2px;
    background-image: url('https://miaoduo.fbcontent.cn/private/resource/image/1997bc31e4ac335-aa20aa79-9558-424e-a249-ff32622996ad.svg');
    background-size: cover;
    --svg-fill-colors: rgb(37, 99, 235);
}

.visit-text {
    color: #2563EB;
    line-height: 20px;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 500;
}

/* 弹窗样式 */
.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: #fff;
    margin: 5% auto;
    border: none;
    border-radius: 8px;
    width: 480px;
    box-shadow: 0px 8px 10px -6px rgba(0, 0, 0, 0.1), 0px 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.modal-header {
    padding: 24px 24px 25px 24px;
    border-bottom: 1px solid #D1D5DB;
}

.modal-title {
    color: #111827;
    font-size: 20px;
    font-weight: 500;
    line-height: 28px;
}

.form-group {
    margin: 0;
    padding: 0 24px;
}

.form-group.required {
    margin-top: 22px;
}

.form-group:not(.required) {
    margin-top: 12px;
}

.form-group label {
    display: block;
    margin-bottom: 3px;
    font-weight: 400;
    color: #111827;
    font-size: 16px;
    line-height: 24px;
}

.form-group.required label::after {
    content: "*";
    color: #EF4444;
    margin-left: 2px;
}

.input-field,
.textarea-field {
    width: 100%;
    padding: 8px 16px;
    border: 1px solid #D1D5DB;
    border-radius: 6px;
    font-size: 16px;
    line-height: 24px;
    color: #111827;
    box-sizing: border-box;
}

.input-field::placeholder,
.textarea-field::placeholder {
    color: #9CA3AF;
}

.textarea-field {
    height: 96px;
    resize: vertical;
    padding-top: 10px;
    padding-bottom: 10px;
}

.file-upload-area {
    border: 2px dashed #D1D5DB;
    border-radius: 6px;
    padding: 34px 20px;
    text-align: center;
    background-color: #F0F4F8;
    margin-top: 3px;
    position: relative;
}

.upload-icon {
    width: 48px;
    height: 48px;
    background-image: url('https://miaoduo.fbcontent.cn/private/resource/image/1997c4e463b8c5a-b12ffa93-e40e-4835-879a-3641179ecf1e.svg');
    background-size: cover;
    margin: 0 auto;
    --svg-fill-colors: rgb(26, 86, 219);
}

.upload-text {
    color: #374151;
    font-size: 16px;
    line-height: 24px;
    margin: 4px 0 8px 0;
}

.upload-subtext {
    color: #6B7280;
    font-size: 14px;
    line-height: 20px;
    margin: 8px 0;
}

.choose-file-btn {
    background-color: #FFFFFF;
    color: #1A56DB;
    padding: 9px 16px;
    border: 1px solid #D1D5DB;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    line-height: 24px;
    margin: 8px 0 34px 0;
}

.choose-file-btn:hover {
    background-color: #F0F4F8;
}

.file-info {
    color: #6B7280;
    font-size: 12px;
    line-height: 16px;
    margin-top: 4px;
    text-align: left;
}

.file-name-display {
    color: #1A56DB;
    font-size: 14px;
    font-weight: 500;
    margin-top: 10px;
    word-break: break-all;
    padding: 5px 10px;
    background-color: rgba(26, 86, 219, 0.05);
    border-radius: 4px;
    display: none;
}

.modal-footer {
    padding: 25px 24px 24px 24px;
    border-top: 1px solid #D1D5DB;
    display: flex;
    justify-content: flex-end;
    gap: 40px;
    margin-top: 27px;
}

.cancel-btn,
.confirm-btn {
    padding: 8px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    line-height: 24px;
    margin: 0;
}

.cancel-btn {
    background-color: transparent;
    color: #4B5563;
}

.cancel-btn:hover {
    background-color: #F3F4F6;
}

.confirm-btn {
    background-color: #1A56DB;
    color: white;
    min-width: 112px;
}

.confirm-btn:hover {
    background-color: #1649B6;
}