/* 引入自定义字体 */
@font-face {
    font-family: 'ABCNormal-Normal';
    src: url('../assets/fonts/ABCNormal-Normal.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'FZLTH';
    src: url('../assets/fonts/FZLTH_GBK.TTF') format('truetype');
    font-weight: normal;
    font-style: normal;
}

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

body {
    font-family: 'FZLTH', 'ABCNormal-Normal', Arial, sans-serif;
    color: #333;
    background-color: #F4F4F5;
}

.container {
    margin: 0 auto;
}

.toggle-icon {
    display: block;
    height: 2px;
    background-color: transparent;
    position: relative;
    transition: all 0.3s ease;
}

.toggle-icon::before,
.toggle-icon::after {
    content: '';
    display: block;
    width: 30px;
    height: 2px;
    background-color: #333;
    position: absolute;
    transition: all 0.3s ease;
}

/* 默认状态：等号 */
.toggle-icon::before {
    transform: translateY(0) rotate(45deg)
}

.toggle-icon::after {
    transform: translateY(0) rotate(-45deg)
}

/* 点击后状态：X形 */
.toggle-button.active .toggle-icon {
    background-color: transparent;
}

.toggle-button.active .toggle-icon::before {
    transform: translateY(0) rotate(45deg);
}

.toggle-button.active .toggle-icon::after {
    transform: translateY(0) rotate(-45deg);
}

/* 标题样式 */
h1#section-title {
    font-size: 1rem;
    margin-top: 7rem;
    color: #2c3e50;
    text-align: left;
    padding: 0 5%;
}

/* 项目列表容器 */
#project-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

/* 项目项样式 */
.project-item {
    transition: none;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    cursor: pointer;
}

/* 项目图片 */
.project-item img {
    width: 100%;
    aspect-ratio: 3/2;
    margin-top: 2%;
    padding: 0 5%;
    object-fit: cover;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

/* 项目信息 */
.project-info {
    padding: 0% 5% 2%;
}

/* 项目名称 */
.project-name {
    font-size: 14px;
    margin-bottom: 10px;
    color: #2c3e50;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

/* 项目类型和年份 */
.project-meta {
    display: flex;
    flex-direction: column;
    text-align: left;
    font-size: 12px;
    color: #7f8c8d;
}

.project-meta span {
    margin-top: 10px;
    font-size: 10px;
    color: #7f8c8d;
}

/* 项目描述 */
.project-description {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.5;
}

/* 响应式设计 - 手机 */
@media (max-width: 767px) { 
    .toggle-icon::before,
    .toggle-icon::after {
        width: 26px;
    }
}

/* 响应式设计 - 平板和桌面 */
@media (min-width: 768px) {
    #project-list {
        grid-template-columns: repeat(2, 1fr);
        padding: 0 5%;
    }
    .project-info {
        padding: 0%;
    }

    h1#section-title {
        font-size: 2.5rem;
    }

    .project-item img {
        padding: 0;
    }

    .project-name{
        padding: 0;
    }
}

/* 响应式设计 - 大型桌面 */
@media (min-width: 1024px) {
    #project-list {
        grid-template-columns: repeat(3, 1fr);
        padding: 0 5%;
    }

    .project-item img {
        padding: 0;
    }
}

/* 响应式设计 - 超大型桌面 */
@media (min-width: 1440px) {
    #project-list {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* 加载状态 */
.loading {
    text-align: center;
    font-size: 1.2rem;
    color: #7f8c8d;
    padding: 2rem;
}

/* 错误状态 */
.error {
    text-align: center;
    font-size: 1.2rem;
    color: #e74c3c;
    padding: 2rem;
}