@font-face {
    font-family: 'SmileySans';
    src: url('./SmileySans-subset.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

:root {
    --color-brand: #b19360;
    --font-sans: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Helvetica, Segoe UI, Arial, Roboto, 'PingFang SC', 'miui', 'Hiragino Sans GB', 'Microsoft Yahei', sans-serif;
    --font-smiley: 'SmileySans', var(--font-sans);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    overflow-x: hidden;
}

/* 第一屏 */
.hero {
    height: 100vh;
    width: 100vw;
    position: relative;
    background: url('../images/bg-lemidu.jpg') no-repeat center center;
    background-size: cover;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 60px;
    color: white;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* background-color: #514D4D; */
    /* opacity: 0.65; */
    z-index: 1;
}

.hero > * {
    position: relative;
    z-index: 2;
}

.hero-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hero-logo {
    font-family: var(--font-smiley);
    font-size: 32px;
    width: 120px;
    height: auto;
}

.hero-logo:hover {
    color: var(--color-brand);
}

.hero-nav a {
    color: white;
    text-decoration: none;
    font-size: 20px;
    font-family: var(--font-smiley);
    transition: color 0.3s ease;
}

.hero-nav a:hover {
    color: var(--color-brand);
}

.hero-footer {
    font-family: var(--font-smiley);
    font-size: 42px;
    line-height: 1.2;
}

.hero-footer .brand-text {
    color: var(--color-brand);
}

/* 第二屏 */
.about {
    height: 100vh;
    width: 100vw;
    background-color: white;
    padding: 100px 60px;
    display: flex;
    flex-direction: column;
}

.about-title {
    color: var(--color-brand);
    font-size: 42px;
    font-family: var(--font-smiley);
    margin-bottom: 40px;
}

.about-content {
    font-size: 21px;
    color: black;
    line-height: 1.6;
}

.about-content h3 {
    color: #555555;
}

.about-content p {
    margin-bottom: 20px;
    font-size: 16px;
    color: #aaaaaa;
    line-height: 1.8;
}

.about-content-item {
    font-family: var(--font-smiley);
}

.product-list {
    display: flex;
    gap: 40px;
    margin-top: 60px;
    flex-wrap: wrap;
}

.product-card-wrapper {
    width: 400px;
    height: 400px;
    perspective: 1000px;
}

.product-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: left;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.product-card-wrapper:hover .product-card-inner {
    transform: rotateY(180deg);
}

.product-card-front, .product-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 24px;
}

.product-card-front {
    background-color: #bbb;
    color: black;
}

.product-card-front img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 24px;
}

.product-card-back {
    background-color: white;
    transform: rotateY(180deg);
    border: 3px solid #F0F0F0;
    padding: 32px;
    display: flex;
    flex-direction: column;
}

/* 覆盖之前的 .product-card 样式，因为现在结构变了 */
.product-card {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.product-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.product-logo {
    width: 64px;
    height: 64px;
    border-radius: 24px;
    object-fit: cover;
}

.product-name {
    font-size: 22px;
    color: #000;
    font-weight: bold;
}

.product-desc {
    font-size: 18px;
    color: #66686F;
    line-height: 1.6;
}

.product-link {
    position: absolute;
    bottom: 32px;
    right: 32px;
    font-size: 18px;
    color: var(--color-brand);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
}

.icon-arrow {
    width: 0;
    height: 18px;
    opacity: 0;
    transition: width 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
}

.product-card:hover .icon-arrow {
    width: 18px;
    opacity: 1;
    transform: translate(2px, -2px);
}

/* Footer */
.footer {
    background-color: #161616;
    height: 400px;
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: white;
    position: relative;
}

.footer-top {
    display: flex;
    flex-direction: column;
}

.contact-label {
    font-size: 14px;
    font-weight: bold;
    color: #747474;
    margin-bottom: 8px;
    font-family: var(--font-smiley);
}

.contact-email {
    font-size: 14px;
    font-weight: normal;
    color: #FFFFFF;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-email:hover {
    color: var(--color-brand);
}

.footer-bottom {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    width: 100%;
    min-height: 60px;
}

.footer-text-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.copyright {
    font-size: 14px;
    font-weight: normal;
    transition: color 0.3s ease;
    cursor: default;
}

.copyright:hover {
    color: var(--color-brand);
}

.icp-link {
    font-size: 10px;
    font-weight: 300;
    color: #FFFFFF;
    text-decoration: none;
}

.legal-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.security-icon {
  width: 14px;
  height: 14px;
  object-fit: contain;
}

.footer-logo-container {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
}

.footer-logo {
    width: 60px;
    height: 60px;
    background-image: url('../images/logo-small-white.png');
    background-size: contain;
    background-repeat: no-repeat;
    transition: background-image 0.3s ease;
}

.footer-logo:hover {
    background-image: url('../images/logo-small-brand.png');
}

/* 响应式优化 */
@media (min-width: 1440px) {
    .hero, .about, .footer {
        padding-left: calc((100vw - 1200px) / 2);
        padding-right: calc((100vw - 1200px) / 2);
    }
}

@media (max-width: 1024px) {
    .about {
        height: auto;
        min-height: 100vh;
    }
    .product-list {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .hero, .about, .footer {
        padding: 30px;
    }
    .hero-footer {
        font-size: 32px;
    }
    .about-title {
        font-size: 32px;
    }
    .about-content {
        font-size: 18px;
    }
    .product-card-wrapper {
        width: 100%;
        height: 0;
        padding-bottom: 100%; /* 强制保持 1:1 比例 */
        position: relative;
    }
    .product-card-inner {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    display: flex;
}

.modal-card {
    background-color: white;
    padding: 40px;
    border-radius: 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 24px;
    background: none;
    border: none;
    font-size: 32px;
    cursor: pointer;
    color: #999;
}

.modal-qrcode {
    width: 240px;
    height: 240px;
    margin-bottom: 24px;
}

.modal-text {
    font-size: 20px;
    color: #333;
    font-family: var(--font-smiley);
}
