/* 首页样式文件 */

/* CSS变量定义 */
:root {
    --primary-color: #6f42c1;
    --primary-hover: #5a359a;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --border-radius: 12px;
    --transition: all 0.3s ease;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 15px rgba(0, 0, 0, 0.2);
}

/* 通用样式 */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    margin: 0;
    padding: 0;
    color: var(--dark-color);
}

.main-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 顶部导航样式 */
.top-nav {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-left .brand-name {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    cursor: pointer;
    transition: var(--transition);
}

.nav-left .brand-name:hover {
    color: var(--primary-hover);
    transform: scale(1.05);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.language-selector select {
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background: white;
    color: var(--dark-color);
    font-size: 0.875rem;
}

.star-coins-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    color: var(--dark-color);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: bold;
    box-shadow: var(--shadow);
}

.star-coins-display i {
    color: #ff6b35;
}

/* 主要内容区域 */
.main-content {
    flex: 1;
    padding: 2rem 0;
}

/* 品牌介绍区域 */
.hero-section {
    text-align: center;
    padding: 4rem 2rem;
    color: white;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.hero-description {
    font-size: 1.1rem;
    opacity: 0.8;
    line-height: 1.6;
}

/* 功能导航区域 */
.features-section {
    padding: 4rem 2rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 3rem;
}

.feature-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(111, 66, 193, 0.1), transparent);
    transition: left 0.5s ease;
}

.feature-card:hover::before {
    left: 100%;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.feature-icon {
    font-size: 3rem;
    color: var(--primary-color);
    flex-shrink: 0;
}

.feature-content {
    flex: 1;
}

.feature-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.feature-description {
    color: var(--secondary-color);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.feature-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.highlight-tag {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.875rem;
    font-weight: 500;
}

.feature-arrow {
    font-size: 1.5rem;
    color: var(--primary-color);
    transition: var(--transition);
}

.feature-card:hover .feature-arrow {
    transform: translateX(5px);
}

/* 特色介绍区域 */
.highlights-section {
    padding: 4rem 2rem;
    background: rgba(255, 255, 255, 0.9);
}

.highlight-item {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
    height: 100%;
}

.highlight-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.highlight-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.highlight-title {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.highlight-description {
    color: var(--secondary-color);
    line-height: 1.6;
}

/* 页脚样式 */
.footer {
    background: rgba(33, 37, 41, 0.95);
    color: white;
    padding: 2rem 0 1rem;
    margin-top: auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.footer-brand .brand-name {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.footer-description {
    opacity: 0.8;
    margin: 0;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: white;
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.7;
}

/* 用户信息弹窗样式 */
.user-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #eee;
}

.user-info-item:last-child {
    border-bottom: none;
}

.user-info-item label {
    font-weight: 500;
    color: var(--secondary-color);
    margin: 0;
}

.user-info-item span {
    font-weight: bold;
    color: var(--dark-color);
}

/* 历史记录侧边栏样式 */
.history-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.history-overlay.active {
    opacity: 1;
    visibility: visible;
}

.history-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100%;
    background: white;
    z-index: 1050;
    transition: var(--transition);
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.history-sidebar.active {
    right: 0;
}

.history-header {
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--light-color);
}

.history-header h5 {
    margin: 0;
    color: var(--primary-color);
    font-weight: bold;
}

.history-content {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.history-item {
    padding: 1rem;
    border: 1px solid #eee;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    cursor: pointer;
    transition: var(--transition);
}

.history-item:hover {
    background: var(--light-color);
    border-color: var(--primary-color);
}

.history-question {
    font-weight: bold;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.history-date {
    font-size: 0.875rem;
    color: var(--secondary-color);
    margin-bottom: 0.25rem;
}

.history-type {
    font-size: 0.875rem;
    color: var(--primary-color);
    font-weight: 500;
}

.history-empty-msg {
    text-align: center;
    color: var(--secondary-color);
    padding: 2rem;
    font-style: italic;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .top-nav {
        padding: 1rem;
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .nav-right {
        gap: 0.5rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.25rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .features-section,
    .highlights-section {
        padding: 2rem 1rem;
    }
    
    .feature-card {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .feature-arrow {
        transform: rotate(90deg);
    }
    
    .feature-card:hover .feature-arrow {
        transform: rotate(90deg) translateX(5px);
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .footer-links {
        justify-content: center;
    }
    
    .history-sidebar {
        width: 100%;
        right: -100%;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 2rem 1rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
    
    .highlight-item {
        padding: 1.5rem;
    }
}