:root {
    --primary-bg: #f5f5f7;
    --secondary-bg: #1d1d1f;
    --text-color: #1d1d1f;
    --header-height: 60px;  /* 从80px改为60px */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.5;
    color: var(--text-color);
}

/* 导航栏样式 */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    /*border-bottom: 1px solid rgba(0,0,0,0.1);*/
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo img {
    height: 30px;  /* 从40px改为30px */
    width: auto;
}

.logo h1 {
    font-size: 1.2rem;  /* 从1.5rem改为1.2rem */
    font-weight: 500;
}

.slogan {
    font-size: 2rem;
    color: #003f67;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

nav a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s ease;
}

nav a:hover {
    color: #0066cc;
}

.logo-link {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s ease;
}

.logo-link:hover {
    opacity: 0.8;
}

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

.nav-select {
    padding: 4px 24px 4px 8px;
    font-size: 15px;
    border: none;
    background-color: transparent;
    cursor: pointer;
    color: #333;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0 center;
    background-size: 16px;
}

.nav-select:hover {
    color: #666;
}

.nav-select:focus {
    outline: none;
}

.nav-link {
    color: #333;
    text-decoration: none;
    font-size: 16px;
    padding: 6px 12px;
}

.nav-link:hover {
    color: #007bff;
}

/* 主要内容区域 */
main {
    margin-top: var(--header-height);
}

.hero {
    height: calc(100vh - var(--header-height));
    position: relative;
    overflow: hidden;
}

.slider {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: opacity 0.3s ease;
}

.match-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;  /* 从40px减小到20px */
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;  /* 从20px减小到10px */
    text-align: center;
}

.match-info h2 {
    margin: 0;
    font-size: 1.5rem;
    padding: 3px 10px;  /* 从5px 15px减小到3px 10px */
    border-right: 1px solid rgba(255,255,255,0.3);
}

.match-info p {
    margin: 0;
    padding: 3px 10px;  /* 从5px 15px减小到3px 10px */
    border-right: 1px solid rgba(255,255,255,0.3);
    line-height: 1.2;  /* 添加行高控制 */
}

.match-info p:last-child {
    border-right: none;
}

.match-info a {
    color: #fff;
    text-decoration: none;
    padding: 8px 20px;
    background: rgba(255,255,255,0.2);
    /*border-radius: 20px;*/
    transition: background 0.3s ease;
}

.match-info a:hover {
    background: rgba(255,255,255,0.3);
}

/* 网格区域样式 */
.matches-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 40px 20px;
    /*max-width: 1200px;*/
    /*margin: 0 auto;*/
    margin-left: 40px;
    margin-right: 40px;
}

.match-card {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    aspect-ratio: 1;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.match-card:hover {
    transform: scale(1.02);
}

.match-card img {
    width: 100%;
    height: 62%;
    object-fit: cover;
}

.match-card-info {
    padding: 15px;
    background: #f8f8f8;  /* 从white改为#f8f8f8 */
}

.card-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.match-date {
    color: #666;
    margin: 0;
}

.video-link {
    display: inline-block;
    padding: 5px 10px;
    background: #dfdfdf;
    color: rgb(0, 0, 0);
    text-decoration: none;
    margin-top: 8px;
    border-radius: 4px;
}

.video-link:hover {
    background: #b2b2b2;
}

/* 成员页面样式 */
.members-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);  /* 修改为固定3列 */
    gap: 2rem;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.member-card {
    position: relative;
    /*border-radius: 12px;*/
    overflow: hidden;
    aspect-ratio: 1;
    transition: transform 0.3s ease;
}

.member-card:hover {
    transform: scale(1.02);
}

.member-photo {
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
}

.member-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.member-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 30%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-color);
    transform: translateY(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    border-radius: 0;
}

.member-card:hover .member-info {
    transform: translateY(0);
}

.member-info h3 {
    font-size: 1rem;
    margin-bottom: 0.3rem;
}

.member-info p {
    font-size: 0.9rem;
    margin: 0.2rem 0;
}

.member-info .quote {
    margin-top: 0.8rem;
    font-style: italic;
    opacity: 0.8;
}

.member-info .video-link {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.1);
    color: var(--text-color);
    text-decoration: none;
    transition: background 0.3s ease;
}

.member-info .video-link:hover {
    background: rgba(0, 0, 0, 0.2);
}

.member-name {
    font-size: 2rem;
    font-weight: 500;
}

.member-nickname {
    margin-right: auto;
    padding-left: 20px;
}

/* 信息行样式 */
.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.info-row span {
    font-size: 0.9rem;
}

/* 页脚样式 */
footer {
    background: var(--primary-bg);
    color: var(--text-color);
    padding: 40px 20px;
    margin-top: 40px;
    border-top: 1px solid rgba(0,0,0,0.1);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 40px;
    padding: 20px 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.contact, .links {
    flex: 1;
    padding: 20px 0;
}

.contact h3, .links h3 {
    color: #333;
    margin-bottom: 15px;
    font-weight: 500;
}

.contact p {
    color: #666;
    margin: 8px 0;
}

.links a {
    color: #0066cc;
    text-decoration: none;
    margin-right: 20px;
    transition: color 0.3s ease;
}

.links a:hover {
    color: #004499;
}

.copyright {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
    text-align: center;
    color: #999;
    font-size: 0.9rem;
}

.copyright p {
    margin: 5px 0;
}

/* 历史页面样式 */
.history-page {
    padding-top: var(--header-height);
}

.history-hero {
    height: 60vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('../images/team-hero.jpg');
    background-size: cover;
    color: white;
}

.team-story {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    line-height: 1.8;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(calc((100% - 120px) / 4), 1fr));
    gap: 20px;
    padding: 20px;
    max-width: 1200px;
    margin: 0 40px;
}

#gallery-top,
#gallery-middle,
#gallery-bottom {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(calc((100% - 120px) / 4), 1fr));
    gap: 20px;
    margin: 0 80px 0px 80px;
}

.gallery-item {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    cursor: pointer;
    margin-bottom: 20px;
}

.photo-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: white;
    font-size: 0.9rem;
    text-align: center;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    border-radius: 4px;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-section {
    margin-bottom: 40px;
    border-top: 1px solid #eee;
    padding-bottom: 20px;
}

.gallery-section h2 {
    padding: 20px;
    font-size: 1.5rem;
    color: #333;
}

.history-flex-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 20px;
    gap: 40px;
}

.click-text {
    font-size: 0.9rem;
    color: #666;
    margin-left: 20px;
}

.history-content {
    flex: 2;
}

.logo-story {
    flex: 1;
    text-align: center;
}

.logo-story img {
    width: 150px;
    height: auto;
    margin-bottom: 1rem;
}

.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.3);
    border: none;
    color: white;
    font-size: 24px;
    width: 50px;
    height: 50px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.prev-btn {
    left: 20px;
}

.next-btn {
    right: 20px;
}

.nav-btn.hidden {
    display: none;
}

.video-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    border-radius: 4px;
}

.video-links a {
    margin: 0;
}

.team-gallery {
    position: relative;
}

.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    margin: auto;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

.close-btn {
    position: absolute;
    top: -40px;
    right: -40px;
    width: 30px;
    height: 30px;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

.loading {
    position: relative;
    display: inline-block;
    min-height: 200px;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #1d1d1f;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.year-nav {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    text-align: center;
    display: none;
    /* border-top: 1px solid #eee; */
}

.year-select {
    padding: 8px 16px;
    font-size: 16px;
    border: none;
    border-bottom: 1px solid #ddd;
    background-color: transparent;
    cursor: pointer;
    width: 120px;
    text-align: center;
    margin: 20px auto;
    display: block;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0px center;
    background-size: 16px;
    padding-right: 24px;
    transition: border-color 0.3s ease;
}

.year-select:focus {
    outline: none;
    border-bottom-color: #333;
}

.year-select:hover {
    border-bottom-color: #666;
}

.section-top,
.section-middle,
.section-bottom {
    margin-bottom: 60px;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
}

.section-top h2,
.section-middle h2,
.section-bottom h2 {
    margin-bottom: 20px;
    padding-left: 20px;
    font-size: 1.5rem;
    color: #333;
}

@media (max-width: 768px) {
    .matches-grid {
        grid-template-columns: repeat(2, 1fr);
        margin: 0 20px;
        gap: 15px;
        padding: 20px 0;
    }

    .match-card {
        aspect-ratio: 3/4;
    }

    .nav-btn {
        width: 44px;
        height: 44px;
        font-size: 20px;
    }

    .prev-btn {
        left: 10px;
    }

    .next-btn {
        right: 10px;
    }
    
    .history-flex-container {
        flex-direction: column;
    }
    
    .gallery-grid,
    #gallery-top,
    #gallery-middle,
    #gallery-bottom {
        margin: 0 20px 20px 20px;
        gap: 15px;
        grid-template-columns: repeat(2, 1fr);
    }

    .nav-select {
        display: none;
    }
    
    .year-nav  { 
        display: block;
    }
}

@media (max-width: 480px) {
    .matches-grid {
        grid-template-columns: 1fr;
        margin: 0 15px;
        gap: 20px;
    }

    .match-card {
        aspect-ratio: 4/5;
    }

    .match-card-info {
        padding: 12px;
    }

    .match-date {
        font-size: 0.9rem;
    }

    .nav-btn {
        width: 40px;
        height: 40px;
        background: rgba(0, 0, 0, 0.4);
    }
    
    .gallery-grid,
    #gallery-top,
    #gallery-middle,
    #gallery-bottom {
        grid-template-columns: 1fr;
        gap: 12px;
        margin: 0 20px 20px 20px;
    }
    
    .year-nav  { 
        display: block;
    }
}
