/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #0a0a0a;
    min-height: 100vh;
    padding: 60px 20px;
    position: relative;
}

/* 创建固定背景容器 */
#background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

/* 动态背景效果 */
#background-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(255, 219, 98, 0.2) 0%, transparent 50%);
    z-index: -2;
    animation: gradientShift 15s ease infinite;
}

#background-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(0deg, transparent 24%, rgba(255, 255, 255, .03) 25%, rgba(255, 255, 255, .03) 26%, transparent 27%, transparent 74%, rgba(255, 255, 255, .03) 75%, rgba(255, 255, 255, .03) 76%, transparent 77%, transparent),
        linear-gradient(90deg, transparent 24%, rgba(255, 255, 255, .03) 25%, rgba(255, 255, 255, .03) 26%, transparent 27%, transparent 74%, rgba(255, 255, 255, .03) 75%, rgba(255, 255, 255, .03) 76%, transparent 77%, transparent);
    background-size: 50px 50px;
    z-index: -1;
    animation: gridMove 10s linear infinite;
}

@keyframes gradientShift {
    0% {
        transform: rotate(0deg) scale(1);
        opacity: 0.8;
    }
    50% {
        transform: rotate(180deg) scale(1);
        opacity: 1;
    }
    100% {
        transform: rotate(360deg) scale(1);
        opacity: 0.8;
    }
}

@keyframes gridMove {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(0, 0);
    }
}

/* 粒子容器 */
#particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

/* 添加动态粒子效果 */
.particle {
    position: absolute;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    z-index: -1;
    animation: float 15s infinite linear;
    box-shadow: 0 0 10px 2px rgba(255, 255, 255, 0.2);
}

@keyframes float {
    0% {
        transform: translateY(100vh) translateX(0) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 0.5;
        transform: translateY(80vh) translateX(10px) scale(1);
    }
    90% {
        opacity: 0.5;
        transform: translateY(20vh) translateX(20px) scale(1);
    }
    100% {
        transform: translateY(0vh) translateX(30px) scale(0);
        opacity: 0;
    }
}

/* 主容器 */
.container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 40px;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    text-align: center;
    min-height: calc(100vh - 120px); /* 确保容器有最小高度 */
}

/* 头部样式 */
.header {
    margin-bottom: 30px;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.logo img {
    width: 40px;
    height: 40px;
    margin-right: 10px;
    border-radius: 50%;
}

.logo span {
    font-size: 20px;
    font-weight: bold;
    color: #333;
}

.slogan {
    color: #666;
    font-size: 14px;
}

/* 二维码区域 */
.qrcode-section {
    margin-bottom: 30px;
}

.qrcode-section img {
    width: 150px;
    height: 150px;
    margin-bottom: 10px;
}

.qrcode-section p {
    color: #666;
    font-size: 14px;
}

/* 输入区域 */
.input-section {
    margin-bottom: 30px;
}

.tip {
    background: #fff7e6;
    border: 1px solid #ffcc80;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 15px;
    text-align: left;
    font-size: 14px;
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    background: linear-gradient(135deg,#ffefba,#ffffff);
    box-shadow: 0 3px 10px rgba(0,0,0,.08);
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.tip .tip-text{
    background: #ff4757;
    color: #fff;
    font-weight: 700;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 14px;
    letter-spacing: .5px;
}

.codes {
    font-size: 16px;
    font-weight: 700;
    color: rgb(17, 17, 17);
    background: rgb(255, 255, 255);
    padding: 3px 8px;
    border-radius: 8px;
    margin: 0 6px;
    border: 1px solid rgb(238, 238, 238);
}

#time{
    font-size: 13px;
    color: #555;
}

#video-url {
    width: 100%;
    height: 54px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    margin-bottom: 15px;
    transition: border-color 0.3s;
    padding: 12px !important;
    background: #ffffff !important;
    border: 1px solid #e6eaf2 !important;
    border-radius: 12px !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, .08) !important;
    position: relative;
}

#video-url:focus-visible {
  outline: 2px solid rgba(59, 130, 246, .45);
  outline-offset: 2px;
  border-radius: 12px;
}

#video-url:focus {
    outline: none;
    border-color: #667eea;
}

.buttons {
    display: flex;
    gap: 10px;
}

button {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

#clear-btn {
    background: #f5f5f5;
    color: #666;
}

#clear-btn:hover {
    background: #e0e0e0;
}

#parse-btn {
    background: #667eea;
    color: white;
}

#parse-btn:hover {
    background: #5a67d8;
}

/* 使用教程区域 */
.instruction-section {
    margin-bottom: 30px;
}

.instruction-section h2 {
    color: #333;
    margin-bottom: 15px;
    font-size: 18px;
    text-align: left;
}
.instruction-section p {
     text-align: left;
     padding: 6px 0;
}
.tutorial-image img {
    margin: 16px 0;
    width: 100%;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
}

/* 特性区域 */
.features {
    margin-bottom: 30px;
    color: #888;
    font-size: 14px;
}

/* 底部样式 */
.footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: #888;
    flex-wrap: wrap;
    gap: 10px;
}

.contact {
    display: flex;
    align-items: center;
    gap: 5px;
}

.contact span:last-child {
    color: #667eea;
    font-weight: bold;
}

.partnership {
    display: flex;
    align-items: center;
}

.footer img {
    width: 40px;
    height: 40px;
}

/* 视频播放器样式 */
.video-player-container {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    margin: 30px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.video-info {
    margin-bottom: 15px;
    text-align: left;
}

.video-info h3 {
    color: #333;
    font-size: 18px;
    margin-bottom: 8px;
    margin-top: 0;
}

.video-stats {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: #666;
}

#videoPlayer {
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    background: #000;
}

.download-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.download-btn {
    flex: 1;
    min-width: 120px;
    padding: 12px;
    background: #4caf50;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.download-btn:hover {
    background: #45a049;
}

/* 响应式设计 */
@media (max-width: 480px) {
    .container {
        padding: 20px;
    }
    
    .footer {
        flex-direction: column;
        text-align: center;
    }
    
    .video-stats {
        flex-direction: column;
        gap: 5px;
    }
    
    .download-buttons {
        flex-direction: column;
    }
    
    .download-btn {
        width: 100%;
    }
}