/* 全局变量 */
:root {
    --primary-color: #8a5cf5;
    --primary-gradient: linear-gradient(45deg, #8a5cf5, #d53f8c);
    --secondary-color: #a0a0b0;
    --white-color: #ffffff;
    --text-color: #333333;
    --light-bg: #f5f4fa;
    --border-color: #eaeaea;
    --accent-color: #d53f8c;
    --tech-blue: #3f84e5;
    --neon-glow: 0 0 8px rgba(138, 92, 245, 0.6);
}

/* 基础样式 */
body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    margin: 0;
    padding: 0;
    color: var(--text-color);
    background-color: var(--white-color);
    transition: background-color 0.3s, color 0.3s;
    -webkit-text-size-adjust: 100%;
}

/* 防止iOS设备中输入框自动放大 */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
textarea {
    font-size: 16px; /* 至少16px以避免iOS中自动缩放 */
}

body.dark-mode {
    --white-color: #1a1a2e;
    --text-color: #e6e6fa;
    --light-bg: #2a2a40;
    --border-color: #444;
    background-color: var(--white-color);
    color: var(--text-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 顶部导航 */
header {
    padding: 15px 0;
    border-bottom: 1px solid rgba(138, 92, 245, 0.2);
    background: linear-gradient(to right, rgba(138, 92, 245, 0.05), rgba(213, 63, 140, 0.05));
}

.header-container {
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

/* Logo样式已移至logo_ai_senior_sis.php */

/* 面包屑导航 */
.breadcrumb {
    padding: 10px 0;
    margin: 10px 0 20px;
    font-size: 0.9rem;
    color: var(--secondary-color);
}

.breadcrumb a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumb a:hover {
    color: var(--primary-color);
}

.breadcrumb-separator {
    margin: 0 8px;
}

/* 回到顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: var(--primary-gradient, linear-gradient(45deg, #8a5cf5, #d53f8c));
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(138, 92, 245, 0.4);
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    z-index: 900;
    font-size: 1.2rem;
}

.back-to-top.visible {
    opacity: 1;
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 8px rgba(138, 92, 245, 0.6);
}

/* 阅读辅助控制面板 */
.reading-controls {
    display: flex;
    justify-content: flex-end;
    padding: 10px 0;
    margin-bottom: 20px;
    align-items: center;
}

.reading-controls button {
    background: none;
    border: none;
    color: var(--secondary-color);
    cursor: pointer;
    margin-left: 15px;
    font-size: 1.1rem;
    transition: color 0.3s;
    display: flex;
    align-items: center;
}

.reading-controls button:hover {
    color: var(--primary-color);
}

.reading-controls button i {
    margin-right: 5px;
}

.font-size-controls {
    display: flex;
    align-items: center;
}

.font-size-controls span {
    font-size: 0.9rem;
    color: var(--secondary-color);
    margin: 0 5px;
}

.progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: rgba(138, 92, 245, 0.1);
    z-index: 1000;
}

.progress-bar {
    height: 3px;
    background: var(--primary-gradient);
    width: 0%;
    transition: width 0.2s;
}

/* 文章内容 */
.article-header {
    margin-bottom: 20px;
}

.article-title {
    font-size: 1.9rem;
    margin: 0 0 15px;
    line-height: 1.3;
    color: var(--text-color);
    text-align: center;
}

.article-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 15px;
}

.article-actions button {
    background: none;
    border: none;
    color: var(--secondary-color, #a0a0b0);
    cursor: pointer;
    font-size: 1.4rem;
    margin: 0 15px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    padding: 5px 10px;
    border-radius: 5px;
}

.article-actions button .stat {
    font-size: 0.8rem;
    color: var(--secondary-color, #a0a0b0);
    margin-top: 3px;
}

.article-actions button:hover {
    transform: scale(1.1);
    background-color: rgba(138, 92, 245, 0.1);
}

.article-actions button.active {
    color: var(--primary-color, #8a5cf5);
}

.article-actions button.active i {
    animation: heartBeat 1.3s ease-in-out;
}

@keyframes heartBeat {
    0% { transform: scale(1); }
    14% { transform: scale(1.3); }
    28% { transform: scale(1); }
    42% { transform: scale(1.3); }
    70% { transform: scale(1); }
}

.article-actions button:after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: -2px;
    left: 0;
    background: var(--primary-gradient, linear-gradient(45deg, #8a5cf5, #d53f8c));
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s;
}

.article-actions button:hover:after {
    transform: scaleX(1);
    transform-origin: left;
}

.article-actions button.loading {
    opacity: 0.7;
}

.article-actions button.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-top-color: var(--primary-color);
    animation: spin 0.8s infinite linear;
}

.article-actions button.success-animation {
    animation: pulse 0.5s ease;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.article-summary {
    background-color: var(--light-bg);
    padding: 15px;
    border-left: 4px solid var(--primary-color);
    margin-bottom: 30px;
    font-size: 0.95rem;
    line-height: 1.6;
    transition: font-size 0.3s;
}

.article-content {
    line-height: 1.8;
    font-size: 1rem;
    margin-bottom: 40px;
    transition: font-size 0.3s;
}

.article-meta {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
    color: var(--secondary-color);
    font-size: 0.9rem;
    margin: 20px 0;
    background-color: var(--light-bg);
    padding: 15px;
    border-radius: 8px;
}

.article-meta > div {
    margin: 0 15px 0 0;
    display: flex;
    align-items: center;
}

.article-meta i {
    margin-right: 5px;
    color: var(--primary-color);
}

/* AI助手浮窗 */
.chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 320px;
    background-color: var(--white-color);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(138, 92, 245, 0.3);
    overflow: hidden;
    z-index: 1000;
    transition: all 0.3s;
}

.chat-widget.minimized {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
}

.chat-widget.minimized .chat-header {
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
}

.chat-widget.minimized .chat-header h3 {
    display: block;
    margin: 0;
    font-size: 1.3rem;
}

.chat-widget.minimized .chat-header h3 span {
    display: none;
}

.chat-widget.minimized .minimize-btn {
    display: none;
}

.chat-widget.minimized .chat-body,
.chat-widget.minimized .chat-input {
    display: none;
}

.chat-header {
    background: var(--primary-gradient);
    color: white;
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: default;
}

.chat-header h3 {
    margin: 0;
    font-size: 1rem;
}

.chat-header h3 i {
    margin-right: 5px;
}

.minimize-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 25px;
    height: 25px;
    z-index: 10;
}

.chat-body {
    height: 250px;
    overflow-y: auto;
    padding: 15px;
    background-color: var(--white-color);
    transition: background-color 0.3s;
}

.chat-message {
    margin-bottom: 15px;
    display: flex;
}

.chat-message.agent {
    justify-content: flex-start;
}

.chat-message.user {
    justify-content: flex-end;
}

.message-content {
    max-width: 80%;
    padding: 10px;
    border-radius: 10px;
}

.chat-message.agent .message-content {
    background-color: var(--light-bg);
    color: var(--text-color);
    border-top-left-radius: 0;
}

.chat-message.user .message-content {
    background: var(--primary-gradient);
    color: white;
    border-top-right-radius: 0;
}

.chat-input {
    display: flex;
    padding: 10px;
    border-top: 1px solid rgba(138, 92, 245, 0.1);
    background-color: var(--white-color);
    transition: background-color 0.3s;
}

.chat-input input {
    flex: 1;
    padding: 10px;
    border: 1px solid rgba(138, 92, 245, 0.2);
    border-radius: 5px;
    margin-right: 10px;
    background-color: var(--white-color);
    color: var(--text-color);
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

.chat-input input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 5px rgba(138, 92, 245, 0.2);
}

.chat-input button {
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: 5px;
    padding: 10px 15px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.chat-input button:hover {
    transform: translateY(-2px);
    box-shadow: var(--neon-glow);
}

/* AI技术专区 */
.tech-zone {
    margin: 40px 0;
}

.tech-zone h2 {
    text-align: center;
    margin-bottom: 25px;
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

.tech-zone-heading {
    text-align: center;
    margin-bottom: 30px;
}

.tech-section {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 20px;
}

.tech-card {
    width: calc(33.33% - 20px);
    margin-bottom: 20px;
    background-color: var(--light-bg);
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
    position: relative;
}

.tech-card:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom right, rgba(138, 92, 245, 0.05), rgba(213, 63, 140, 0.05));
    z-index: 0;
    opacity: 0;
    transition: opacity 0.3s;
}

.tech-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(138, 92, 245, 0.2);
}

.tech-card:hover:before {
    opacity: 1;
}

.tech-header {
    background: var(--primary-gradient);
    color: white;
    padding: 15px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.tech-header h3 {
    margin: 0 0 5px;
    font-size: 1.4rem;
}

.tech-header p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
    text-transform: uppercase;
}

.tech-body {
    padding: 15px;
    color: var(--text-color);
    position: relative;
    z-index: 1;
}

.tech-body p {
    margin: 10px 0;
    display: flex;
    align-items: flex-start;
}

.tech-body p i {
    margin-right: 10px;
    min-width: 16px;
    text-align: center;
    color: var(--primary-color);
    font-size: 0.9rem;
}

.tech-card:hover .tech-body p i {
    color: var(--accent-color);
}

/* 禁用装饰小方块 */
.tech-header.no-decoration:after {
    display: none !important;
    content: none !important;
}

.no-decoration:after {
    display: none !important;
    content: none !important;
}

/* 文章标签 */
.article-tags {
    margin: 20px 0;
    font-size: 0.9rem;
    color: var(--secondary-color);
    background-color: var(--white-color);
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    border-left: 4px solid var(--primary-color);
    transition: background-color 0.3s;
}

body.dark-mode .article-tags {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.article-tags i {
    color: var(--primary-color);
    margin-right: 8px;
}

.article-tags a {
    display: inline-block;
    margin: 5px;
    padding: 4px 12px;
    background-color: var(--light-bg);
    color: var(--secondary-color);
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.3s;
    font-size: 0.85rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.article-tags a:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(60, 151, 157, 0.2);
}

/* 相关文章 */
.related-articles {
    margin: 30px 0;
    padding: 20px;
    background-color: var(--white-color);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    transition: background-color 0.3s, box-shadow 0.3s;
    border-top: 3px solid var(--primary-color);
}

body.dark-mode .related-articles {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.related-articles h3 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-top: 0;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
}

.related-articles h3:before {
    content: '\f02e';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-right: 10px;
    color: var(--primary-color);
    font-size: 0.9em;
}

.related-articles ul {
    margin: 0;
    padding: 0;
    list-style-type: none;
}

.related-articles li {
    margin-bottom: 12px;
    padding-left: 22px;
    position: relative;
    transition: transform 0.2s;
}

.related-articles li:before {
    content: '\f054';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: var(--primary-color);
    position: absolute;
    left: 0;
    top: 3px;
    font-size: 0.7rem;
}

.related-articles li:hover {
    transform: translateX(5px);
}

.related-articles a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s;
    line-height: 1.5;
    display: block;
}

.related-articles a:hover {
    color: var(--primary-color);
}

/* 页脚样式 */
footer {
    background-color: var(--light-bg);
    padding: 30px 0;
    margin-top: 50px;
    border-top: 1px solid rgba(138, 92, 245, 0.1);
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.footer-col {
    flex: 1;
    min-width: 200px;
    margin-bottom: 20px;
    padding: 0 15px;
}

.footer-col h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--primary-color);
    font-weight: 600;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col ul li {
    margin-bottom: 8px;
}

.footer-col ul li a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.footer-col ul li a:hover {
    color: var(--primary-color);
}

.footer-social {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.footer-social a {
    color: var(--secondary-color);
    font-size: 1.2rem;
    transition: color 0.3s;
}

.footer-social a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    border-top: 1px solid rgba(138, 92, 245, 0.1);
    margin-top: 20px;
    padding-top: 20px;
    text-align: center;
    font-size: 0.85rem;
    color: var(--secondary-color);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        align-items: center;
    }
    
    .logo-text-main {
        font-size: 2rem;
    }
    
    .logo-text-cn {
        font-size: 1.3rem;
    }
    
    .logo-text-en {
        font-size: 0.7rem;
    }
    
    .reading-controls {
        justify-content: center;
    }
    
    .reading-controls button {
        margin: 0 10px;
        font-size: 1rem;
    }
    
    .reading-controls button span {
        display: none;
    }
    
    .reading-controls button i {
        margin-right: 0;
    }
    
    .article-title {
        font-size: 1.5rem;
        text-align: center;
    }
    
    .footer-content {
        flex-direction: column;
    }
    
    .footer-col {
        width: 100%;
        margin-bottom: 30px;
    }
    
    .tech-card {
        width: 100%;
    }
    
    .chat-widget {
        position: static;
        width: 100%;
        margin: 20px 0;
        box-shadow: none;
        border: 1px solid rgba(138, 92, 245, 0.1);
    }
    
    .minimize-btn {
        display: none;
    }
    
    .article-meta {
        justify-content: flex-end;
    }
    
    .article-meta > div {
        margin-bottom: 5px;
    }
    
    .article-actions {
        justify-content: flex-end;
    }
    
    .article-actions button {
        margin: 0 10px;
        font-size: 1.2rem;
        padding: 0;
    }
    
    .article-actions button .stat {
        font-size: 0.7rem;
        margin-top: 2px;
    }
    
    .article-tags {
        padding: 12px;
        margin: 15px 0;
    }
    
    .article-tags a {
        padding: 3px 10px;
        margin: 3px;
        font-size: 0.8rem;
    }
    
    .related-articles {
        padding: 15px;
        margin: 20px 0;
    }
    
    .related-articles h3 {
        font-size: 1.1rem;
    }
    
    .related-articles li {
        margin-bottom: 10px;
    }
}

@media (max-width: 480px) {
    /* Logo样式已移至logo_ai_senior_sis.php */
    
    .reading-controls {
        margin: 15px 0;
    }
    
    .article-title {
        font-size: 1.5rem;
    }
    
    .article-meta {
        flex-wrap: wrap;
        justify-content: center;
        font-size: 0.8rem;
    }
    
    .article-meta > div {
        margin: 3px 5px;
    }
    
    .article-actions {
        justify-content: flex-end;
    }
    
    .article-actions button {
        margin: 0 8px;
        font-size: 1.2rem;
    }
    
    .article-summary {
        font-size: 0.9rem;
        padding: 12px;
    }
    
    .article-content {
        font-size: 0.95rem;
    }
}

/* 全文语音播放器 */
.audio-player {
    margin: 1.5rem 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #e5e9f2 100%);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.audio-player:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6, #d946ef);
}

.audio-player.playing:before {
    animation: rainbow 3s linear infinite;
    background-size: 200% auto;
}

@keyframes rainbow {
    0% { background-position: 0 0; }
    100% { background-position: 200% 0; }
}

.audio-player-title {
    font-size: 1rem;
    color: #4b5563;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.audio-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.audio-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
}

.audio-btn {
    background: none;
    border: none;
    color: #374151;
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.audio-btn:hover {
    background-color: rgba(99, 102, 241, 0.1);
    color: #6366f1;
}

.audio-play-btn {
    width: 48px;
    height: 48px;
    background-color: #6366f1;
    color: white;
    position: relative;
}

.audio-play-btn:hover {
    background-color: #4f46e5;
    color: white;
    transform: scale(1.05);
}

.audio-volume {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.audio-volume-slider {
    width: 80px;
    height: 4px;
    background-color: #d1d5db;
    border-radius: 2px;
    position: relative;
    cursor: pointer;
}

.audio-volume-level {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background-color: #6366f1;
    border-radius: 2px;
    width: 100%;
}

.audio-speed {
    font-size: 0.85rem;
    color: #4b5563;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    background-color: rgba(99, 102, 241, 0.1);
}

.audio-speed:hover {
    background-color: rgba(99, 102, 241, 0.2);
}

.audio-timer {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #4b5563;
}

.audio-progress-container {
    flex: 1;
    height: 6px;
    background-color: #d1d5db;
    border-radius: 3px;
    position: relative;
    cursor: pointer;
}

.audio-progress {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background-color: #6366f1;
    border-radius: 3px;
    width: 0;
}

.audio-progress-handle {
    position: absolute;
    top: 50%;
    width: 14px;
    height: 14px;
    background-color: #6366f1;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    left: 0;
    transition: opacity 0.3s;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
    opacity: 0;
}

.audio-progress-container:hover .audio-progress-handle,
.audio-progress-container:active .audio-progress-handle {
    opacity: 1;
}

.audio-wave {
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.audio-wave span {
    display: block;
    width: 2px;
    margin: 0 1px;
    background-color: rgba(255, 255, 255, 0.8);
    animation: wave 1.2s infinite ease-in-out;
    height: 8px;
}

.audio-wave span:nth-child(2) {
    animation-delay: 0.2s;
}

.audio-wave span:nth-child(3) {
    animation-delay: 0.4s;
}

.audio-wave span:nth-child(4) {
    animation-delay: 0.6s;
}

@keyframes wave {
    0%, 100% {
        height: 4px;
    }
    50% {
        height: 16px;
    }
}

/* 当前朗读段落高亮 */
.reading-active {
    background-color: rgba(99, 102, 241, 0.1);
    border-left: 3px solid #6366f1;
    padding-left: 8px;
    margin-left: -11px;
}

/* 文章内容段落高亮 */
.article-content p.reading-active {
    background-color: rgba(99, 102, 241, 0.1);
    border-left: 3px solid #6366f1;
    padding-left: 8px;
    margin-left: -11px;
    border-radius: 0 4px 4px 0;
    transition: background-color 0.3s ease;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .audio-volume-slider {
        width: 60px;
    }
}

@media (max-width: 480px) {
    .audio-buttons {
        flex-wrap: wrap;
    }
    
    .audio-volume-slider {
        width: 50px;
    }
} 