/* style.css */
/* ===== 全局变量与重置 ===== */
:root {
    /* 中国风配色 */
    --primary-red: #c62f2f;     /* 传统中国红 */
    --golden-yellow: #e8c873;   /* 金 */
    --deep-red: #a52a2a;        /* 深红 */
    --ivory: #f8f3e6;           /* 象牙白 */
    --dark-wood: #4d2e19;       /* 深木色 */
    --light-gold: #f5e7b2;      /* 浅金 */
    --text-dark: #333;          /* 深灰色文字 */
    
    /* 间距系统 */
    --spacing-unit: 8px;
    --container-width: 1200px;
    --header-height: 70px;
    
    /* 圆角 */
    --border-radius: 12px;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Noto Serif SC', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--ivory);
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect width="100" height="100" fill="none" stroke="%23e8c873" stroke-width="0.5" stroke-dasharray="2 2"/></svg>');
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200" viewBox="0 0 200 200"><path d="M20,20 Q40,0 60,20 T100,20 T140,20 T180,20 Q160,40 180,60 T180,100 T180,140 T180,180 Q160,160 140,180 T100,180 T60,180 T20,180 Q40,160 20,140 T20,100 T20,60 Z" fill="none" stroke="%23f5e7b2" stroke-width="0.3" opacity="0.3"/></svg>');
    opacity: 0.15;
    z-index: -1;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 calc(var(--spacing-unit) * 2);
}

.section {
    padding: calc(var(--spacing-unit) * 8) 0;
    position: relative;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: var(--primary-red);
    margin-bottom: calc(var(--spacing-unit) * 6);
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--golden-yellow);
    border-radius: 2px;
}

/* ===== 按钮样式 ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: calc(var(--spacing-unit) * 1.5) calc(var(--spacing-unit) * 4);
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 1rem;
    gap: 8px;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, var(--deep-red), var(--primary-red));
    z-index: -1;
    transition: transform 0.4s ease;
}

.btn:hover::before {
    transform: scale(1.05);
}

.btn-primary {
    background: linear-gradient(45deg, var(--deep-red), var(--primary-red));
    color: var(--ivory);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 1.0);
    
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 1.0);
}

.btn-secondary {
    background: linear-gradient(45deg, var(--dark-wood), #6e4c2b);
    color: var(--ivory);
}

.btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(77, 46, 25, 0.3);
}

/* ===== 导航栏 ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    display: flex;
    align-items: center;
    z-index: 1000;
    background-color: transparent;
    transition: background-color 0.4s ease, box-shadow 0.4s ease;
}

.header.scrolled {
    background-color: rgba(248, 243, 230, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header.scrolled .logo,
.header.scrolled .nav-menu a {
    color: var(--deep-red);
}
.header.scrolled .nav-menu a:hover {
    color: var(--primary-red);
}

.header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--ivory);
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo i {
    color: var(--golden-yellow);
}

.nav-menu {
    display: flex;
    gap: calc(var(--spacing-unit) * 4);
}

.nav-menu a {
    color: var(--ivory);
    font-weight: 500;
    padding: 5px 0;
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--golden-yellow);
    transition: width 0.3s ease;
}

.nav-menu a:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--ivory);
}

.header.scrolled .hamburger {
    color: var(--deep-red);
}

/* ===== 首页横幅 ===== */
.hero {
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--ivory);
    background: linear-gradient(45deg, var(--deep-red), var(--primary-red));
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 10% 20%, rgba(232, 200, 115, 0.15) 0%, transparent 15%),
        radial-gradient(circle at 90% 80%, rgba(232, 200, 115, 0.15) 0%, transparent 15%);
}

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

.hero-content h1 {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: var(--spacing-unit);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    letter-spacing: 2px;
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: calc(var(--spacing-unit) * 4);
    font-weight: 300;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.mahjong-tiles {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
}

.tile {
    position: absolute;
    font-size: 3rem;
    opacity: 0.3;
    animation: float 15s infinite linear;
}

.tile:nth-child(1) { top: 10%; left: 15%; animation-delay: 0s; }
.tile:nth-child(2) { top: 70%; left: 80%; animation-delay: -3s; }
.tile:nth-child(3) { top: 40%; left: 5%; animation-delay: -6s; }
.tile:nth-child(4) { top: 20%; left: 85%; animation-delay: -9s; }
.tile:nth-child(5) { top: 75%; left: 20%; animation-delay: -12s; }

@keyframes float {
    0% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-30px) rotate(10deg); }
    50% { transform: translateY(0) rotate(0deg); }
    75% { transform: translateY(30px) rotate(-10deg); }
    100% { transform: translateY(0) rotate(0deg); }
}

/* ===== 游戏玩法展示 ===== */
.gameplay {
    background-color: var(--ivory);
}

.gameplay-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: calc(var(--spacing-unit) * 4);
}

.game-card {
    background-color: var(--ivory);
    border-radius: var(--border-radius);
    padding: calc(var(--spacing-unit) * 3);
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid var(--golden-yellow);
    position: relative;
    overflow: hidden;
}

.game-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--primary-red);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.game-card:hover::before {
    transform: scaleX(1);
}

.game-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(198, 47, 47, 0.15);
}

.game-card i {
    font-size: 3rem;
    color: var(--primary-red);
    margin-bottom: calc(var(--spacing-unit) * 2);
    transition: transform 0.3s ease;
}

.game-card:hover i {
    transform: scale(1.1);
}

.game-card h3 {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-unit);
    color: var(--text-dark);
}

.game-card p {
    font-size: 0.9rem;
    color: #666;
}

/* ===== 游戏特色 ===== */
.features {
    background-color: var(--ivory);
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect width="100" height="100" fill="none" stroke="%23e8c873" stroke-width="0.3" stroke-dasharray="4 2" opacity="0.2"/></svg>');
}
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: calc(var(--spacing-unit) * 4);
}
.feature-item {
    text-align: center;
    background: white;
    padding: calc(var(--spacing-unit) * 4);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}
.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}
.feature-item i {
    font-size: 3rem;
    color: var(--golden-yellow);
    margin-bottom: calc(var(--spacing-unit) * 2);
    background: linear-gradient(45deg, var(--deep-red), var(--primary-red));
    -webkit-background-clip: padding-box; /* 兼容WebKit内核浏览器 */
    -moz-background-clip: padding-box;    /* 兼容Firefox */
    background-clip: padding-box;          /* 标准写法 */
    -webkit-text-fill-color: transparent;
}
.feature-item h3 {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-unit);
    color: var(--primary-red);
}
.feature-item p {
    color: #555;
}

/* ===== 联系我们 ===== */
.contact {
    background-color: var(--ivory);
    position: relative;
}

.contact::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200" viewBox="0 0 200 200"><path d="M20,100 Q100,20 180,100 Q100,180 20,100 Z" fill="none" stroke="%23f5e7b2" stroke-width="0.5" opacity="0.2"/></svg>');
    opacity: 0.1;
    z-index: 0;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: calc(var(--spacing-unit) * 6);
    background: white;
    padding: calc(var(--spacing-unit) * 6);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 1;
    border: 1px solid var(--golden-yellow);
}

.contact-info h3 {
    font-size: 1.8rem;
    color: var(--primary-red);
    margin-bottom: calc(var(--spacing-unit) * 2);
}
.contact-info p {
    margin-bottom: calc(var(--spacing-unit) * 3);
    color: #555;
}
.contact-info ul li {
    display: flex;
    align-items: center;
    margin-bottom: calc(var(--spacing-unit) * 2);
}
.contact-info ul i {
    font-size: 1.2rem;
    color: var(--primary-red);
    margin-right: calc(var(--spacing-unit) * 2);
    width: 20px;
}

.contact-form .form-group {
    margin-bottom: calc(var(--spacing-unit) * 2);
}

.contact-form input, 
.contact-form textarea {
    width: 100%;
    padding: calc(var(--spacing-unit) * 1.5);
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--ivory);
}

.contact-form input:focus, 
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px rgba(198, 47, 47, 0.2);
}

/* ===== 页脚 ===== */
.footer {
    background: linear-gradient(to bottom, var(--dark-wood), #3a2414);
    color: var(--ivory);
    padding: calc(var(--spacing-unit) * 6) 0 0;
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="100" viewBox="0 0 200 100"><path d="M0,20 Q100,40 200,20 L200,100 L0,100 Z" fill="%23e8c873" opacity="0.1"/></svg>');
    background-size: cover;
    background-position: top;
    opacity: 0.1;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: calc(var(--spacing-unit) * 4);
    padding-bottom: calc(var(--spacing-unit) * 4);
    position: relative;
    z-index: 1;
}

.footer-col h4 {
    color: var(--golden-yellow);
    font-size: 1.2rem;
    margin-bottom: calc(var(--spacing-unit) * 2);
    position: relative;
    padding-bottom: 8px;
}

.footer-col h4::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--primary-red);
}

.footer-col p {
    font-size: 0.9rem;
    line-height: 1.7;
    color: #ddd;
}

.footer-col ul li {
    margin-bottom: var(--spacing-unit);
}

.footer-col a {
    display: inline-block;
    transition: all 0.3s ease;
    color: #ddd;
}

.footer-col a:hover {
    color: var(--golden-yellow);
    transform: translateX(5px);
}

.footer-bottom {
    border-top: 1px solid rgba(232, 200, 115, 0.2);
    padding: calc(var(--spacing-unit) * 2) 0;
    text-align: center;
    font-size: 0.85rem;
    position: relative;
    z-index: 1;
}
.footer-bottom p {
    margin: 5px 0;
    color: #aaa;
}
.footer-bottom a {
    color: var(--golden-yellow);
}

/* ===== 玩法详情弹窗 ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.3s ease;
}
.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    margin: auto;
    padding: calc(var(--spacing-unit) * 4);
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 600px;
    position: relative;
    box-shadow: 0 5px 25px rgba(0,0,0,0.3);
    animation: slideIn 0.4s ease;
    border-top: 5px solid var(--primary-red);
}
.modal-content h3 {
    color: var(--primary-red);
    margin-bottom: calc(var(--spacing-unit) * 2);
    text-align: center;
    font-size: 2rem;
}
.modal-content img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: calc(var(--spacing-unit) * 2);
    border: 1px solid var(--golden-yellow);
}

.close-button {
    color: #aaa;
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}
.close-button:hover, 
.close-button:focus {
    color: var(--primary-red);
}

@keyframes fadeIn { 
    from { opacity: 0; } 
    to { opacity: 1; } 
}

@keyframes slideIn { 
    from { transform: translateY(-50px); opacity: 0; } 
    to { transform: translateY(0); opacity: 1; } 
}

/* ===== 实时通知系统 ===== */
#notification-container {
    position: fixed;
    top: calc(var(--header-height) + 20px);
    right: 20px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.notification {
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
    opacity: 0;
    transform: translateX(100%);
    animation: slideInNotification 0.5s forwards;
    display: flex;
    align-items: center;
    gap: 10px;
}
.notification.success { 
    background: linear-gradient(45deg, #2e7d32, #4caf50);
    border-left: 4px solid #1b5e20;
}
.notification.error { 
    background: linear-gradient(45deg, var(--deep-red), var(--primary-red));
    border-left: 4px solid #8b0000;
}

@keyframes slideInNotification {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===== 响应式设计 ===== */
@media (max-width: 992px) {
    .hero-content h1 {
        font-size: 3rem;
    }
    
    .contact-wrapper {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: var(--header-height);
        right: -100%;
        flex-direction: column;
        background: var(--ivory);
        width: 80%;
        height: calc(100vh - var(--header-height));
        padding: 20px;
        transition: right 0.3s ease;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-menu a {
        color: var(--deep-red);
        padding: 15px 0;
        font-size: 1.2rem;
    }
    
    .hamburger {
        display: block;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 576px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .section {
        padding: calc(var(--spacing-unit) * 5) 0;
    }
}

/* 隐私政策页面特定样式 */
.privacy-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    margin-top: calc(var(--header-height) + 40px);
    margin-bottom: 40px;
    border: 1px solid var(--golden-yellow);
}

.privacy-container h1 {
    color: var(--primary-red);
    text-align: center;
    margin-bottom: 30px;
    font-size: 2.5rem;
}

.privacy-container h2 {
    color: var(--deep-red);
    margin-top: 30px;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--golden-yellow);
}

.privacy-container p, .privacy-container li {
    line-height: 1.8;
    margin-bottom: 15px;
    color: #444;
}

.privacy-container ul {
    padding-left: 25px;
}

.privacy-container li {
    margin-bottom: 10px;
}

.privacy-container .health-warning {
    background-color: var(--ivory);
    padding: 20px;
    border-left: 4px solid var(--primary-red);
    margin-bottom: 30px;
    font-weight: 500;
    font-size: 1.1rem;
}