/* 古文通 - 公共样式 */

/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    /* 修改：用您的图片替换背景 */
    background: url('https://s2.imgbb.ws/file/storage-sv2/NCU9N.jpg') center center fixed;
    background-size: cover;
    background-repeat: no-repeat;
    color: #2c3e50;
    line-height: 1.6;
    min-height: 100vh;
    background-attachment: fixed;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
}

/* 波浪装饰背景 */
.wave-bg {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 150px;
    z-index: -1;
    opacity: 0.1;
}

/* 顶部导航栏 */
.main-header {
    background: linear-gradient(135deg, #2c3e50 0%, #4a235a 100%);
    color: white;
    padding: 25px 0;
    text-align: center;
    border-radius: 0 0 30px 30px;
    margin-bottom: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    position: relative;
    overflow: hidden;
}

.main-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #3498db, #9b59b6, #e74c3c);
}

.main-header h1 {
    font-size: 2.8rem;
    margin-bottom: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    position: relative;
    display: inline-block;
}

.main-header h1::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #3498db, #9b59b6);
    border-radius: 2px;
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    font-weight: 300;
    margin-top: 10px;
}

/* 导航菜单 */
.main-nav {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    margin: 30px auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-width: 1100px;
    padding: 5px;
}

.main-nav ul {
    display: flex;
    list-style: none;
    justify-content: center;
    flex-wrap: wrap;
}

.main-nav li {
    flex: 1;
    min-width: 130px;
    margin: 5px;
}

.main-nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px 15px;
    text-decoration: none;
    color: #555;
    font-weight: 500;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.main-nav a i {
    margin-right: 10px;
    font-size: 1.2rem;
    transition: transform 0.3s;
}

.main-nav a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.main-nav a:hover::before {
    left: 100%;
}

.main-nav a:hover {
    color: white;
    background: linear-gradient(135deg, #3498db 0%, #9b59b6 100%);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 20px rgba(52, 152, 219, 0.3);
}

.main-nav a:hover i {
    transform: rotate(15deg) scale(1.1);
}

.main-nav a.active {
    color: white;
    background: linear-gradient(135deg, #2c3e50 0%, #4a235a 100%);
    box-shadow: 0 8px 16px rgba(44, 62, 80, 0.2);
}

/* 主要内容区 */
.main-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.main-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #3498db, #9b59b6, #e74c3c);
}

/* 页面标题 */
.page-title {
    color: #2c3e50;
    font-size: 2.2rem;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 3px solid #3498db;
    position: relative;
    display: inline-block;
}

.page-title i {
    margin-right: 15px;
    color: #9b59b6;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.page-description {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 30px;
    line-height: 1.8;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #3498db;
}

/* 卡片样式 */
.content-card {
    background: linear-gradient(145deg, #ffffff, #f5f7fa);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border: 1px solid rgba(52, 152, 219, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
}

.content-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(52, 152, 219, 0.15);
}

.content-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(to bottom, #3498db, #9b59b6);
}

/* 搜索框样式 */
.search-container {
    display: flex;
    gap: 15px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    min-width: 200px;
    padding: 18px 25px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1.1rem;
    transition: all 0.3s;
    background: white;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.search-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 6px 12px rgba(52, 152, 219, 0.2);
    transform: translateY(-2px);
}

/* 按钮样式 */
.btn {
    padding: 18px 35px;
    background: linear-gradient(135deg, #3498db 0%, #2c3e50 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 30px rgba(52, 152, 219, 0.4);
}

.btn:active {
    transform: translateY(-1px) scale(1.02);
}

.btn-primary {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
}

.btn-success {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
}

.btn-warning {
    background: linear-gradient(135deg, #f39c12 0%, #d68910 100%);
}

.btn-danger {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

/* 结果容器 */
.result-container {
    background: linear-gradient(145deg, #f8f9fa, #e9ecef);
    border-radius: 15px;
    padding: 30px;
    margin-top: 30px;
    border-left: 5px solid #3498db;
    display: none;
    animation: fadeIn 0.8s ease-out;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.05);
}

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

/* 五维网格 */
.dimensions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.dimension-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    transition: all 0.3s;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.dimension-card:hover {
    transform: translateY(-5px);
    border-color: #3498db;
    box-shadow: 0 12px 25px rgba(52, 152, 219, 0.2);
}

.dimension-card i {
    font-size: 2.5rem;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #3498db, #9b59b6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dimension-value {
    font-size: 2.2rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 15px 0;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

/* 时间轴 */
.timeline-container {
    display: flex;
    overflow-x: auto;
    gap: 25px;
    padding: 30px 0;
    scroll-behavior: smooth;
}

.timeline-container::-webkit-scrollbar {
    height: 8px;
}

.timeline-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.timeline-container::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #3498db, #9b59b6);
    border-radius: 10px;
}

.era-card {
    min-width: 250px;
    background: white;
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    transition: all 0.3s;
    position: relative;
}

.era-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 35px rgba(52, 152, 219, 0.2);
}

.era-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #3498db, #9b59b6, #e74c3c);
    border-radius: 15px 15px 0 0;
}

/* 文字显示 */
.character-display {
    font-size: 100px;
    font-family: 'STKaiti', 'KaiTi', 'SimSun', serif;
    margin: 25px 0;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 20px;
    box-shadow: inset 0 4px 8px rgba(0,0,0,0.1);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

/* 文本输入区 */
.textarea-container {
    margin: 25px 0;
}

.textarea-container textarea {
    width: 100%;
    height: 200px;
    padding: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1.1rem;
    line-height: 1.6;
    resize: vertical;
    transition: all 0.3s;
    background: white;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.textarea-container textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 8px 16px rgba(52, 152, 219, 0.15);
}

/* 卡片网格 */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.game-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 3px solid #e0e0e0;
    position: relative;
    overflow: hidden;
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.6s;
}

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

.game-card:hover {
    transform: translateY(-10px) rotate(2deg);
    border-color: #3498db;
    box-shadow: 0 15px 35px rgba(52, 152, 219, 0.2);
}

.game-card.selected {
    border-color: #27ae60;
    background: linear-gradient(145deg, #e8f6ef, #d5efdf);
    transform: translateY(-5px);
}

.game-card .card-type {
    background: linear-gradient(135deg, #3498db, #2c3e50);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    margin-bottom: 15px;
    display: inline-block;
}

/* 使者网格 */
.messengers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.messenger-card {
    background: linear-gradient(145deg, #ffffff, #f5f7fa);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s;
}

.messenger-card:hover {
    transform: translateY(-8px);
}

.messenger-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 8px;
    background: linear-gradient(90deg, #3498db, #9b59b6, #e74c3c);
}

.messenger-header {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
}

.messenger-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    font-size: 2rem;
    color: white;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

.messenger-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.detail-item {
    background: rgba(52, 152, 219, 0.1);
    padding: 15px;
    border-radius: 10px;
    transition: all 0.3s;
}

.detail-item:hover {
    background: rgba(52, 152, 219, 0.2);
    transform: translateX(5px);
}

.detail-item strong {
    color: #2c3e50;
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.detail-item span {
    color: #555;
    font-size: 1rem;
}

/* 页脚 */
.main-footer {
    text-align: center;
    padding: 30px 0;
    color: #666;
    border-top: 1px solid rgba(0,0,0,0.1);
    margin-top: 50px;
    position: relative;
}

.main-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, #3498db, transparent);
}

.footer-links {
    margin-top: 20px;
}

.footer-links a {
    color: #3498db;
    text-decoration: none;
    margin: 0 15px;
    padding: 8px 15px;
    border-radius: 20px;
    transition: all 0.3s;
    position: relative;
}

.footer-links a::after {
    content: '•';
    position: absolute;
    right: -20px;
    color: #ccc;
}

.footer-links a:last-child::after {
    display: none;
}

.footer-links a:hover {
    color: white;
    background: linear-gradient(135deg, #3498db, #2c3e50);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .main-nav ul {
        flex-direction: column;
    }

    .main-nav li {
        width: 100%;
        margin: 5px 0;
    }

    .main-nav a {
        justify-content: flex-start;
        padding-left: 30px;
    }

    .dimensions-grid {
        grid-template-columns: 1fr;
    }

    .cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }

    .messengers-grid {
        grid-template-columns: 1fr;
    }

    .messenger-details {
        grid-template-columns: 1fr;
    }

    .search-container {
        flex-direction: column;
    }

    .character-display {
        font-size: 70px;
        height: 120px;
    }

    .page-title {
        font-size: 1.8rem;
    }

    .main-content {
        padding: 25px;
    }
}

/* 加载动画 */
.loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.loading-dots {
    display: inline-block;
    position: relative;
    width: 80px;
    height: 20px;
}

.loading-dots div {
    position: absolute;
    top: 0;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3498db, #9b59b6);
    animation-timing-function: cubic-bezier(0, 1, 1, 0);
}

.loading-dots div:nth-child(1) {
    left: 8px;
    animation: loading-dots1 0.6s infinite;
}

.loading-dots div:nth-child(2) {
    left: 8px;
    animation: loading-dots2 0.6s infinite;
}

.loading-dots div:nth-child(3) {
    left: 32px;
    animation: loading-dots2 0.6s infinite;
}

.loading-dots div:nth-child(4) {
    left: 56px;
    animation: loading-dots3 0.6s infinite;
}

@keyframes loading-dots1 {
    0% { transform: scale(0); }
    100% { transform: scale(1); }
}

@keyframes loading-dots3 {
    0% { transform: scale(1); }
    100% { transform: scale(0); }
}

@keyframes loading-dots2 {
    0% { transform: translate(0, 0); }
    100% { transform: translate(24px, 0); }
}