@font-face {
    font-family: 'AlimamaShuHeiTi-Bold';
    src: url('font/AlimamaShuHeiTi-Bold.woff') format('woff');
}

@font-face {
    font-family: 'NotoSansSC';
    src: url('font/NotoSansSC-min.ttf') format('truetype');
}

@font-face {
    font-family: 'SourceHanSerifCN-Regular';
    src: url('font/SourceHanSerifCN-Regular.otf') format('opentype');
}

body {
    font-family: 'AlimamaShuHeiTi-Bold', 'NotoSansSC', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: #E1E3E9;
    color: #2D1846;
    text-align: center;
    margin: 0;
    border: 16px solid #B23132;
}

.navbar {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #E1E3E9;
    padding: 1rem;
    border-bottom: 2px solid #2A1C45;
}

.menu-toggle {
    display: none;
}

.nav-links a {
    color: #2D1846;
    text-decoration: none;
    font-size: 1.2rem;
    margin: 0 1rem;
}

h1 a {
    text-decoration: none;
}

h1 a:hover {
    text-decoration: none;
}

.nav-links a:hover {
    color: #E1E3E9;
}

.back-link-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px auto;
    width: 100%;
}

.back-link {
    color: #2D1846;
    text-decoration: none;
    font-size: 1.1rem;
    padding: 8px 16px;
    border: 1px solid #2D1846;
    border-radius: 4px;
    background-color: #E1E3E9;
    transition: all 0.3s ease;
}

.back-link:hover {
    color: #E1E3E9;
    background-color: #2D1846;
    text-decoration: none;
}

.search-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px auto;
    width: 100%;
}


#search-input {
    width: 200px; /* Reduced width */
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.scrolling-text-container {
    overflow: hidden;
    white-space: nowrap;
    padding: 1rem 0;
    border-top: 2px solid #2A1C45;
    border-bottom: 2px solid #2A1C45;
}

.scrolling-text-container[data-animated="true"] {
    -webkit-mask: linear-gradient(90deg, transparent, white 10%, white 90%, transparent);
    mask: linear-gradient(90deg, transparent, white 10%, white 90%, transparent);
}

.scrolling-text-container[data-animated="true"] .scrolling-text {
    width: max-content;
    flex-wrap: nowrap;
    animation: scroll-left 20s linear infinite;

}

.scrolling-text span {
    font-size: 1.5rem;
    margin: 0 2rem;
}

@keyframes scroll-left {
    0% {
        transform: translateX(0%);
    }
    100% {
        transform: translateX(-50%);
    }
}
.blog-container {
    padding: 2rem 1rem;
}

.blog-container h1 {
    margin-bottom: 0.5rem;
}

.blog-container p {
    margin-top: 0;
    margin-bottom: 1rem;
}

#posts-list h2 a {
    color: #2A1C45;
    text-decoration: none;
}

#posts-list h2 a:hover {
    color: #B23132;
}

#post-content {
    text-align: left;
    padding: 2rem;
    max-width: 800px;
    margin: 0 auto;
    font-family: 'SourceHanSerifCN-Regular', 'Source Han Serif CN', 'Noto Serif SC', serif;
}

#post-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1rem auto;
    position: relative;
    z-index: 1;
}

.product img {
    max-width: 100%;
    height: auto;
}

.hidden {
    display: none;
}

.hero {
    padding: 2rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-logo {
    margin-bottom: 1rem;
    text-align: center;
}

.hero-logo .logo {
    max-width: 400px;
    height: auto;
}

@media (max-width: 768px) {
    .hero-logo .logo {
        max-width: 220px;
    }
}

.mission-image-container {
    width: 37.5%;
    height: 0;
    padding-bottom: 22.98%; /* 调整比例以匹配37.5%宽度 */
    position: relative;
    overflow: hidden;
    margin: 1rem auto 2rem auto;
    border-radius: 12px;
}

.mission-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    text-align: center;
}

.hero-content p {
    font-size: 1.2rem;
    margin: 1rem 0;
}

.hero-content .cta-button {
    display: inline-block;
    background-color: #B23132;
    color: #fff;
    padding: 1rem 2rem;
    text-decoration: none;
    font-weight: bold;
    margin-top: 2rem;
    border-radius: 5px;
}



.hero-content p {
    font-size: 1.2rem;
    margin: 1rem 0;
}

.hero-content .cta-button {
    display: inline-block;
    background-color: #B23132;
    color: #fff;
    padding: 1rem 2rem;
    text-decoration: none;
    font-weight: bold;
    margin-top: 2rem;
    border-radius: 5px;
}

.awards {
    padding: 2rem 1rem;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding: 4rem 1rem;
}

.product {
    border: 2px solid #2A1C45;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.product h2 {
    font-size: 1.5rem;
    color: #2A1C45;
    text-align: center;
    margin-bottom: 1rem;
}

.description-text {
    font-size: 1.2rem;
    line-height: 1.5rem;
    color: #2d2a2a;
    text-align: left;
    padding: 10px;
    background-color: #f9f9f9;
    border-left: 4px solid #B23132;
    border-radius: 4px;
    display: flex;
    align-items: center;
    max-height: 150px;
    min-height: 10px;
    font-weight: normal;
}

.product h3 {
    font-size: 1.5rem;
}

.product .price {
    font-size: 1.2rem;
    font-weight: bold;
}

.red-text {
    color: #CA202F;
    font-weight: bold;
}

.blue-text {
    color: #2752A2;
    font-weight: bold;
}

.yellow-text {
    color: #EEAF1B;
    font-weight: bold;
}

.grid-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
    min-height: 400px;
}

.grid-item {
    position: relative;
    overflow: hidden;
    border-radius: 0;
    transition: all 0.3s ease;
    will-change: transform;
    border: 0px solid transparent;
}

.grid-item:hover {
    transition: all 0.3s ease;
}

.grid-image-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    position: relative;
}

.grid-image-link img {
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: all 0.4s ease;
    border-radius: 8px;
}

.grid-item:hover img {
    transform: scale(0.95);
    filter: brightness(0.7);
}

.image-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: rgb(33, 33, 33);
    font-size: 1.5rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 
        -1px -1px 0 #fff,
        1px -1px 0 #fff,
        -1px 1px 0 #fff,
        1px 1px 0 #fff;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
    text-align: center;
}

.grid-item:hover .image-text.red-text {
    color: #CA202F;
}

.grid-item:hover .image-text.blue-text {
    color: #2752A2;
}

.grid-item:hover .image-text.yellow-text {
    color: #EEAF1B;
}

.grid-item:hover .image-text {
    opacity: 1;
}

.grid-item:hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1;
    border-radius: 8px;
}

/* 响应式布局 */
@media (max-width: 768px) {
    body {
        border-width: 8px;
        font-size: 14px;
    }
    
    .navbar {
        flex-direction: row;
        justify-content: space-between;
        padding: 0.5rem 1rem;
        position: relative;
    }
    
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: #E1E3E9;
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
        padding: 1rem;
        border-top: 2px solid #2A1C45;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        z-index: 1000;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-links a {
        font-size: 1rem;
        margin: 0.25rem 0;
        padding: 0.75rem 1rem;
        background-color: rgba(255, 255, 255, 0.2);
        border-radius: 4px;
        width: 90%;
        text-align: center;
        border: 1px solid rgba(42, 28, 69, 0.1);
    }
    
    .menu-toggle {
        display: block;
        background: none;
        border: 2px solid #2A1C45;
        border-radius: 4px;
        padding: 0.5rem 1rem;
        color: #2D1846;
        font-size: 1rem;
        cursor: pointer;
        font-family: inherit;
    }
    
    .hero {
        padding: 1rem 0;
    }

    .hero-logo {
        margin-bottom: 1rem;
    }

    .hero-logo .logo {
        max-width: 150px;
    }

    .mission-image-container {
        width: 40%;
        padding-bottom: 24.51%;
        margin: 0.5rem auto 1rem auto;
        border-radius: 8px;
    }

    .hero-content p {
        font-size: 1rem;
        margin: 0.5rem 0;
    }

    .hero-content .cta-button {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
        margin-top: 1rem;
    }
    
    .grid-container {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(4, 1fr);
        gap: 15px;
        padding: 15px 10px;
        min-height: auto;
    }
    
    .grid-item {
        aspect-ratio: 16/9;
    }
    
    .image-text {
        font-size: 1.2rem;
        letter-spacing: 1px;
    }
    
    .product-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 2rem 1rem;
    }
    
    .product {
        padding: 1rem;
    }
    
    .product h2 {
        font-size: 1.2rem;
    }
    
    .description-text {
        font-size: 1rem;
        line-height: 1.4rem;
        padding: 8px;
        max-height: none;
    }
    
    .scrolling-text-container {
        padding: 0.5rem 0;
    }
    
    .scrolling-text span {
        font-size: 1.1rem;
        margin: 0 1rem;
    }
    
    .search-container {
        margin: 10px auto;
    }
    
    #search-input {
        width: 150px;
        padding: 6px;
        font-size: 0.9rem;
    }
    
    .blog-container {
        padding: 1rem 0.5rem;
    }
    
    #post-content {
        padding: 1rem;
        font-size: 0.9rem;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    h2 {
        font-size: 1.3rem;
    }
    
    h3 {
        font-size: 1.1rem;
    }
}

/* Logo Animation & Glitch Effect */
.logo-wrapper {
    position: relative;
    display: inline-block;
}

.triangle-float {
    position: absolute;
    width: 40px;
    height: 40px;
    background-color: #B23132;
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%, 50% 0%, 50% 25%, 80% 85%, 20% 85%, 50% 25%);
    opacity: 0;
    z-index: 100;
    pointer-events: none;
}

.triangle-float.t1 {
    top: -40px;
    left: 5%;
    background-color: #2A1C45;
    animation: float-1 6s ease-in-out infinite, fade-random-1 5s ease-in-out infinite;
}

.triangle-float.t2 {
    bottom: 10%;
    right: -30px;
    animation: float-2 7s ease-in-out infinite, fade-random-2 4s ease-in-out infinite;
    transform: rotate(45deg);
}

.triangle-float.t3 {
    top: 60%;
    left: -40px;
    background-color: #2752A2;
    animation: float-3 8s ease-in-out infinite, fade-random-3 6s ease-in-out infinite;
    transform: rotate(-30deg);
}

@keyframes float-1 {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-40px) rotate(20deg); }
}

@keyframes float-2 {
    0%, 100% { transform: translate(0, 0) rotate(45deg); }
    50% { transform: translate(-30px, 30px) rotate(90deg); }
}

@keyframes float-3 {
    0%, 100% { transform: translate(0, 0) rotate(-30deg); }
    50% { transform: translate(40px, -40px) rotate(10deg); }
}

@keyframes fade-random-1 {
    0%, 100% { opacity: 0; }
    20%, 80% { opacity: 0.8; }
}

@keyframes fade-random-2 {
    0%, 100% { opacity: 0; }
    30%, 70% { opacity: 0.9; }
}

@keyframes fade-random-3 {
    0%, 100% { opacity: 0; }
    40%, 60% { opacity: 0.7; }
}

.glitch-effect {
    animation: glitch-anim 4s infinite;
    position: relative;
    filter: contrast(1.2) brightness(1.1);
}

@keyframes glitch-anim {
    0% { transform: translate(0); opacity: 1; filter: contrast(1.2) brightness(1.1); }
    2% { transform: translate(-2px, 1px); filter: hue-rotate(90deg) contrast(1.4); opacity: 0.95; }
    4% { transform: translate(2px, -1px); filter: hue-rotate(-90deg) contrast(1.5) brightness(1.3); opacity: 1; }
    5% { transform: translate(0); opacity: 1; filter: none; }
    10% { transform: skewX(-5deg); filter: grayscale(0.5); }
    11% { transform: skewX(0); filter: none; }
    50% { opacity: 1; transform: scale(1); }
    51% { opacity: 0.7; transform: scale(1.02) translateY(2px); filter: sepia(0.5); }
    52% { opacity: 1; transform: scale(1); filter: none; }
    60% { filter: brightness(1.5) blur(1px); }
    61% { filter: none; }
    94% { transform: translate(0); }
    96% { transform: translate(1px, 1px); filter: invert(0.1); opacity: 0.8; }
    98% { transform: translate(-1px, -1px); filter: none; opacity: 1; }
    100% { transform: translate(0); }
}

/* Video Archives */
.video-archives {
    padding: 2rem 1rem;
    background-color: #E1E3E9;
    /* Borders removed as requested */
    margin: 2rem 0;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    max-width: 1400px;
    margin: 2rem auto 0;
}

.video-item {
    position: relative;
    border: 3px solid #2A1C45;
    background: #000;
    overflow: hidden;
    box-shadow: 4px 4px 0px rgba(42, 28, 69, 0.3);
}

.video-item video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.video-item:hover video {
    opacity: 1;
}

.video-overlay {
    position: absolute;
    top: 10px;
    left: 10px;
    color: #FF0000;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    font-size: 0.9rem;
    text-shadow: 1px 1px 0 #000;
    pointer-events: none;
    animation: blink-text 2s infinite;
}

@keyframes blink-text {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

@media (max-width: 768px) {
    .video-grid {
        grid-template-columns: 1fr;
    }
}
