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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* 导航栏 */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-brand {
    display: flex;
    align-items: center;
    font-size: 24px;
    font-weight: bold;
    color: #667eea;
    text-decoration: none;
}

.nav-brand i {
    margin-right: 10px;
    font-size: 28px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-link {
    color: #666;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-link:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.nav-link.active {
    background: #667eea;
    color: white;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.username {
    font-weight: 600;
    color: #333;
}

.parse-times {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

/* 主要内容 */
.main-content {
    flex: 1;
    padding: 40px 0;
}

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

/* 解析区域 */
.parse-section {
    margin-bottom: 60px;
}

.parse-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.parse-header h1 {
    font-size: 36px;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.parse-header p {
    color: #666;
    font-size: 18px;
    margin-bottom: 40px;
}

.input-group {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.url-input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

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

.parse-btn {
    padding: 15px 30px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.parse-btn:hover {
    transform: translateY(-2px);
}

.parse-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.supported-platforms {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    color: #666;
}

.platform-icons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.platform-tag {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

/* 解析状态 */
.parse-status {
    margin-top: 30px;
    padding: 30px;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 15px;
}

.status-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.loading-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #e1e5e9;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.status-text {
    font-size: 16px;
    color: #667eea;
    font-weight: 500;
}

/* 解析结果 */
.parse-result {
    margin-top: 30px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 15px;
    border: 2px solid rgba(102, 126, 234, 0.2);
}

.video-info {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    align-items: flex-start;
}

.video-cover {
    flex-shrink: 0;
}

.video-cover img {
    width: 200px;
    height: 150px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.video-details {
    flex: 1;
    text-align: left;
}

.video-details h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #333;
}

.video-details p {
    margin-bottom: 8px;
    color: #666;
}

.video-details span {
    color: #333;
    font-weight: 500;
}

.video-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.action-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.play-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.download-btn {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    border: 2px solid #667eea;
}

.action-btn:hover {
    transform: translateY(-2px);
}

/* 视频播放器 */
.player-section {
    margin-bottom: 60px;
}

.player-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.player-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.player-header h3 {
    font-size: 24px;
    color: #333;
}

.close-btn {
    background: rgba(255, 0, 0, 0.1);
    color: #ff4757;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: rgba(255, 0, 0, 0.2);
}

.player-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

#videoPlayer {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* 功能介绍 */
.features-section {
    margin-bottom: 60px;
}

.features-section h2 {
    text-align: center;
    font-size: 32px;
    margin-bottom: 50px;
    color: white;
}

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

.feature-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

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

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.feature-icon i {
    font-size: 32px;
    color: white;
}

.feature-card h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #333;
}

.feature-card p {
    color: #666;
    line-height: 1.6;
}

/* 注册提示 */
.register-prompt {
    margin-bottom: 60px;
}

.prompt-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.prompt-content h3 {
    font-size: 28px;
    margin-bottom: 15px;
    color: #333;
}

.prompt-content p {
    font-size: 18px;
    color: #666;
    margin-bottom: 30px;
}

.prompt-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.btn {
    padding: 15px 30px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.btn-secondary {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    border: 2px solid #667eea;
}

.btn:hover {
    transform: translateY(-2px);
}

/* 卡密兑换 */
.card-section {
    margin-bottom: 60px;
}

.card-exchange {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.card-exchange h3 {
    font-size: 24px;
    margin-bottom: 10px;
    color: #333;
}

.card-exchange p {
    color: #666;
    margin-bottom: 30px;
}

.exchange-form {
    display: flex;
    gap: 15px;
    max-width: 400px;
    margin: 0 auto;
}

.card-input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.card-input:focus {
    outline: none;
    border-color: #667eea;
}

.exchange-btn {
    padding: 15px 25px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.exchange-btn:hover {
    transform: translateY(-2px);
}

/* 页脚 */
.footer {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 40px 0 20px;
    margin-top: auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
}

.footer-info h4 {
    font-size: 20px;
    margin-bottom: 10px;
}

.footer-info p {
    color: rgba(255, 255, 255, 0.7);
}

.footer-links {
    display: flex;
    gap: 30px;
}

.footer-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
}

/* 提示框 */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 10px;
    color: white;
    font-weight: 500;
    z-index: 10000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
}

.toast.show {
    transform: translateX(0);
}

.toast.success {
    background: #27ae60;
}

.toast.error {
    background: #e74c3c;
}

.toast.info {
    background: #3498db;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 15px;
    }
    
    .nav-brand {
        font-size: 20px;
    }
    
    .nav-brand i {
        font-size: 24px;
    }
    
    .user-info {
        gap: 10px;
    }
    
    .parse-card {
        padding: 30px 20px;
    }
    
    .parse-header h1 {
        font-size: 28px;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .video-info {
        flex-direction: column;
        text-align: center;
    }
    
    .video-cover img {
        width: 100%;
        max-width: 300px;
    }
    
    .video-actions {
        flex-direction: column;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .prompt-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .exchange-form {
        flex-direction: column;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .footer-links {
        justify-content: center;
    }
}
