/* assets/common/common.css - 公共样式 */

/* 重置和基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background: linear-gradient(135deg, #0a0a1a 0%, #1a1a3a 100%);
    color: #fff;
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

/* 头部区域 - 粒子动画标题 */
.particle-header {
    position: relative;
    width: 100%;
    height: 300px;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.4));
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
}

.particle-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.header-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    padding: 0 20px;
}

.main-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    background: linear-gradient(45deg, #4a90e2, #ff7e5f, #9b59b6, #2ecc71);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: gradientShift 8s ease infinite;
    margin-bottom: 15px;
    text-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    letter-spacing: 1px;
}

.sub-title {
    font-size: clamp(1.2rem, 3vw, 1.6rem);
    color: rgba(255, 255, 255, 0.9);
    font-weight: 300;
    margin-top: 10px;
    padding: 10px 30px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    animation: float 6s ease-in-out infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* 容器布局 */
.detail-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 标签样式 */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    background: rgba(74, 144, 226, 0.15);
    border: 1px solid rgba(74, 144, 226, 0.3);
    border-radius: 50px;
    font-size: 0.9rem;
    color: #4a90e2;
    font-weight: 500;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(74, 144, 226, 0.2);
}

.badge-orange {
    background: linear-gradient(to right, rgba(255, 126, 95, 0.15), rgba(254, 180, 123, 0.15));
    border-color: rgba(255, 126, 95, 0.3);
    color: #ff7e5f;
}

.badge-purple {
    background: rgba(155, 89, 182, 0.15);
    border-color: rgba(155, 89, 182, 0.3);
    color: #9b59b6;
}

.badge-green {
    background: rgba(46, 204, 113, 0.15);
    border-color: rgba(46, 204, 113, 0.3);
    color: #2ecc71;
}

.badge-yellow {
    background: rgba(241, 196, 15, 0.15);
    border-color: rgba(241, 196, 15, 0.3);
    color: #f1c40f;
}

/* 车站等级徽章 */
.level-badge {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
    margin-left: 8px;
}

.badge-special { background: #ff0000; }
.badge-first-level { background: #e53935; }
.badge-second-level { background: #f57c00; }
.badge-third-level { background: #fbc02d; }
.badge-fourth-level { background: #7cb342; }
.badge-fifth-level { background: #388e3c; }
.badge-meeting-level { background: #039be5; }
.badge-signal-level { background: #5e35b1; }

/* 保护等级徽章 */
.badge-national-level { background: #d32f2f; }
.badge-province-level { background: #f57c00; }
.badge-city-level { background: #fbc02d; }
.badge-no-protection { background: #78909c; }

/* 主内容网格布局 */
.content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

@media (min-width: 992px) {
    .content-grid {
        grid-template-columns: 2fr 1fr;
    }
}

/* 左侧主内容区 */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* 图片展示区 */
.image-section {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.main-image-container {
    width: 100%;
    height: 400px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
    background: rgba(0, 0, 0, 0.2);
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.main-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.main-image:hover {
    transform: scale(1.02);
}

.current-image-info {
    margin-top: 20px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: fadeIn 0.4s ease;
}

.current-image-title {
    font-size: 1.1rem;
    color: white;
    margin-bottom: 8px;
    font-weight: 500;
}

.current-image-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

.current-image-year {
    display: flex;
    align-items: center;
    gap: 5px;
}

.current-image-description {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.thumbnail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

@media (max-width: 768px) {
    .thumbnail-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 12px;
    }
}

.thumbnail-item {
    position: relative;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    height: 80px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.thumbnail-item:hover, .thumbnail-item.active {
    transform: translateY(-2px);
}

.thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 铁路线示意图 */
.railway-diagram {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    margin: 20px 0;
}

.railway-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.railway-title h3 {
    color: #4a90e2;
    font-size: 1.1rem;
    font-weight: 600;
}

.rail-track-container {
    position: relative;
    width: 100%;
    height: 100px;
    margin: 15px 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 统一铁轨样式 - 黑白交替 */
.rail-track {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 10px;
    background: repeating-linear-gradient(
        90deg,
        #000 0px,
        #000 23px,
        #fff 23px,
        #fff 46px
    );
    border-radius: 5px;
    transform: translateY(-50%);
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2),
        0 0 15px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

/* 铁轨发光动画 */
.rail-track::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.8),
        transparent
    );
    animation: trackShine 3s infinite linear;
}

/* 车站标记 */
.current-station-marker {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 1.0rem;
    font-weight: 600;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    animation: pulse 2s infinite;
    z-index: 11;
    border: 2px solid rgba(255, 255, 255, 0.1);
    justify-content: center;
    white-space: nowrap;
    max-width: 90%;
    line-height: 1.2;
    min-height: unset;
}

.current-station-marker:hover {
    transform: translate(-50%, -50%) scale(1.05);
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        0 0 15px currentColor;
}

.current-station-marker.playing {
    background: linear-gradient(135deg, #2ecc71, #4cd964);
    animation: voiceActive 2s ease infinite;
}

.current-station-marker i {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
}

/* 信息卡片 */
.info-card {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    margin-bottom: 20px;
}

.info-card h3 {
    color: #4a90e2;
    font-size: 1.1rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 12px;
}

@media (max-width: 768px) {
    .info-grid {
        grid-template-columns: 1fr;
    }
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.info-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(5px);
}

.info-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    gap: 6px;
}

.info-value {
    font-size: 1rem;
    color: white;
    font-weight: 500;
}

/* 页面信息卡片样式 */
.page-info-card {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 16px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    margin-bottom: 20px;
}

.page-info-card h3 {
    color: #4a90e2;
    font-size: 1.2rem;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-info-header {
    margin-bottom: 20px;
    text-align: center;
}

.page-station-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 5px;
    line-height: 1.3;
}

.page-station-pinyin {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.page-info-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    justify-content: center;
}

.page-info-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-item {
    text-align: center;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.stat-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-3px);
}

.stat-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: #4a90e2;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}

/* 描述区域 */
.description-section {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 16px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.description-section h3 {
    color: #4a90e2;
    font-size: 1.3rem;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.description-content {
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
}

.description-content p {
    margin-bottom: 15px;
    text-align: justify;
}

/* 侧边栏 */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 百度地图容器 */
.map-container {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    height: 300px;
    position: relative;
    overflow: hidden;
}

#baiduMap {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    overflow: hidden;
}

.map-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.5);
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.map-placeholder i {
    font-size: 2.5rem;
    margin-bottom: 10px;
    opacity: 0.5;
}

/* 地图控制按钮 */
.map-controls {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 1000;
}

.map-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    font-size: 0.9rem;
}

.map-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

/* 操作按钮组 */
.action-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 10px;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    backdrop-filter: blur(5px);
    border: none;
    outline: none;
}

.action-btn:hover {
    background: rgba(74, 144, 226, 0.2);
    border-color: #4a90e2;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(74, 144, 226, 0.3);
}

.action-btn i {
    font-size: 1.3rem;
    color: #4a90e2;
}

.action-btn span {
    font-size: 0.85rem;
    font-weight: 500;
}

/* 语音播报状态提示 */
.voice-status {
    position: fixed;
    bottom: 20px;
    left: 20px;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 50px;
    color: white;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(74, 144, 226, 0.3);
    z-index: 9998;
    animation: slideUp 0.5s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.voice-status i {
    color: #4a90e2;
}

/* 语音播报时的页面效果 */
.announcement-active {
    animation: gentlePulse 2s ease-in-out;
}

@keyframes gentlePulse {
    0%, 100% { 
        background: linear-gradient(135deg, #0a0a1a 0%, #1a1a3a 100%);
    }
    50% { 
        background: linear-gradient(135deg, #0f0f25 0%, #2a2a4a 100%);
    }
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 页脚 */
.footer {
    text-align: center;
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.9rem;
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.6s ease forwards;
}

@keyframes trackShine {
    0% { left: -100%; }
    100% { left: 100%; }
}

@keyframes pulse {
    0% { 
        box-shadow: 
            0 5px 20px rgba(0, 0, 0, 0.5),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }
    50% { 
        box-shadow: 
            0 5px 25px currentColor,
            inset 0 1px 0 rgba(255, 255, 255, 0.3),
            0 0 10px currentColor;
    }
    100% { 
        box-shadow: 
            0 5px 20px rgba(0, 0, 0, 0.5),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }
}

@keyframes voiceActive {
    0%, 100% { 
        box-shadow: 
            0 5px 20px rgba(0, 0, 0, 0.5),
            0 0 0 2px rgba(46, 204, 113, 0.2);
    }
    50% { 
        box-shadow: 
            0 5px 25px rgba(46, 204, 113, 0.4),
            0 0 0 3px rgba(46, 204, 113, 0.4);
    }
}

/* 响应式调整 */
@media (max-width: 768px) {
    .particle-header {
        height: 200px;
    }
    
    .detail-container {
        padding: 15px;
    }
    
    .main-image-container {
        height: 300px;
    }
    
    .info-card,
    .image-section,
    .railway-diagram,
    .description-section,
    .map-container,
    .page-info-card {
        padding: 15px;
    }
    
    .action-buttons {
        grid-template-columns: 1fr;
    }
    
    .rail-track-container {
        height: 70px;
    }
    
    .current-station-marker {
        padding: 5px 16px;
        font-size: 0.85rem;
        max-width: 85%;
    }
    
    .current-station-marker i {
        font-size: 0.85rem;
    }
    
    .map-controls {
        top: 10px;
        right: 10px;
    }
    
    .map-btn {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }
    
    .page-info-tags {
        gap: 8px;
    }
    
    .page-station-name {
        font-size: 1.3rem;
    }
    
    .page-info-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .main-title {
        font-size: 1.8rem;
    }
    
    .sub-title {
        font-size: 1rem;
        padding: 8px 20px;
    }
    
    .voice-status {
        bottom: 80px;
        left: 15px;
        right: 15px;
        text-align: center;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .particle-header {
        height: 180px;
    }
    
    .main-image-container {
        height: 250px;
    }
    
    .badge {
        padding: 5px 12px;
        font-size: 0.85rem;
    }
    
    .thumbnail-grid {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    }
    
    .thumbnail-item {
        height: 70px;
    }
    
    .current-station-marker {
        padding: 4px 12px;
        font-size: 0.8rem;
        max-width: 80%;
    }
    
    .current-station-marker i {
        font-size: 0.8rem;
    }
    
    .page-info-stats {
        grid-template-columns: 1fr;
    }
    
    .page-station-name {
        font-size: 1.2rem;
    }
    
    .main-title {
        font-size: 1.5rem;
    }
    
    .sub-title {
        font-size: 0.9rem;
        padding: 6px 15px;
    }
}

/* 百度地图控件隐藏 */
.BMap_cpyCtrl, .anchorBL {
    display: none !important;
}

.BMap_noprint .BMap_stdMpCtrl, .BMap_noprint .BMap_scaleCtrl {
    opacity: 0.7;
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(74, 144, 226, 0.5);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(74, 144, 226, 0.7);
}

/* 触控优化 */
@media (hover: none) and (pointer: coarse) {
    .thumbnail-item,
    .action-btn,
    .map-btn {
        min-height: 44px;
    }
    
    .current-station-marker {
        padding: 8px 20px;
        min-height: 40px;
    }
    
    .current-station-marker:hover {
        transform: translate(-50%, -50%) scale(1);
    }
}