/* ========================================
   CSS Variables - 吉林非遗文化之旅
   ======================================== */
:root {
    --primary-red: #c41e3a;
    --primary-gold: #d4a853;
    --secondary-brown: #8b4513;
    --accent-blue: #1e3a5f;
    --bg-cream: #f5f0e8;
    --bg-light: #fffef9;
    --text-dark: #2d2d2d;
    --text-light: #6b6b6b;
    --border-gold: #c9a86c;
    --shadow-color: rgba(139, 69, 19, 0.15);
    --gradient-red: linear-gradient(135deg, #c41e3a, #8b0000);
    --gradient-gold: linear-gradient(135deg, #d4a853, #b8860b);
    --max-width: 1200px;
}

/* ========================================
   Base Styles
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
    background: linear-gradient(145deg, #e8e0d5 0%, #d4c9b9 100%);
    min-height: 100vh;
    color: var(--text-dark);
    line-height: 1.6;
}

a {
    color: var(--primary-red);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ========================================
   Header
   ======================================== */
.main-header {
    background: var(--gradient-red);
    color: white;
    padding: 30px 20px;
    text-align: center;
    box-shadow: 0 4px 20px var(--shadow-color);
}

.header-content {
    max-width: var(--max-width);
    margin: 0 auto;
}

.site-title {
    font-family: "Noto Serif SC", serif;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.site-subtitle {
    font-size: 1rem;
    opacity: 0.9;
}

/* ========================================
   Navigation
   ======================================== */
.main-nav {
    background: var(--bg-light);
    border-bottom: 2px solid var(--border-gold);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px var(--shadow-color);
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px;
    padding: 10px 20px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    background: transparent;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    color: var(--text-dark);
}

.nav-item:hover {
    background: rgba(196, 30, 58, 0.1);
}

.nav-item.active {
    background: var(--primary-red);
    color: white;
}

.nav-icon {
    font-size: 18px;
}

/* ========================================
   Main Content
   ======================================== */
.main-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 20px;
    min-height: calc(100vh - 200px);
}

.page {
    display: none;
    animation: fadeIn 0.3s ease;
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========================================
   Page Headers
   ======================================== */
.page-header {
    background: var(--gradient-red);
    color: white;
    padding: 30px;
    border-radius: 16px;
    margin-bottom: 20px;
    text-align: center;
}

.page-title {
    font-family: "Noto Serif SC", serif;
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.page-subtitle {
    font-size: 0.95rem;
    opacity: 0.9;
}

.section-title-main {
    font-family: "Noto Serif SC", serif;
    font-size: 1.5rem;
    color: var(--accent-blue);
    text-align: center;
    padding: 20px 0;
    font-weight: 700;
}

.section-title {
    font-family: "Noto Serif SC", serif;
    font-size: 1.2rem;
    color: var(--text-dark);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ========================================
   Map Container
   ======================================== */
.map-container {
    background: linear-gradient(180deg, #e8f4f8 0%, #d4e8f0 100%);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px var(--shadow-color);
}

.map-wrapper {
    position: relative;
    padding: 20px;
}

.jilin-map {
    width: 100%;
    height: auto;
    max-height: 500px;
}

.map-node {
    cursor: pointer;
    transition: all 0.3s ease;
}

.map-node:hover .node-dot {
    transform: scale(1.3);
}

.node-dot {
    fill: var(--primary-red);
    filter: drop-shadow(0 0 8px rgba(196, 30, 58, 0.6));
    transition: transform 0.3s ease;
}

.node-pulse {
    fill: var(--primary-red);
    opacity: 0.4;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { r: 8; opacity: 0.6; }
    100% { r: 20; opacity: 0; }
}

.node-label {
    font-size: 12px;
    fill: var(--text-dark);
    font-weight: 500;
    pointer-events: none;
}

/* Map Popup */
.map-popup {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 90%;
    max-width: 350px;
    background: var(--bg-light);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 50;
}

.map-popup.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.popup-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    border: none;
    background: var(--bg-cream);
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.popup-close:hover {
    background: var(--primary-red);
    color: white;
}

.popup-title {
    font-family: "Noto Serif SC", serif;
    font-size: 1.3rem;
    color: var(--primary-red);
    margin-bottom: 8px;
    font-weight: 700;
}

.popup-subtitle {
    font-size: 0.95rem;
    color: var(--primary-gold);
    font-weight: 600;
    margin-bottom: 12px;
}

.popup-desc {
    font-size: 0.9rem;
    color: var(--text-dark);
    line-height: 1.8;
}

/* ========================================
   Upload Section
   ======================================== */
.upload-section {
    padding: 20px 0;
}

.upload-zone {
    border: 2px dashed var(--border-gold);
    border-radius: 16px;
    padding: 50px 20px;
    text-align: center;
    background: var(--bg-light);
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-zone:hover {
    border-color: var(--primary-red);
    background: rgba(196, 30, 58, 0.05);
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.upload-text {
    font-size: 1rem;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.upload-hint {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* ========================================
   Progress Section
   ======================================== */
.progress-section {
    display: none;
    padding: 20px 0;
}

.progress-section.show {
    display: block;
    animation: fadeIn 0.5s ease;
}

.progress-label {
    font-size: 0.95rem;
    color: var(--text-dark);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.thinking-dots {
    display: inline-flex;
    gap: 4px;
}

.thinking-dots span {
    width: 8px;
    height: 8px;
    background: var(--primary-red);
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.thinking-dots span:nth-child(1) { animation-delay: -0.32s; }
.thinking-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

.progress-bar {
    height: 8px;
    background: var(--bg-cream);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: var(--gradient-gold);
    border-radius: 4px;
    transition: width 0.1s linear;
}

.progress-fill.animate {
    animation: progressAnim 5s ease-in-out forwards;
}

@keyframes progressAnim {
    0% { width: 0%; }
    20% { width: 30%; }
    50% { width: 60%; }
    80% { width: 85%; }
    100% { width: 100%; }
}

/* ========================================
   Result Section
   ======================================== */
.result-section {
    display: none;
    padding: 20px 0;
    animation: slideUp 0.5s ease;
}

.result-section.show {
    display: block;
}

.result-card {
    background: var(--bg-light);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px var(--shadow-color);
}

.result-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--bg-cream);
}

.result-icon {
    width: 48px;
    height: 48px;
    background: var(--gradient-red);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.result-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
}

.result-type {
    font-size: 0.85rem;
    color: var(--primary-red);
    font-weight: 500;
}

.result-item {
    margin-bottom: 16px;
}

.result-label {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 6px;
}

.result-value {
    font-size: 0.95rem;
    color: var(--text-dark);
    line-height: 1.6;
}

.result-value.highlight {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-red);
}

.result-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.result-tag {
    padding: 4px 12px;
    background: var(--bg-cream);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--secondary-brown);
}

/* ========================================
   AI Assistant / Chat
   ======================================== */
.content-wrapper {
    padding: 0 10px;
}

.ai-assistant {
    background: var(--bg-light);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 20px var(--shadow-color);
    margin-bottom: 20px;
}

.assistant-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.assistant-avatar {
    width: 48px;
    height: 48px;
    background: var(--gradient-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.assistant-info {
    flex: 1;
}

.assistant-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
}

.assistant-status {
    font-size: 0.85rem;
    color: var(--primary-gold);
}

.chat-messages {
    min-height: 150px;
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 16px;
    padding: 10px;
    background: var(--bg-cream);
    border-radius: 12px;
}

.chat-bubble {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 12px;
    animation: fadeIn 0.3s ease;
    word-wrap: break-word;
}

.chat-bubble.user {
    background: var(--accent-blue);
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 4px;
}

.chat-bubble.ai {
    background: white;
    color: var(--text-dark);
    border-bottom-left-radius: 4px;
}

.chat-input-area {
    display: flex;
    gap: 10px;
}

.chat-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border-gold);
    border-radius: 24px;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.chat-input:focus {
    border-color: var(--primary-red);
}

.chat-send {
    width: 48px;
    height: 48px;
    background: var(--gradient-red);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.chat-send:hover {
    transform: scale(1.05);
}

/* ========================================
   Courses Section
   ======================================== */
.courses-section {
    margin-top: 20px;
}

.course-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.course-card {
    background: var(--bg-light);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    gap: 16px;
    box-shadow: 0 2px 12px var(--shadow-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.course-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 24px var(--shadow-color);
}

.course-thumb {
    width: 80px;
    height: 60px;
    background: var(--gradient-red);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    flex-shrink: 0;
}

.course-info {
    flex: 1;
}

.course-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.course-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.course-tag {
    padding: 2px 8px;
    background: var(--bg-cream);
    border-radius: 10px;
    font-size: 0.75rem;
    color: var(--secondary-brown);
}

.course-clicks {
    font-size: 0.85rem;
    color: var(--primary-red);
}

/* ========================================
   Community / Posts
   ======================================== */
.post-input-section {
    background: var(--bg-light);
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 4px 20px var(--shadow-color);
    margin-bottom: 20px;
}

.post-textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border: 1px solid var(--border-gold);
    border-radius: 12px;
    font-size: 0.95rem;
    resize: vertical;
    outline: none;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.post-textarea:focus {
    border-color: var(--primary-red);
}

.warning-message {
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-top: 12px;
    display: none;
    animation: shake 0.5s ease;
}

.warning-message.show {
    display: block;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.post-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
}

.post-tools {
    display: flex;
    gap: 16px;
}

.post-tool {
    font-size: 1.3rem;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.post-tool:hover {
    transform: scale(1.1);
}

.post-submit {
    padding: 10px 24px;
    background: var(--gradient-red);
    border: none;
    border-radius: 20px;
    color: white;
    font-size: 0.9rem;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.post-submit:hover {
    transform: scale(1.05);
}

/* Posts List */
.posts-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.post-card {
    background: var(--bg-light);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 12px var(--shadow-color);
}

.post-author {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.author-avatar {
    width: 44px;
    height: 44px;
    background: var(--gradient-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.author-info {
    flex: 1;
}

.author-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-dark);
}

.post-time {
    font-size: 0.85rem;
    color: var(--text-light);
}

.post-content {
    font-size: 0.95rem;
    color: var(--text-dark);
    line-height: 1.6;
    margin-bottom: 12px;
}

.post-card-actions {
    display: flex;
    gap: 20px;
}

.post-action {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    color: var(--text-light);
    cursor: pointer;
    transition: color 0.3s ease;
}

.post-action:hover {
    color: var(--primary-red);
}

/* ========================================
   Products / Mall
   ======================================== */
.products-section {
    margin-top: 20px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.product-card {
    background: var(--bg-light);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px var(--shadow-color);
    transition: transform 0.3s ease;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 24px var(--shadow-color);
}

.product-image {
    height: 140px;
    background: var(--gradient-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    position: relative;
}

.product-info {
    padding: 16px;
}

.product-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.product-price {
    font-size: 1.2rem;
    color: var(--primary-red);
    font-weight: 700;
}

.ai-story-btn {
    width: 100%;
    padding: 10px;
    margin-top: 10px;
    background: var(--bg-cream);
    border: 1px solid var(--border-gold);
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--secondary-brown);
    cursor: pointer;
    transition: all 0.3s ease;
}

.ai-story-btn:hover {
    background: var(--gradient-red);
    color: white;
    border-color: var(--primary-red);
}

/* Barrage */
.barrage-container {
    position: fixed;
    top: 50%;
    right: -250px;
    width: 220px;
    z-index: 200;
    transition: right 0.5s ease;
}

.barrage-container.show {
    right: 20px;
}

.barrage-item {
    background: rgba(196, 30, 58, 0.95);
    color: white;
    padding: 16px;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 10px;
    animation: slideLeft 8s linear forwards;
    box-shadow: 0 4px 12px rgba(196, 30, 58, 0.3);
}

@keyframes slideLeft {
    from { transform: translateX(100%); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    to { transform: translateX(-120%); opacity: 0; }
}

/* ========================================
   Knowledge Graph
   ======================================== */
.graph-container {
    position: relative;
    height: 500px;
    background: linear-gradient(180deg, #f8f6f3 0%, #ebe7de 100%);
    margin: 20px 10px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px var(--shadow-color);
}

#knowledge-graph {
    width: 100%;
    height: 100%;
}

.graph-sidebar {
    position: absolute;
    top: 0;
    right: -300px;
    width: 280px;
    height: 100%;
    background: var(--bg-light);
    box-shadow: -4px 0 20px var(--shadow-color);
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 24px;
    overflow-y: auto;
}

.graph-sidebar.show {
    right: 0;
}

.sidebar-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    border: none;
    background: var(--bg-cream);
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-title {
    font-family: "Noto Serif SC", serif;
    font-size: 1.2rem;
    color: var(--primary-red);
    margin-bottom: 16px;
    font-weight: 700;
}

.sidebar-section {
    margin-bottom: 16px;
}

.sidebar-label {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 6px;
}

.sidebar-content {
    font-size: 0.95rem;
    color: var(--text-dark);
    line-height: 1.6;
}

.sidebar-relations {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.relation-tag {
    padding: 4px 10px;
    background: var(--bg-cream);
    border-radius: 12px;
    font-size: 0.85rem;
    color: var(--secondary-brown);
}

/* ========================================
   Footer
   ======================================== */
.main-footer {
    background: var(--accent-blue);
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 40px;
}

.main-footer p {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* ========================================
   Scrollbar
   ======================================== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-cream);
}

::-webkit-scrollbar-thumb {
    background: var(--border-gold);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-gold);
}

/* ========================================
   Responsive Design
   ======================================== */

/* Tablet */
@media (max-width: 992px) {
    .site-title {
        font-size: 1.6rem;
    }
    
    .page-title {
        font-size: 1.5rem;
    }
    
    .nav-container {
        padding: 10px;
    }
    
    .nav-item {
        padding: 8px 14px;
        font-size: 13px;
    }
    
    .nav-icon {
        font-size: 16px;
    }
    
    .main-content {
        padding: 15px;
    }
    
    .course-list {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .graph-sidebar {
        width: 260px;
        right: -280px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .main-header {
        padding: 20px 15px;
    }
    
    .site-title {
        font-size: 1.4rem;
    }
    
    .site-subtitle {
        font-size: 0.85rem;
    }
    
    .main-nav {
        position: relative;
    }
    
    .nav-container {
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        padding: 10px 15px;
    }
    
    .nav-container::-webkit-scrollbar {
        display: none;
    }
    
    .nav-item {
        flex-shrink: 0;
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .nav-icon {
        font-size: 14px;
    }
    
    .main-content {
        padding: 10px;
        min-height: auto;
    }
    
    .page-header {
        padding: 20px 15px;
        border-radius: 12px;
    }
    
    .page-title {
        font-size: 1.3rem;
    }
    
    .page-subtitle {
        font-size: 0.85rem;
    }
    
    .section-title-main {
        font-size: 1.2rem;
        padding: 15px 0;
    }
    
    .map-wrapper {
        padding: 10px;
    }
    
    .map-popup {
        width: 95%;
        padding: 16px;
    }
    
    .popup-title {
        font-size: 1.1rem;
    }
    
    .popup-desc {
        font-size: 0.85rem;
    }
    
    .upload-zone {
        padding: 30px 15px;
    }
    
    .upload-icon {
        font-size: 2.5rem;
    }
    
    .ai-assistant {
        padding: 15px;
    }
    
    .chat-messages {
        max-height: 250px;
    }
    
    .chat-bubble {
        max-width: 90%;
        font-size: 0.9rem;
    }
    
    .course-list {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .course-card {
        padding: 12px;
    }
    
    .course-thumb {
        width: 60px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .product-image {
        height: 100px;
        font-size: 2.5rem;
    }
    
    .product-info {
        padding: 10px;
    }
    
    .product-name {
        font-size: 0.9rem;
    }
    
    .product-price {
        font-size: 1rem;
    }
    
    .ai-story-btn {
        font-size: 0.75rem;
        padding: 8px;
    }
    
    .barrage-container {
        width: 180px;
        right: -200px;
    }
    
    .barrage-item {
        font-size: 0.8rem;
        padding: 12px;
    }
    
    .graph-container {
        height: 400px;
        margin: 10px 0;
    }
    
    .graph-sidebar {
        width: 100%;
        height: auto;
        max-height: 50%;
        top: auto;
        bottom: 0;
        right: -100%;
        border-radius: 16px 16px 0 0;
    }
    
    .graph-sidebar.show {
        right: 0;
    }
    
    .post-input-section {
        padding: 12px;
    }
    
    .post-card {
        padding: 12px;
    }
    
    .author-avatar {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
    
    .main-footer {
        padding: 15px;
    }
    
    .main-footer p {
        font-size: 0.8rem;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .main-header {
        padding: 15px 10px;
    }
    
    .site-title {
        font-size: 1.2rem;
    }
    
    .nav-item {
        padding: 6px 10px;
        font-size: 11px;
    }
    
    .nav-icon {
        font-size: 12px;
    }
    
    .page-title {
        font-size: 1.1rem;
    }
    
    .content-wrapper {
        padding: 0 5px;
    }
    
    .result-card {
        padding: 16px;
    }
    
    .result-header {
        flex-direction: column;
        text-align: center;
    }
    
    .assistant-avatar {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .chat-input {
        padding: 10px 14px;
        font-size: 0.9rem;
    }
    
    .chat-send {
        width: 42px;
        height: 42px;
    }
    
    .product-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    
    .product-image {
        height: 80px;
        font-size: 2rem;
    }
    
    .barrage-container {
        width: 150px;
        right: -170px;
    }
}

/* Desktop Large Screen */
@media (min-width: 1400px) {
    :root {
        --max-width: 1400px;
    }
    
    .site-title {
        font-size: 2.5rem;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .main-content {
        padding: 30px;
    }
    
    .course-list {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .graph-container {
        height: 600px;
    }
}

/* Print Styles */
@media print {
    .main-nav,
    .barrage-container,
    .chat-input-area,
    .post-actions,
    .post-input-section,
    .upload-zone,
    .ai-story-btn {
        display: none !important;
    }
    
    .main-header {
        background: none;
        color: var(--text-dark);
    }
    
    .page-header {
        background: none;
        border: 2px solid var(--border-gold);
        color: var(--text-dark);
    }
    
    .page {
        display: block !important;
        page-break-inside: avoid;
    }
}
