* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #1a1a1a;
    min-height: 100vh;
}

.container {
    max-width: 375px; /* 手机端宽度 */
    margin: 0 auto;
    padding: 20px;
    background-color: #2d2d2d;
    min-height: 100vh;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

/* 竖排图片区域样式 */
.vertical-images {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.image-item {
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.image-item:hover {
    transform: translateY(-5px);
}

.image-item img {
    width: 100%;
    height: auto;
    display: block;
}

/* 透明背景图片样式 */
.image-item.transparent {
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
}

.image-item.transparent:hover {
    transform: none;
}

/* 线路检测区域样式 */
.line-detection {
    background: #3a3a3a;
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 1px solid #555;
}

.line-detection-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.line-detection-header h3 {
    color: #ffffff;
    font-size: 18px;
    margin: 0;
}

.refresh-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.refresh-btn:hover {
    background: #0056b3;
}

.refresh-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.line-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.line-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #4a4a4a;
    padding: 15px 20px;
    border-radius: 10px;
    border: 1px solid #666;
}

.line-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.signal-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
}

.signal-bars {
    display: flex;
    gap: 2px;
    align-items: end;
}

.signal-bars .bar {
    width: 4px;
    background: #28a745;
    border-radius: 2px;
    transition: height 0.3s ease;
}

.signal-indicator.good .signal-bars .bar:nth-child(1) { height: 8px; }
.signal-indicator.good .signal-bars .bar:nth-child(2) { height: 12px; }
.signal-indicator.good .signal-bars .bar:nth-child(3) { height: 16px; }

.signal-indicator.medium .signal-bars .bar:nth-child(1) { height: 8px; }
.signal-indicator.medium .signal-bars .bar:nth-child(2) { height: 12px; }
.signal-indicator.medium .signal-bars .bar:nth-child(3) { height: 6px; background: #ffc107; }

.signal-indicator.bad .signal-bars .bar:nth-child(1) { height: 8px; }
.signal-indicator.bad .signal-bars .bar:nth-child(2) { height: 4px; background: #dc3545; }
.signal-indicator.bad .signal-bars .bar:nth-child(3) { height: 2px; background: #dc3545; }

.signal-indicator.testing .signal-bars .bar {
    height: 8px;
    background: #17a2b8;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.latency {
    color: #28a745;
    font-size: 14px;
    font-weight: bold;
}

.signal-indicator.bad .latency {
    color: #dc3545;
}

.signal-indicator.testing .latency {
    color: #17a2b8;
}

.line-name {
    color: #ffffff;
    font-size: 16px;
    font-weight: 500;
}

.play-line-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.play-line-btn:hover {
    background: #0056b3;
}

/* 底部按钮区域样式 */
.bottom-buttons {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 375px;
    max-width: calc(100vw - 40px);
    display: flex;
    flex-direction: row;
    gap: 15px;
    padding: 15px 20px;
    background: transparent;
    z-index: 1000;
}

/* 底部空白区域，避免按钮遮挡内容 */
.bottom-spacer {
    height: 80px;
    width: 100%;
}

.play-btn, .download-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.play-btn {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
}

.play-btn:hover {
    background: linear-gradient(135deg, #0056b3, #004085);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 123, 255, 0.3);
}

.download-btn {
    background: linear-gradient(135deg, #fd7e14, #e55a00);
    color: white;
}

.download-btn:hover {
    background: linear-gradient(135deg, #e55a00, #cc4a00);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(253, 126, 20, 0.3);
}

/* 轮播图容器样式 */
.carousel-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    border: 1px solid #555;
}

.carousel {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
}

.carousel-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.carousel-item.active {
    opacity: 1;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 轮播图指示器 */
.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.indicator.active {
    background-color: #007bff;
}

.indicator:hover {
    background-color: rgba(255, 255, 255, 0.6);
}

/* 轮播图导航按钮 */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    z-index: 10;
}

.carousel-btn:hover {
    background-color: rgba(0, 0, 0, 0.9);
}

.carousel-btn.prev {
    left: 20px;
}

.carousel-btn.next {
    right: 20px;
}

/* 响应式设计 */
@media (max-width: 414px) {
    .container {
        max-width: 100%;
        padding: 10px;
    }
    
    .bottom-buttons {
        width: 100%;
        left: 0;
        transform: none;
        max-width: none;
        padding: 12px 15px;
        gap: 10px;
        flex-direction: row;
    }
    
    .play-btn, .download-btn {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .carousel {
        height: 300px;
    }
    
    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .carousel-btn.prev {
        left: 10px;
    }
    
    .carousel-btn.next {
        right: 10px;
    }
    
    .indicator {
        width: 10px;
        height: 10px;
    }
}

@media (max-width: 480px) {
    .carousel {
        height: 250px;
    }
    
    .carousel-btn {
        width: 35px;
        height: 35px;
        font-size: 18px;
    }
}
