/* 重置与基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-blue: #4a90e2;
    --dark-blue: #2c5282;
    --light-blue: #63b3ed;
    --accent-blue: #3182ce;
    --text-dark: #2d3748;
    --text-light: #718096;
    --bg-light: #f7fafc;
    --bg-white: #ffffff;
    --shadow: rgba(74, 144, 226, 0.1);
    --border-color: #e2e8f0;
    --success-color: #38a169;
    --warning-color: #d69e2e;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-light);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3 {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

button {
    cursor: pointer;
    border: none;
    font-family: 'Inter', sans-serif;
}

.public-security-icon {
    width: 16px;
    height: 16px;
    vertical-align: middle;
    margin-right: 4px;
    display: inline-block;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 顶部导航 */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 2px 10px var(--shadow);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-blue);
}

.logo i {
    margin-right: 10px;
    font-size: 1.8rem;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    position: relative;
    font-weight: 500;
    padding: 5px 0;
    transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-blue);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-blue);
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* 主内容 */
.main-content {
    margin-top: 80px;
}

/* 英雄区域 */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 60px 5%;
    max-width: 1400px;
    margin: 0 auto;
    min-height: calc(100vh - 80px);
}

.hero-content {
    flex: 1;
    padding-right: 40px;
}

.hero-title {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 20px;
}

.highlight {
    color: var(--primary-blue);
    display: block;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 30px;
    max-width: 500px;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-frame {
    width: 400px;
    height: 500px;
    background: linear-gradient(135deg, var(--light-blue), var(--primary-blue));
    border-radius: 20px;
    position: relative;
    transform: rotate(3deg);
    box-shadow: 20px 20px 40px rgba(74, 144, 226, 0.2);
    overflow: hidden;
}

.frame-content {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    bottom: 20px;
    background-color: var(--bg-light);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--primary-blue);
}

.frame-content::before {
    content: '\f030';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 4rem;
    margin-bottom: 20px;
}

.frame-content::after {
    content: '视觉艺术';
    font-size: 1.5rem;
    font-weight: 600;
}

/* 按钮样式 */
.btn-primary {
    display: inline-block;
    background-color: var(--primary-blue);
    color: white;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
}

.btn-primary:hover {
    background-color: var(--dark-blue);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.4);
}

.btn-secondary {
    display: inline-block;
    background-color: transparent;
    color: var(--primary-blue);
    padding: 10px 25px;
    border-radius: 30px;
    font-weight: 600;
    border: 2px solid var(--primary-blue);
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background-color: var(--primary-blue);
    color: white;
}

.btn-secondary.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 区域通用样式 */
.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.section-subtitle {
    color: var(--text-light);
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.section-line {
    width: 80px;
    height: 4px;
    background-color: var(--primary-blue);
    margin: 0 auto;
    border-radius: 2px;
}

/* 作品集区域 */
.portfolio-section {
    padding: 80px 5%;
    background-color: var(--bg-white);
}

.portfolio-toggle {
    margin-bottom: 30px;
    text-align: center;
}

.toggle-buttons {
    display: inline-flex;
    background-color: var(--bg-light);
    border-radius: 30px;
    padding: 5px;
    border: 1px solid var(--border-color);
}

.toggle-btn {
    padding: 10px 25px;
    border-radius: 25px;
    background-color: transparent;
    color: var(--text-light);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.toggle-btn:hover {
    color: var(--primary-blue);
}

.toggle-btn.active {
    background-color: var(--primary-blue);
    color: white;
}

/* 作品区域显示控制 */
.horizontal-portfolio-section,
.vertical-portfolio-section {
    display: none;
}

.horizontal-portfolio-section.active,
.vertical-portfolio-section.active {
    display: block;
}

/* 作品网格通用样式 */
.portfolio-grid,
.vertical-portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.portfolio-item {
    background-color: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px var(--shadow);
    transition: all 0.3s ease;
    position: relative;
}

.portfolio-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(74, 144, 226, 0.15);
}

/* 作品图片容器样式 */
.portfolio-image {
    width: 100%;
    height: 250px;
    background-color: var(--bg-light);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--primary-blue);
    font-size: 3rem;
    overflow: hidden;
    position: relative;
}

/* 作品缩略图样式 - 完整显示不裁剪 */
.portfolio-image img.portfolio-thumbnail {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    transition: transform 0.3s ease;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* 根据图片方向动态适配 */
.portfolio-image.horizontal img.portfolio-thumbnail {
    width: 100%;
    height: auto;
}

.portfolio-image.vertical img.portfolio-thumbnail {
    width: auto;
    height: 100%;
}

/* 悬停效果 */
.portfolio-item:hover .portfolio-image img.portfolio-thumbnail {
    transform: translate(-50%, -50%) scale(1.05);
}

/* 为不同方向的图片添加背景色区分 */
.portfolio-image.horizontal {
    background-color: rgba(74, 144, 226, 0.05);
}

.portfolio-image.vertical {
    background-color: rgba(99, 179, 237, 0.05);
}

.portfolio-info {
    padding: 20px;
}

.portfolio-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.portfolio-category {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.portfolio-description {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 15px;
    min-height: 60px;
}

.portfolio-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.view-btn {
    background-color: var(--primary-blue);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background-color 0.3s;
}

.view-btn:hover {
    background-color: var(--dark-blue);
}

.portfolio-date {
    color: var(--text-light);
    font-size: 0.85rem;
}

/* 竖版作品项特殊样式 */
.vertical-portfolio-item .portfolio-image {
    height: 350px; /* 竖版图片更高 */
}

/* 关于区域 */
.about-section {
    padding: 80px 5%;
    background-color: var(--bg-light);
}

.about-content {
    display: flex;
    align-items: center;
    gap: 50px;
    max-width: 1200px;
    margin: 0 auto;
}

.about-image {
    flex: 1;
}

.about-frame {
    width: 350px;
    height: 450px;
    background: linear-gradient(135deg, var(--light-blue), var(--primary-blue));
    border-radius: 20px;
    position: relative;
    transform: rotate(-3deg);
    box-shadow: 20px 20px 40px rgba(74, 144, 226, 0.2);
    overflow: hidden;
}

.about-frame-content {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    bottom: 20px;
    background-color: var(--bg-white);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--primary-blue);
}

.about-frame-content::before {
    content: '\f007';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 4rem;
    margin-bottom: 20px;
}

.about-frame-content::after {
    content: '二次元摄影师';
    font-size: 1.5rem;
    font-weight: 600;
}

.about-text {
    flex: 1;
}

.about-text h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--dark-blue);
}

.about-text p {
    margin-bottom: 15px;
    line-height: 1.6;
}

.about-text ul {
    margin-left: 20px;
    margin-bottom: 20px;
    list-style: disc;
}

.about-text li {
    margin-bottom: 8px;
}

.skills {
    margin-top: 30px;
}

.skill {
    margin-bottom: 20px;
}

.skill-name {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.skill-bar {
    height: 8px;
    background-color: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.skill-level {
    height: 100%;
    background-color: var(--primary-blue);
    border-radius: 4px;
    transition: width 1s ease;
}

/* 联系区域 */
.contact-section {
    padding: 80px 5%;
    background-color: var(--bg-white);
}

.contact-content {
    display: flex;
    gap: 50px;
    max-width: 1200px;
    margin: 0 auto;
}

.contact-info {
    flex: 1;
}

.contact-info h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--dark-blue);
}

.contact-info p {
    margin-bottom: 30px;
    line-height: 1.6;
}

.contact-details {
    margin-bottom: 40px;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    gap: 15px;
}

.contact-item i {
    color: var(--primary-blue);
    width: 20px;
    text-align: center;
}

.contact-item span {
    line-height: 1.5;
}

.social-links {
    display: flex;
    gap: 30px;
    margin-top: 40px;
}

.social-qr-container {
    position: relative;
    text-align: center;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background-color: var(--primary-blue);
    color: white;
    border-radius: 50%;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    margin: 0 auto 10px;
}

.social-link:hover {
    background-color: var(--dark-blue);
    transform: translateY(-3px);
}

.qr-code {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: white;
    padding: 10px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 100;
    width: 150px;
    margin-bottom: 10px;
}

.social-qr-container:hover .qr-code {
    opacity: 1;
    visibility: visible;
}

.qr-image {
    width: 100%;
    height: auto;
    border-radius: 5px;
    margin-bottom: 5px;
}

.qr-label {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* 鸣谢区域 */
.acknowledgement-section {
    flex: 1;
    padding-left: 30px;
}

.acknowledgement-section h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: var(--dark-blue);
}

.acknowledgement-subtitle {
    color: var(--text-light);
    margin-bottom: 30px;
    font-size: 1rem;
}

.acknowledgement-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.acknowledgement-item {
    text-align: center;
    transition: transform 0.3s ease;
}

.acknowledgement-item:hover {
    transform: translateY(-5px);
}

.avatar-container {
    position: relative;
    width: 50px;
    height: 50px;
    margin: 0 auto 15px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 5px 15px var(--shadow);
    border: 3px solid var(--bg-white);
    background-color: var(--bg-light);
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.avatar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(74, 144, 226, 0.8);
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
    font-size: 0.8rem;
}

.avatar-overlay i {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.avatar-container:hover .avatar-overlay {
    opacity: 1;
}

.avatar-container:hover .avatar-img {
    opacity: 0.7;
}

.cn-name {
    font-weight: 600;
    color: var(--text-dark);
    margin-top: 5px;
    font-size: 0.95rem;
}

/* 页脚 */
.footer {
    padding: 40px 5%;
    background-color: var(--dark-blue);
    color: white;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    gap: 10px;
}

.footer-logo i {
    font-size: 1.8rem;
}

.footer-info {
    text-align: right;
}

.footer-info p {
    margin-bottom: 10px;
    line-height: 1.5;
}

.footer-note {
    font-size: 0.9rem;
    opacity: 0.8;
}

.footer-info a {
    color: white;
    text-decoration: underline;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    border-radius: 20px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-header {
    padding: 20px 30px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 1.5rem;
    color: var(--dark-blue);
}

.modal-close {
    background-color: transparent;
    color: var(--text-light);
    font-size: 1.5rem;
    transition: color 0.3s;
}

.modal-close:hover {
    color: var(--primary-blue);
}

.modal-body {
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.modal-image-container {
    flex: 1;
    background-color: var(--bg-light);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    overflow: hidden;
}

.modal-image-container img {
    max-width: 100%;
    max-height: 400px;
    object-fit: contain;
}

.modal-info {
    flex: 1;
}

.modal-info h2 {
    font-size: 2rem;
    margin-bottom: 15px;
}

.modal-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.modal-category {
    background-color: var(--primary-blue);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.modal-date {
    color: var(--text-light);
}

.image-orientation {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    padding: 10px 15px;
    background-color: var(--bg-light);
    border-radius: 10px;
}

.image-orientation i {
    color: var(--primary-blue);
}

.modal-footer {
    padding: 20px 30px;
    border-top: 1px solid var(--border-color);
    text-align: right;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding: 40px 5%;
    }

    .hero-content {
        padding-right: 0;
        margin-bottom: 40px;
    }

    .hero-title {
        font-size: 2.8rem;
    }

    .about-content {
        flex-direction: column;
    }

    .about-image {
        margin-bottom: 40px;
    }

    .about-frame {
        width: 300px;
        height: 400px;
    }

    .contact-content {
        flex-direction: column;
    }

    .social-links {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: white;
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 10px 20px var(--shadow);
        gap: 15px;
    }

    .nav-links.active {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .portfolio-grid,
    .vertical-portfolio-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }

    .footer-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .footer-info {
        text-align: center;
    }

    .modal-body {
        flex-direction: column;
    }

    /* 切换按钮组响应式 */
    .toggle-buttons {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
    }

    .toggle-btn {
        width: 100%;
        justify-content: center;
    }

    /* 鸣谢区域响应式 */
    .acknowledgement-section {
        padding-left: 0;
        margin-top: 40px;
    }
    
    .acknowledgement-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 20px;
    }
    
    .avatar-container {
        width: 90px;
        height: 90px;
    }
}

@media (max-width: 480px) {
    .portfolio-grid,
    .vertical-portfolio-grid {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .btn-primary,
    .btn-secondary {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .acknowledgement-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
