:root {
    --primary-red: #9B1B1E;
    --accent-gold: #C6A361;
    --bg-cream: #F8F4F0;
    --text-black: #1A1A1A;
    --text-gray: #4A4A4A;
    --ink-black: #0F1112;
    --transition-smooth: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Noto Serif SC', serif;
}

body {
    background-color: var(--bg-cream);
    color: var(--text-black);
    line-height: 1.8;
    overflow-x: hidden;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(155, 27, 30, 0.02) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(198, 163, 97, 0.03) 0%, transparent 50%);
}

.cursor-follower {
    position: fixed;
    width: 20px;
    height: 20px;
    background: var(--primary-red);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.3;
    transition: transform 0.1s ease;
    mix-blend-mode: multiply;
}

nav {
    position: fixed;
    top: 0;
    width: 100%;
    height: 100px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    z-index: 1000;
    transition: var(--transition-smooth);
}

nav.scrolled {
    height: 80px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.logo {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 2.2rem;
    color: var(--primary-red);
    letter-spacing: 4px;
    text-decoration: none;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 40px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-black);
    font-weight: 500;
    font-size: 1rem;
    transition: var(--transition-smooth);
    position: relative;
    padding: 5px 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 1px;
    background: var(--primary-red);
    transition: var(--transition-smooth);
    transform: translateX(-50%);
}

.nav-links a:hover, .nav-links a.active {
    color: var(--primary-red);
}

.nav-links a:hover::after, .nav-links a.active::after {
    width: 100%;
}

.lang-toggle-btn {
    background: transparent;
    border: 1px solid var(--primary-red);
    color: var(--primary-red);
    padding: 5px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition-smooth);
    margin-left: 20px;
    font-weight: 500;
}

.lang-dropdown {
    position: relative;
    display: inline-block;
    margin-left: 20px;
}

.lang-dropbtn {
    background: transparent;
    border: 1px solid var(--primary-red);
    color: var(--primary-red);
    padding: 6px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-smooth);
}

.lang-dropbtn:hover {
    background: var(--primary-red);
    color: white;
}

.lang-dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 100%; /* Position right below the button */
    background-color: white;
    min-width: 120px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.1);
    z-index: 1001;
    border-radius: 4px;
    overflow: hidden;
    padding-top: 10px; /* Bridge the gap visually but maintain hover */
    background-clip: content-box; /* Ensures background doesn't show under padding gap */
}

/* Add a pseudo-element to create a hover bridge */
.lang-dropdown-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 10px; /* Same as padding-top to bridge the gap */
}

.lang-dropdown-content a {
    background-color: white; /* Individual item background */
    color: var(--text-black);
    padding: 10px 15px;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
    transition: 0.3s;
}

.lang-dropdown-content a:hover {
    background-color: var(--bg-cream);
    color: var(--primary-red);
}

.lang-dropdown:hover .lang-dropdown-content {
    display: block;
}

.section-header {
    padding: 120px 10% 60px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
}

.title-group h2 {
    font-size: 3.5rem;
    color: var(--text-black);
    line-height: 1;
}

.title-group p {
    color: var(--primary-red);
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 1.8rem;
    margin-top: 10px;
}

footer {
    background: var(--ink-black);
    color: white;
    padding: 100px 10%;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 50px;
}

@keyframes fadeInOut {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reveal-up {
    opacity: 0;
    transform: translateY(60px);
    transition: 1.2s cubic-bezier(0.23, 1, 0.32, 1);
}

.reveal-up.active {
    opacity: 1;
    transform: translateY(0);
}

.ai-trigger {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 110px;
    height: 110px;
    z-index: 3000;
    cursor: pointer;
    transition: var(--transition-smooth);
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.2));
}

.ai-trigger img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    animation: float 3s ease-in-out infinite;
}

.ai-trigger:hover {
    transform: scale(1.1) rotate(5deg);
}

.ai-trigger::after {
    content: attr(data-tooltip);
    position: absolute;
    left: -100px;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    opacity: 0;
    transition: 0.3s;
    white-space: nowrap;
    pointer-events: none;
}

.ai-trigger:hover::after {
    opacity: 1;
    left: -110px;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.ai-chat-window {
    position: fixed;
    bottom: 120px;
    right: 30px;
    width: 380px;
    height: 550px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
    z-index: 3001;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(20px) scale(0.9);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.ai-chat-window.active {
    transform: translateY(0) scale(1);
    opacity: 1;
    visibility: visible;
}

.ai-chat-header {
    background: var(--primary-red);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ai-chat-header h3 {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 1.5rem;
    letter-spacing: 2px;
}

.ai-chat-close {
    cursor: pointer;
    font-size: 1.5rem;
    opacity: 0.8;
}

.ai-chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #fdfcfb;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.msg {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.msg.ai {
    background: white;
    align-self: flex-start;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border-bottom-left-radius: 2px;
}

.msg.user {
    background: var(--primary-red);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}

.ai-chat-input {
    padding: 20px;
    background: white;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
}

.ai-chat-input input {
    flex: 1;
    border: 1px solid #ddd;
    padding: 10px 15px;
    border-radius: 20px;
    outline: none;
    transition: 0.3s;
}

.ai-chat-input input:focus {
    border-color: var(--primary-red);
}

.ai-chat-input button {
    background: var(--primary-red);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: 0.3s;
}

.ai-chat-input button:hover {
    transform: rotate(-10deg) scale(1.1);
}

@media (max-width: 768px) {
    .hero h1 { font-size: 3rem; }
    .nav-links { display: none; }
}

/* 全局水印 */
body::before {
    content: "";
    position: fixed;
    top: 15%; /* 屏幕中间上方区域 */
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 300px;
    background-image: url('../%E5%8A%A0%E6%8B%BF%E5%A4%A7%E6%97%A5%E6%9C%AC/%E6%B0%B4%E5%8D%B0.jpg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.08; /* 设置透明度，使其看起来像水印 */
    z-index: -1; /* 层级在最下方 */
    pointer-events: none; /* 不干扰点击 */
}
