@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #00b4d8;
    --primary-hover: #0077b6;
    --primary-rgb: 0, 180, 216;
    --dark: #0f172a;
    --dark-rgb: 15, 23, 42;
    --light-bg: #f8fafc;
    --card-bg: #ffffff;
    --border: #e2e8f0;
    --text-main: #334155;
    --text-muted: #64748b;
    --font-heading: 'Outfit', 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;
}

/* Global Reset & Base Styles */
body {
    font-family: var(--font-body);
    color: var(--text-main);
    background-color: var(--light-bg);
    overflow-x: hidden;
    scroll-behavior: smooth;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--dark);
    font-weight: 700;
}

/* Navigation - Glassmorphism */
.navbar {
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    position: sticky;
    top: 0;
    z-index: 1050;
    transition: all 0.3s ease;
}

.navbar-brand {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.8rem;
    color: var(--dark) !important;
    display: flex;
    align-items: center;
    margin-right: 8px !important; /* 缩减品牌标志右侧间距，配合商城入口左移 */
}

.navbar-logo {
    height: 38px;
    width: auto;
    margin-right: 12px;
}

@media (max-width: 991px) {
    .navbar-brand {
        font-size: 1.3rem;
    }
    .navbar-logo {
        height: 32px;
    }
    .navbar-toggler {
        padding: 0.22rem 0.45rem;
        font-size: 0.95rem;
        border-color: rgba(212, 175, 55, 0.4);
    }
    .navbar-toggler-icon {
        width: 1.15em;
        height: 1.15em;
        background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='%23d4af37' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E") !important;
    }
    .navbar-toggler:focus {
        box-shadow: 0 0 0 0.25rem rgba(212, 175, 55, 0.25);
    }
    /* 移动端悬浮音乐按钮折叠展开样式 */
    #music-widget {
        padding: 0;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        width: 36px;
        height: 36px;
        overflow: visible;
    }
    #music-widget .music-info {
        display: none;
        width: 0;
        margin-left: 0;
        opacity: 0;
    }
    #music-widget .music-disc {
        flex-shrink: 0; /* 确保不被压缩变形 */
    }
    #music-widget.playing {
        padding: 6px 16px 6px 6px;
        background: rgba(15, 23, 42, 0.9) !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3) !important;
        border-radius: 40px;
        width: auto;
        height: auto;
        overflow: visible;
    }
    #music-widget.playing .music-info {
        display: block;
        width: 120px;
        margin-left: 10px;
        opacity: 1;
    }
}

.nav-link {
    font-weight: 500;
    color: var(--text-main) !important;
    padding: 0.5rem 1rem !important;
    border-radius: 6px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

/* Optimize Spanish navigation labels to prevent wrapping and save horizontal space */
html[lang="es"] .navbar-nav .nav-link {
    font-size: 0.85rem;
    padding: 0.5rem 0.65rem !important;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary) !important;
    background: rgba(0, 180, 216, 0.08);
}

/* Hero Section */
.hero-section {
    position: relative;
    padding: 120px 0 80px 0;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #ffffff;
    min-height: 550px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 80% 20%, rgba(0, 180, 216, 0.15) 0%, transparent 50%);
    pointer-events: none;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    background: linear-gradient(to right, #ffffff, #93c5fd, #00b4d8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.0rem;
    }
}

.hero-text {
    font-size: 1.1rem;
    color: #cbd5e1;
    margin-bottom: 2rem;
    line-height: 1.7;
}

/* Cards & Hover Glows */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 180, 216, 0.1), 0 10px 10px -5px rgba(0, 180, 216, 0.04);
    border-color: rgba(0, 180, 216, 0.4);
}

.product-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-img-wrapper {
    position: relative;
    overflow: hidden;
    background-color: #f1f5f9;
}

.product-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-img {
    transform: scale(1.08);
}

.product-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(4px);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Custom Tabs styling */
.nav-pills-custom {
    gap: 8px;
    margin-bottom: 2rem;
    justify-content: center;
}

.nav-pills-custom .nav-link {
    background: #ffffff;
    color: var(--text-main) !important;
    border: 1px solid var(--border);
    padding: 0.6rem 1.2rem !important;
    font-weight: 600;
    border-radius: 30px;
    transition: all 0.3s ease;
}

.nav-pills-custom .nav-link.active,
.nav-pills-custom .nav-link:hover {
    background: var(--primary) !important;
    color: #ffffff !important;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(0, 180, 216, 0.3);
}

/* Vertical Timeline for Company History */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 40px auto;
    padding: 20px 0;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background-color: var(--border);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
}

@media (max-width: 768px) {
    .timeline::after {
        left: 31px;
    }
}

.timeline-container {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
}

.timeline-container::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    right: -10px;
    background-color: #ffffff;
    border: 4px solid var(--primary);
    top: 15px;
    border-radius: 50%;
    z-index: 1;
    transition: all 0.3s ease;
    box-shadow: 0 0 0 4px rgba(0, 180, 216, 0.15);
}

.timeline-container:hover::after {
    background-color: var(--primary);
    box-shadow: 0 0 0 8px rgba(0, 180, 216, 0.3);
}

.left {
    left: 0;
}

.right {
    left: 50%;
}

.right::after {
    left: -10px;
}

@media (max-width: 768px) {
    .timeline-container {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }
    .timeline-container.right {
        left: 0%;
    }
    .timeline-container.left::after, .timeline-container.right::after {
        left: 21px;
    }
}

.timeline-content {
    padding: 20px;
    background-color: #ffffff;
    position: relative;
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

.timeline-date {
    font-weight: 800;
    color: var(--primary);
    font-size: 1.1rem;
    margin-bottom: 8px;
    display: inline-block;
}

/* Gallery Section */
.gallery-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    height: 300px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    border: none;
}

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.85) 0%, rgba(15, 23, 42, 0.2) 60%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 24px;
    opacity: 0.9;
    transition: all 0.4s ease;
}

.gallery-card:hover .gallery-img {
    transform: scale(1.08);
}

.gallery-card:hover .gallery-overlay {
    opacity: 1;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.9) 0%, rgba(15, 23, 42, 0.4) 100%);
}

.gallery-title {
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.gallery-desc {
    color: #cbd5e1;
    font-size: 0.85rem;
    margin-bottom: 0;
}

/* Modern Chat Interface */
#chat-interface {
    max-width: 900px;
    margin: 0 auto;
}

#chat-interface .card {
    border: 1px solid var(--border);
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.04);
}

.chat-header {
    background: linear-gradient(135deg, var(--dark) 0%, #1e293b 100%);
    color: #ffffff;
    padding: 15px 20px;
    border-radius: 15px 15px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-status {
    display: flex;
    align-items: center;
    font-size: 0.8rem;
    color: #38bdf8;
    font-weight: 500;
}

.status-dot {
    width: 8px;
    height: 8px;
    background-color: #4ade80;
    border-radius: 50%;
    margin-right: 6px;
    display: inline-block;
    box-shadow: 0 0 8px #4ade80;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(74, 222, 128, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}

#chat-history {
    height: 380px;
    overflow-y: auto;
    padding: 20px;
    background: #f8fafc;
    border-bottom: 1px solid var(--border);
}

.chat-bubble-wrapper {
    display: flex;
    margin-bottom: 15px;
    align-items: flex-start;
}

.chat-bubble-wrapper.user {
    justify-content: flex-end;
}

.chat-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--primary);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    margin-right: 10px;
    box-shadow: 0 2px 4px rgba(0, 180, 216, 0.2);
}

.chat-bubble-wrapper.user .chat-avatar {
    margin-right: 0;
    margin-left: 10px;
    background-color: var(--dark);
}

.chat-bubble {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 0.95rem;
    line-height: 1.5;
    position: relative;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.chat-bubble p {
    margin-bottom: 8px;
}
.chat-bubble p:last-child {
    margin-bottom: 0;
}
.chat-bubble ul, .chat-bubble ol {
    margin-bottom: 8px;
    padding-left: 20px;
}
.chat-bubble ul:last-child, .chat-bubble ol:last-child {
    margin-bottom: 0;
}
.chat-bubble li {
    margin-bottom: 4px;
}
.chat-bubble h1, .chat-bubble h2, .chat-bubble h3, .chat-bubble h4, .chat-bubble h5, .chat-bubble h6 {
    font-size: 1.05rem;
    margin-top: 10px;
    margin-bottom: 6px;
    font-weight: 600;
}
.chat-bubble h1:first-child, .chat-bubble h2:first-child, .chat-bubble h3:first-child, .chat-bubble h4:first-child, .chat-bubble h5:first-child, .chat-bubble h6:first-child {
    margin-top: 0;
}

.chat-bubble-wrapper.assistant .chat-bubble {
    background-color: #ffffff;
    color: var(--text-main);
    border: 1px solid var(--border);
    border-top-left-radius: 4px;
}

.chat-bubble-wrapper.user .chat-bubble {
    background: linear-gradient(135deg, var(--primary) 0%, #0077b6 100%);
    color: #ffffff;
    border-top-right-radius: 4px;
    box-shadow: 0 4px 10px rgba(0, 180, 216, 0.2);
}

.chat-bubble-wrapper.system .chat-bubble {
    background-color: #fee2e2;
    color: #991b1b;
    margin: 0 auto;
    border-radius: 10px;
    font-size: 0.85rem;
    text-align: center;
    border: 1px solid #fecaca;
}

/* Music Control Widget */
#music-widget {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 40px;
    padding: 6px 16px 6px 6px;
    display: flex;
    align-items: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#music-widget:hover {
    transform: scale(1.05);
    background: rgba(15, 23, 42, 0.95);
    box-shadow: 0 10px 30px rgba(0, 180, 216, 0.2);
}

.music-disc {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary) 0%, #0077b6 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    cursor: pointer;
    animation: rotate 12s linear infinite;
    animation-play-state: paused;
    box-shadow: 0 0 10px rgba(0, 180, 216, 0.5);
}

.music-disc.playing {
    animation-play-state: running;
}

.music-info {
    margin-left: 10px;
    font-size: 0.8rem;
    color: #ffffff;
    font-weight: 500;
    width: 120px;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
}

.music-info-inner {
    display: inline-block;
    padding-left: 0;
    animation: marquee 10s linear infinite;
    animation-play-state: paused;
}

#music-widget.playing .music-info-inner {
    animation-play-state: running;
}

@keyframes marquee {
    0% {
        transform: translate3d(0, 0, 0);
    }
    100% {
        transform: translate3d(-50%, 0, 0);
    }
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Modals Modernization */
.modal-content {
    border-radius: 20px;
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

.modal-header {
    background: linear-gradient(135deg, var(--dark) 0%, #1e293b 100%);
    color: #ffffff;
    border-bottom: none;
    padding: 20px 24px;
}

.modal-header .btn-close {
    filter: invert(1) grayscale(1) brightness(2);
    opacity: 0.8;
}

.modal-body {
    padding: 24px;
}

.modal-tech-table {
    width: 100%;
    margin-top: 15px;
    border-collapse: collapse;
}

.modal-tech-table th, .modal-tech-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

.modal-tech-table th {
    font-weight: 600;
    color: var(--dark);
    background-color: #f8fafc;
    width: 30%;
}

.section-title-wrapper {
    position: relative;
    margin-bottom: 3rem;
}

.section-title-wrapper h2 {
    font-size: 2.2rem;
    font-weight: 800;
    text-align: center;
}

.section-title-wrapper::after {
    content: '';
    position: absolute;
    width: 60px;
    height: 4px;
    background: var(--primary);
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

.detail-btn {
    background: linear-gradient(135deg, var(--primary) 0%, #0077b6 100%);
    border: none;
    color: #ffffff;
    font-weight: 600;
    padding: 8px 18px;
    border-radius: 30px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 180, 216, 0.2);
}

.detail-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 180, 216, 0.35);
    background: linear-gradient(135deg, #00c4ec 0%, #0088ce 100%);
}

.brand-wrapper {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100px;
    transition: all 0.3s ease;
}

.brand-wrapper:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 180, 216, 0.3);
    box-shadow: 0 10px 20px rgba(0, 180, 216, 0.08);
}

/* Fix header and title text color legibility in modals and chat */
.modal-header .modal-title,
.chat-header h6 {
    color: #ffffff !important;
}

/* Ensure anchor-scrolled sections aren't obscured by the sticky navbar */
section, [id] {
    scroll-margin-top: 90px;
}

/* PJAX Page transitions */
#app-wrapper {
    transition: opacity 0.25s ease-in-out;
    opacity: 1;
}
#app-wrapper.fade-out {
    opacity: 0;
}

/* Footer styles - improved legibility on dark background */
footer.bg-dark h5 {
    color: var(--primary) !important;  /* brand cyan - 品牌主色，醒目易读 */
    font-weight: 700;
    letter-spacing: 0.03em;
    margin-bottom: 0.75rem;
}

footer.bg-dark p.text-muted,
footer.bg-dark .text-muted {
    color: #b0bec5 !important;  /* 中等亮度灰，比 Bootstrap 默认更清晰 */
}

footer.bg-dark a.text-light {
    color: #e0e0e0 !important;
    transition: color 0.2s;
}

footer.bg-dark a.text-light:hover {
    color: var(--primary) !important;
}

/* About page text style optimizations */
.profile-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
}

.profile-title i {
    background: linear-gradient(135deg, var(--primary) 0%, #0077b6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.profile-lead {
    font-size: 1.125rem;
    line-height: 1.8;
    color: #1e293b;
    font-weight: 600;
    margin-bottom: 1.25rem;
    border-left: 4px solid var(--primary);
    padding-left: 1.2rem;
    position: relative;
    background: rgba(0, 180, 216, 0.04);
    padding-top: 0.9rem;
    padding-bottom: 0.9rem;
    padding-right: 1rem;
    border-radius: 0 12px 12px 0;
}

.profile-text {
    font-size: 0.975rem;
    line-height: 1.85;
    color: #475569;
    margin-bottom: 1.75rem;
    text-align: justify;
}

/* Stat section enhancements */
.stat-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.2rem 1rem;
    height: 100%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px -1px rgba(0, 0, 0, 0.01);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 20px -8px rgba(0, 180, 216, 0.15), 0 4px 12px -2px rgba(0, 180, 216, 0.05);
    border-color: rgba(0, 180, 216, 0.4);
}

.stat-number {
    font-size: 1.45rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, #0077b6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.35rem;
    font-family: var(--font-heading);
    white-space: nowrap;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
    display: block;
    line-height: 1.4;
}

/* Mall Button & Language Selector Styles */
.mall-btn {
    background: linear-gradient(135deg, #ff4e50 0%, #f9d423 100%);
    color: #ffffff !important;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    box-shadow: 0 4px 8px rgba(255, 78, 80, 0.25);
    transition: all 0.3s ease;
    border: none;
    line-height: 1.2;
    white-space: nowrap;  /* 强力防止中文或英文文案被迫换行 */
    flex-shrink: 0;       /* 强力防挤压收缩变形 */
}

.mall-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(255, 78, 80, 0.4);
    background: linear-gradient(135deg, #ff6b6b 0%, #fcd93a 100%);
    color: #ffffff !important;
}

.mall-btn i {
    margin-right: 4px;
    font-size: 0.8rem;
}

/* PC端商城按钮与品牌名称之间的外边距微调，实现商城入口左移 */
.navbar .mall-btn.d-md-inline-flex {
    margin-left: 4px !important;
}

.lang-selector-wrapper {
    display: inline-flex;
    align-items: center;
    background: rgba(15, 23, 42, 0.05);
    border: 1px solid rgba(15, 23, 42, 0.08);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.lang-item {
    color: var(--text-muted) !important;
    transition: all 0.2s ease;
    padding: 2px 6px;
    border-radius: 12px;
}

.lang-item:hover {
    color: var(--primary) !important;
}

.lang-item.active {
    background: var(--primary);
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(0, 180, 216, 0.2);
}

.lang-divider {
    color: rgba(15, 23, 42, 0.15);
    margin: 0 2px;
    font-size: 0.75rem;
}


