/* 科幻未来主题 - 全息显示效果 */

/* 导入科幻字体 */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700&family=Rajdhani:wght@300;400;500;600;700&display=swap');

:root {
    /* 主色调 */
    --primary-color: #00b3ff; /* 霓虹蓝 */
    --primary-hover: #00d4ff;
    --success-color: #00ff9d; /* 霓虹绿 */
    --success-hover: #00ffb3;
    --danger-color: #ff005a; /* 霓虹红 */
    --danger-hover: #ff0066;
    
    /* 文本颜色 */
    --text-primary: #e0e0e0;
    --text-secondary: #a0a0a0;
    
    /* 背景颜色 */
    --bg-primary: #0a0a12;
    --bg-secondary: #12121e;
    
    /* 边框颜色 */
    --border-color: #2a2a3a;
    
    /* 阴影 */
    --shadow-sm: 0 2px 10px rgba(0, 179, 255, 0.15);
    --shadow-md: 0 4px 20px rgba(0, 179, 255, 0.25);
    
    /* 字体 */
    --font-heading: 'Orbitron', sans-serif;
    --font-body: 'Rajdhani', 'Segoe UI', Roboto, Arial, sans-serif;
    
    /* 其他变量保持不变 */
    --radius-sm: 8px;
    --radius-md: 10px;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
}

/* 全局样式 */
* {
    box-sizing: border-box;
    text-decoration: none;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    background-color: var(--bg-secondary);
}

::-webkit-scrollbar-track {
    border-radius: 4px;
    background-color: var(--bg-secondary);
    box-shadow: inset 0 0 5px rgba(0, 179, 255, 0.1);
}

::-webkit-scrollbar-thumb {
    width: 8px;
    border-radius: 4px;
    background-color: rgba(0, 179, 255, 0.5);
    box-shadow: 0 0 8px rgba(0, 179, 255, 0.5);
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(0, 179, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(255, 0, 90, 0.05) 0%, transparent 50%),
        linear-gradient(rgba(0, 179, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 179, 255, 0.02) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 20px 20px, 20px 20px;
    margin: 0 8px;
    position: relative;
    overflow-x: hidden;
}

/* 添加全局电子网格效果 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        repeating-linear-gradient(0deg, transparent, transparent 1px, rgba(0, 179, 255, 0.03) 1px, rgba(0, 179, 255, 0.03) 2px),
        repeating-linear-gradient(90deg, transparent, transparent 1px, rgba(0, 179, 255, 0.03) 1px, rgba(0, 179, 255, 0.03) 2px);
    background-size: 30px 30px;
    pointer-events: none;
    z-index: -1;
}

/* 容器样式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-xs);
}

/* 标题样式 */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
    line-height: 1.2;
    text-shadow: 0 0 10px rgba(0, 179, 255, 0.5);
    letter-spacing: 1px;
}

/* 用户信息区域样式 */
.user-section {
    display: flex;
    position: relative;
    height: auto;
    padding: auto;
    border-bottom: 1px solid rgba(0, 179, 255, 0.2);
    margin-bottom: 10px;
}

.user-info {
    width: 100%;
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    flex-wrap: wrap;
    justify-content: flex-end;
}

.username {
    color: var(--text-primary);
}

.expiry-date, .credits {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.credits {
    display: flex;
    align-items: center;
    gap: 4px;
}

.credits b {
    color: var(--primary-color);
    padding: 0;
    text-shadow: 0 0 5px var(--primary-color);
}

/* 按钮样式 */
button,
.btn,
.profile-btn,
.profile-link-btn {
    padding: 8px 16px;
    display: inline-block;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(0, 179, 255, 0.3);
    cursor: pointer;
    font-size: 0.9rem;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    background-color: rgba(10, 10, 18, 0.8);
    color: var(--primary-color);
    box-shadow: 0 0 10px rgba(0, 179, 255, 0.2);
}

button:hover,
.btn:hover,
.profile-btn:hover,
.profile-link-btn:hover {
    background-color: rgba(0, 179, 255, 0.1);
    box-shadow: 0 0 15px rgba(0, 179, 255, 0.4);
    transform: translateY(-2px);
}

.btn-primary,
.profile-btn,
.profile-link-btn {
    background-color: rgba(0, 179, 255, 0.2);
    color: var(--text-primary);
    border: 1px solid var(--primary-color);
}

.btn-primary:hover,
.profile-btn:hover,
.profile-link-btn:hover {
    background-color: rgba(0, 179, 255, 0.3);
}

/* 认证按钮样式 */
.auth-buttons {
    position: absolute;
    right: 8px;
    display: flex;
    gap: var(--spacing-sm);
}

.login-btn {
    background-color: rgba(0, 179, 255, 0.2);
    color: var(--text-primary);
    border: 1px solid var(--primary-color);
}

.login-btn:hover {
    background-color: rgba(0, 179, 255, 0.3);
}

.register-btn {
    background-color: rgba(0, 255, 157, 0.2);
    color: var(--text-primary);
    border: 1px solid var(--success-color);
}

.register-btn:hover {
    background-color: rgba(0, 255, 157, 0.3);
}

.logout-btn {
    background-color: rgba(255, 0, 90, 0.2);
    color: var(--text-primary);
    border: 1px solid var(--danger-color);
}

.logout-btn:hover {
    background-color: rgba(255, 0, 90, 0.3);
}

/* 表单样式 */
.form-group {
    margin-bottom: var(--spacing-sm);
}

.form-group label {
    display: block;
    margin-bottom: var(--spacing-xs);
    color: var(--text-secondary);
}

.form-control,
input,
textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background-color: rgba(18, 18, 30, 0.8);
    color: var(--text-primary);
    transition: all 0.3s ease;
    position: relative;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
}

.form-control:focus,
input:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(0, 179, 255, 0.3), inset 0 0 5px rgba(0, 179, 255, 0.2);
    animation: inputPulse 2s infinite;
}

@keyframes inputPulse {
    0% {
        border-color: rgba(0, 179, 255, 0.5);
    }
    50% {
        border-color: rgba(0, 179, 255, 1);
    }
    100% {
        border-color: rgba(0, 179, 255, 0.5);
    }
}

/* 输入框占位符样式 */
::placeholder {
    color: rgba(160, 160, 160, 0.5);
    transition: all 0.3s ease;
}

:focus::placeholder {
    color: rgba(0, 179, 255, 0.5);
    text-shadow: 0 0 5px rgba(0, 179, 255, 0.3);
}

/* 卡片样式 */
.features-grid {
    display: flex;
    flex-wrap: wrap;
    width: auto;
    max-width: 1200px;
    justify-content: flex-start;
    gap: 0 10px;
}

.card {
    margin-top: 45px;
    background-color: rgba(18, 18, 30, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 179, 255, 0.2);
    box-shadow: 0 0 20px rgba(0, 179, 255, 0.1);
}

.card,
.feature-card {
    position: relative;
    width: 100%;
    background-color: rgba(18, 18, 30, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 179, 255, 0.2);
    border-radius: var(--radius-md);
    margin-right: var(--spacing-md);
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(0, 179, 255, 0.1);
    overflow: hidden;
}

/* 卡片边缘发光效果 */
.card::before,
.feature-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, 
        transparent 0%, 
        rgba(0, 179, 255, 0.1) 25%, 
        rgba(0, 179, 255, 0.3) 50%, 
        rgba(0, 179, 255, 0.1) 75%, 
        transparent 100%);
    z-index: -1;
    border-radius: calc(var(--radius-md) + 2px);
    animation: borderGlow 6s linear infinite;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:hover::before,
.feature-card:hover::before {
    opacity: 1;
}

@keyframes borderGlow {
    0% {
        background-position: 0% 0%;
    }
    100% {
        background-position: 200% 0%;
    }
}

.feature-card {
    width: 187px;
    margin-right: 0;
    padding: var(--spacing-sm);
    color: white;
    margin-bottom: 8px;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(0, 179, 255, 0.1), transparent);
    transform: rotate(45deg);
    animation: holographic 3s linear infinite;
    pointer-events: none;
}

@keyframes holographic {
    0% {
        transform: rotate(45deg) translateY(-100%);
    }
    100% {
        transform: rotate(45deg) translateY(100%);
    }
}

.feature-card img {
    position: absolute;
    right: var(--spacing-sm);
    bottom: var(--spacing-xs);
    filter: drop-shadow(0 0 5px var(--primary-color));
}

.feature-card b {
    font-size: 1rem;
    text-shadow: 0 0 10px var(--primary-color);
}

.feature-card p {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.card:hover,
.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 30px rgba(0, 179, 255, 0.3);
    border-color: var(--primary-color);
}

/* 输入输出区域样式 */
.input-box,
.output-box {
    position: relative;
    background-color: rgba(18, 18, 30, 0.7);
    padding: var(--spacing-xs);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 179, 255, 0.2);
}

.output-content {
    height: 300px;
    padding: var(--spacing-sm);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background-color: rgba(10, 10, 18, 0.8);
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    color: var(--text-primary);
}

.output-title {
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    color: var(--primary-color);
    text-shadow: 0 0 5px var(--primary-color);
}

/* 复制按钮样式 */
.copy-btn {
    padding: 0.25rem 0.5rem;
    background-color: rgba(0, 179, 255, 0.2);
    color: var(--text-primary);
    border: 1px solid var(--primary-color);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    cursor: pointer;
    opacity: 0.8;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(0, 179, 255, 0.2);
}

.copy-btn:hover {
    opacity: 1;
    background-color: rgba(0, 179, 255, 0.3);
    box-shadow: 0 0 15px rgba(0, 179, 255, 0.4);
}

/* 模态框样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal.active {
    opacity: 1;
    visibility: visible;
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(5px);
    }
}

.modal-content {
    border: 1px solid rgba(0, 179, 255, 0.3);
    animation: modalGlow 2s infinite alternate;
}

@keyframes modalGlow {
    from {
        box-shadow: 0 0 20px rgba(0, 179, 255, 0.2);
    }
    to {
        box-shadow: 0 0 30px rgba(0, 179, 255, 0.4);
    }
}

.close,
.detail-modal-close {
    position: absolute;
    color: var(--primary-color);
    right: var(--spacing-sm);
    top: var(--spacing-sm);
    font-size: 1.5rem;
    cursor: pointer;
    width: 35px;
    height: 35px;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    text-shadow: 0 0 5px var(--primary-color);
}

.close:hover,
.detail-modal-close:hover {
    background-color: rgba(0, 179, 255, 0.2);
    transform: rotate(90deg);
}

.modal-footer {
    text-align: center;
    margin-top: 15px;
}

.modal-footer a {
    color: var(--primary-color);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-shadow: 0 0 5px rgba(0, 179, 255, 0.5);
}

.modal-footer a:hover {
    text-shadow: 0 0 10px var(--primary-color);
}

/* 错误和成功消息样式 */
.error,
.error-message {
    display: none;
    color: var(--danger-color);
    padding: var(--spacing-xs);
    margin-top: var(--spacing-xs);
    border-radius: var(--radius-sm);
    background-color: rgba(255, 0, 90, 0.1);
    border: 1px solid rgba(255, 0, 90, 0.3);
    text-shadow: 0 0 5px rgba(255, 0, 90, 0.5);
}

.success {
    color: var(--success-color);
    padding: var(--spacing-xs);
    margin-top: var(--spacing-xs);
    background-color: rgba(0, 255, 157, 0.1);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(0, 255, 157, 0.3);
    text-shadow: 0 0 5px rgba(0, 255, 157, 0.5);
}

/* API Key 相关样式 */
.api-key-section {
    margin-bottom: var(--spacing-md);
}

.api-key-notice {
    text-align: center;
    margin-bottom: var(--spacing-md);
    padding: var(--spacing-sm);
    background-color: rgba(255, 193, 7, 0.1);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.api-key-input {
    display: flex;
    gap: var(--spacing-sm);
    align-items: center;
}

.toggle-password {
    cursor: pointer;
    color: var(--text-secondary);
    padding: var(--spacing-xs);
    transition: color 0.3s ease;
}

.toggle-password:hover {
    color: var(--primary-color);
}

/* 功能说明区域样式 */
.feature-description-box {
    margin-top: var(--spacing-md);
    padding: var(--spacing-sm);
    background-color: rgba(18, 18, 30, 0.7);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 179, 255, 0.2);
}

.description-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    color: var(--primary-color);
    text-shadow: 0 0 5px var(--primary-color);
}

.feature-description {
    color: var(--text-primary);
    line-height: 1.6;
    white-space: pre-line;
}

/* 知识库标签样式 */
.button-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    padding-right: 70px; /* 为按钮预留空间 */
}

.knowledge-base-tags {
    flex: 1;
    overflow: hidden;
    margin-right: 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background-color: rgba(10, 10, 18, 0.8);
}

.tags-scroll {
    padding-top: 0.5rem;
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 5px;
    scrollbar-width: thin;
    -ms-overflow-style: none;
    white-space: nowrap;
    width: 100%;
}

.tag-item {
    padding: 4px 6px;
    background-color: rgba(18, 18, 30, 0.7);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap;
    color: var(--text-secondary);
}

.tag-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 0 10px rgba(0, 179, 255, 0.3);
    color: var(--text-primary);
}

.tag-item.selected {
    background-color: rgba(0, 179, 255, 0.2);
    color: var(--primary-color);
    box-shadow: 0 0 10px rgba(0, 179, 255, 0.3);
    border-color: var(--primary-color);
    text-shadow: 0 0 5px var(--primary-color);
    transform: translateY(-1px);
}

.tag-item.selected:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(0, 179, 255, 0.4);
}

/* 轮播图样式 */
.banner-section {
    position: relative;
    margin-bottom: var(--spacing-md);
    margin-top: 10px;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0, 179, 255, 0.2);
    border: 1px solid rgba(0, 179, 255, 0.2);
}

.banner-slider {
    position: relative;
    height: 160px;
    background: linear-gradient(135deg, rgba(0, 179, 255, 0.2) 0%, rgba(255, 0, 90, 0.2) 100%);
}

.banner-slide {
    display: none;
    position: absolute;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}

.banner-slide.active {
    display: flex;
}

.banner-content h2 {
    color: #fff;
    margin: 0 0 var(--spacing-xs) 0;
    font-size: 1.5rem;
    font-weight: 600;
    text-shadow: 0 0 10px var(--primary-color);
}

.banner-content p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

.banner-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
}

.dot.active {
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

/* 快捷功能区样式 */
.quick-actions {
    display: flex;
    justify-content: space-around;
    margin-bottom: 50px;
    padding: var(--spacing-sm);
    background-color: rgba(18, 18, 30, 0.7);
    border-radius: var(--radius-md);
    box-shadow: 0 0 20px rgba(0, 179, 255, 0.1);
    border: 1px solid rgba(0, 179, 255, 0.2);
    backdrop-filter: blur(10px);
}

.quick-action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    padding: var(--spacing-xs);
    border-radius: var(--radius-sm);
}

.quick-action-item:hover {
    transform: translateY(-2px);
    background-color: rgba(0, 179, 255, 0.1);
    text-shadow: 0 0 5px var(--primary-color);
}

.quick-icon {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-xs);
    text-shadow: 0 0 10px var(--primary-color);
}

.quick-action-item span {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.quick-action-item:hover span {
    color: var(--text-primary);
}

/* 聊天界面特定样式 */
.chat-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 75px);
    max-width: 1200px;
    margin: 0 auto;
    margin-bottom: 10px;
}

.chat-messages {
    position: relative;
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    background-color: rgba(18, 18, 30, 0.7);
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 179, 255, 0.2);
    box-shadow: 0 0 20px rgba(0, 179, 255, 0.1);
}

.message {
    max-width: 80%;
    padding: 10px 15px;
    margin-bottom: 10px;
    border-radius: 18px;
    position: relative;
    word-wrap: break-word;
}

.user-message {
    align-self: flex-end;
    background-color: rgba(0, 179, 255, 0.2);
    color: var(--text-primary);
    border-bottom-right-radius: 5px;
    border: 1px solid rgba(0, 179, 255, 0.3);
    box-shadow: 0 0 10px rgba(0, 179, 255, 0.2);
    animation: messageAppear 0.3s ease-out;
    position: relative;
    overflow: hidden;
}

.user-message::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 179, 255, 0.1), transparent);
    transform: translateX(-100%);
    animation: messageScan 2s ease-in-out infinite;
    pointer-events: none;
}

.ai-message {
    align-self: flex-start;
    background-color: rgba(18, 18, 30, 0.8);
    color: var(--text-primary);
    border-bottom-left-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.05);
    animation: messageAppear 0.3s ease-out;
    position: relative;
    overflow: hidden;
}

.ai-message::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 0, 90, 0.1), transparent);
    transform: translateX(-100%);
    animation: messageScan 2s ease-in-out infinite;
    pointer-events: none;
}

@keyframes messageAppear {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes messageScan {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* 历史记录页面样式 */
.history-item {
    background-color: rgba(18, 18, 30, 0.7);
    border: 1px solid rgba(0, 179, 255, 0.2);
    border-radius: var(--radius-md);
    padding: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(0, 179, 255, 0.1);
}

.history-item:hover {
    box-shadow: 0 0 20px rgba(0, 179, 255, 0.3);
    transform: translateY(-2px);
    border-color: var(--primary-color);
}

.history-item-header {
    display: flex;
    justify-content: space-between;
}

.history-feature-name {
    font-weight: bold;
    color: var(--primary-color);
    margin: auto 0;
    text-shadow: 0 0 5px rgba(0, 179, 255, 0.5);
}

.history-timestamp {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* 底部导航栏样式 */
.bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(10, 10, 18, 0.9);
    box-shadow: 0 -2px 10px rgba(0, 179, 255, 0.2);
    z-index: 1000;
    justify-content: space-around;
    padding: 3px;
    border-top: 1px solid rgba(0, 179, 255, 0.2);
    backdrop-filter: blur(10px);
    overflow: hidden;
}

/* 底部导航栏扫描线效果 */
.bottom-nav::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, transparent, var(--primary-color), transparent);
    animation: navScan 3s linear infinite;
    opacity: 0.7;
}

@keyframes navScan {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.8rem;
    padding: 2px;
    opacity: 50%;
    transition: all 0.3s ease;
}

.bottom-nav-item span {
    font-size: 0.6rem;
}

.bottom-nav-item img {
    width: 22px;
    height: 22px;
    filter: brightness(0.8) drop-shadow(0 0 2px var(--primary-color));
    transition: all 0.3s ease;
}

.bottom-nav-item.active {
    opacity: 100%;
    color: var(--primary-color);
}

.bottom-nav-item.active img {
    filter: brightness(1) drop-shadow(0 0 5px var(--primary-color));
}

.bottom-nav-item:hover {
    opacity: 80%;
    transform: translateY(-2px);
}

/* 扫描线效果 */
@keyframes scanline {
    0% {
        transform: translateY(-100%);
    }
    100% {
        transform: translateY(100%);
    }
}

/* 添加扫描线效果到容器 */
.card::after,
.feature-card::after,
.modal-content::after,
.chat-messages::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, transparent, rgba(0, 179, 255, 0.5), transparent);
    animation: scanline 4s linear infinite;
    pointer-events: none;
    opacity: 0.3;
}

/* 加载动画 */
@keyframes loadingPulse {
    0% {
        opacity: 0.5;
        transform: scale(0.8);
    }
    50% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0.5;
        transform: scale(0.8);
    }
}

.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100px;
}

.loading-dot {
    width: 12px;
    height: 12px;
    margin: 0 5px;
    background-color: var(--primary-color);
    border-radius: 50%;
    display: inline-block;
    animation: loadingPulse 1.5s infinite ease-in-out;
    box-shadow: 0 0 10px var(--primary-color);
}

.loading-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-dot:nth-child(3) {
    animation-delay: 0.4s;
}

/* 数据终端效果 */
.terminal-text {
    font-family: 'Courier New', monospace;
    color: var(--primary-color);
    background-color: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--primary-color);
    overflow-x: auto;
    position: relative;
}

.terminal-text::before {
    content: '> ';
    color: var(--primary-color);
    font-weight: bold;
}

/* 特定模态框样式 */
/* features.php 详情模态框 */
.detail-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    animation: modalFadeIn 0.3s ease-out;
}

.detail-modal-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    margin: 5% auto;
    border: 1px solid var(--primary-color);
    border-radius: 15px;
    width: 90%;
    max-width: 800px;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 255, 255, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: scanLines 2s linear infinite, hologramFlicker 3s ease-in-out infinite;
}

.detail-modal-close {
    color: var(--primary-color);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 15px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid var(--primary-color);
    transition: all 0.3s ease;
}

.detail-modal-close:hover {
    background: var(--primary-color);
    color: var(--bg-color);
    transform: rotate(90deg);
    box-shadow: 0 0 20px var(--primary-color);
}

/* user_profile.php 编辑模态框 */
#profileEditForm.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    animation: modalFadeIn 0.3s ease-out;
}

#profileEditForm .modal-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    margin: 5% auto;
    padding: 30px;
    border: 2px solid var(--primary-color);
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 255, 255, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: scanLines 2s linear infinite, hologramFlicker 3s ease-in-out infinite;
}

/* tavern.php AI模态框 */
.ai-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: modalFadeIn 0.3s ease-out;
}

.ai-modal-container {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    border-radius: 15px;
    width: 90%;
    max-width: 900px;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 255, 255, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: scanLines 2s linear infinite, hologramFlicker 3s ease-in-out infinite;
    overflow: hidden;
}

.ai-modal-content {
    height: 100%;
    overflow-y: auto;
}

.ai-modal-iframe {
    width: 100%;
    height: 70vh;
    border: none;
    border-radius: 10px;
    background: var(--bg-color);
}

.mobile-back-button {
    position: absolute;
    top: 15px;
    right: 5px;
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    z-index: 1001;
}

.mobile-back-button:hover {
    color: var(--bg-color);
    box-shadow: 0 0 15px var(--primary-color);
    transform: scale(1.05);
}

/* 卡片详情模态框 */
.card-detail-modal {
    max-width: 800px !important;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%) !important;
    border: 2px solid var(--primary-color) !important;
    box-shadow: 0 20px 40px rgba(0, 255, 255, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
    animation: scanLines 2s linear infinite, hologramFlicker 3s ease-in-out infinite !important;
}

/* tavern.php 对话消息样式 */
.message-item .message-content {
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.8) 0%, rgba(22, 33, 62, 0.8) 100%) !important;
    border: 1px solid rgba(0, 255, 255, 0.3) !important;
    color: var(--text-color) !important;
    box-shadow: 0 4px 15px rgba(0, 255, 255, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(10px) !important;
}

.message-item.sent .message-content {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.15) 0%, rgba(0, 200, 200, 0.15) 100%) !important;
    border: 1px solid var(--primary-color) !important;
    color: var(--text-color) !important;
    box-shadow: 0 4px 15px rgba(0, 255, 255, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(10px) !important;
}

.mobile-conversation-overlay.active {
    background: linear-gradient(135deg, #0a0a1a 0%, #1a1a2e 50%, #16213e 100%) !important;
    backdrop-filter: blur(10px) !important;
}

.mobile-conversation-overlay.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        90deg,
        transparent,
        transparent 2px,
        rgba(0, 255, 255, 0.03) 2px,
        rgba(0, 255, 255, 0.03) 4px
    );
    pointer-events: none;
    z-index: 1;
}

.mobile-conversation-header {
    background: rgba(26, 26, 46, 0.9) !important;
    border-bottom: 1px solid var(--primary-color) !important;
    backdrop-filter: blur(10px) !important;
    position: relative;
    z-index: 2;
}

.mobile-conversation-title {
    color: var(--primary-color) !important;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5) !important;
    font-family: var(--font-heading) !important;
}

.mobile-back-button {
    color: var(--primary-color) !important;
    background: rgba(0, 0, 0, 0.5) !important;
    border: 1px solid var(--primary-color) !important;
    border-radius: 50% !important;
    transition: all 0.3s ease !important;
}

.mobile-back-button:hover {
    color: var(--bg-color) !important;
    box-shadow: 0 0 15px var(--primary-color) !important;
    transform: scale(1.1) !important;
}

.mobile-message-container {
    position: relative;
    z-index: 2;
    background: rgba(0, 0, 0, 0.3) !important;
    backdrop-filter: blur(5px) !important;
}

/* 移动端样式适配 */
@media screen and (max-width: 768px) {
    * {
        font-size: 0.9rem;
    }
    
    .container {
        padding: 0.5rem;
        width: 100%;
    }
    
    .card {
        margin-top: 0;
    }
    
    .features-grid {
        justify-content: space-between;
    }
    
    .feature-card {
        width: 48%;
        min-width: auto;
        margin-right: 0;
        margin-bottom: 0.8rem;
    }
    
    .banner-slider {
        height: 120px;
    }
    
    .banner-content h2 {
        font-size: 1.2rem;
    }
    
    .banner-content p {
        font-size: 0.8rem;
    }
    
    .quick-actions {
        padding: var(--spacing-xs);
    }
    
    .quick-action-item {
        padding: 6px;
    }
    
    .quick-icon {
        font-size: 1.2rem;
    }
    
    .quick-action-item span {
        font-size: 0.7rem;
    }
    
    .input-box, .output-box {
        padding: 0.5rem;
    }
    
    .output-content {
        height: 200px;
    }
    
    .ai-modal-iframe {
        height: 60vh;
    }
    
    .chat-container {
        height: calc(100vh - 120px);
    }
    
    .bottom-nav {
        padding: 8px 0;
    }
    
    .nav-item {
        font-size: 12px;
    }
    
    .nav-item i {
        font-size: 18px;
    }
}