* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.header h1 i {
    color: #ff0050;
    margin-right: 10px;
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.input-section {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 600px;
    margin-bottom: 30px;
}

.input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

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

.url-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.parse-btn {
    padding: 15px 25px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    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;
}

.parse-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

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

.examples {
    text-align: center;
    color: #666;
}

.examples p {
    margin-bottom: 5px;
    font-size: 14px;
}

.examples code {
    background: #f5f5f5;
    padding: 5px 10px;
    border-radius: 5px;
    font-family: monospace;
    color: #e83e8c;
}

.loading {
    text-align: center;
    color: white;
    margin: 40px 0;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255,255,255,0.3);
    border-top: 5px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.result-section {
    width: 100%;
    max-width: 800px;
}

.result-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.result-card h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.result-card h3 i {
    color: #667eea;
}

.video-info {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 20px;
    align-items: start;
}

.video-preview {
    text-align: center;
}

.cover-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 10px;
}

.video-stats {
    display: flex;
    justify-content: space-around;
    font-size: 14px;
    color: #666;
}

.video-stats span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.video-stats i {
    color: #ff0050;
}

.video-details h4 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #333;
}

.video-details p {
    color: #666;
    line-height: 1.5;
    margin-bottom: 15px;
}

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

.video-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.author-details h4 {
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: #333;
}

.author-details p {
    color: #666;
    margin-bottom: 10px;
}

.author-stats {
    display: flex;
    gap: 15px;
    font-size: 14px;
    color: #888;
}

.actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

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

.download-btn {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
}

.copy-btn {
    background: linear-gradient(135deg, #6c757d, #adb5bd);
    color: white;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Webhook数据展示样式 */
.webhook-data {
    margin-top: 20px;
}

.data-section {
    margin-bottom: 25px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.data-section h4 {
    color: #495057;
    margin-bottom: 15px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.data-section h4 i {
    color: #667eea;
}

.json-data {
    background: #2d3748;
    color: #e2e8f0;
    padding: 15px;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.4;
    overflow-x: auto;
    max-height: 300px;
    overflow-y: auto;
}

.fields-grid {
    display: grid;
    gap: 10px;
}

.field-group {
    font-weight: 600;
    color: #495057;
    margin: 10px 0 5px 0;
    padding-left: 10px;
    border-left: 3px solid #667eea;
}

.field-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 8px 12px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
}

.field-item:hover {
    background: #f8f9fa;
    border-color: #667eea;
}

.field-key {
    font-weight: 600;
    color: #495057;
    flex: 0 0 40%;
    word-break: break-all;
}

.field-value {
    color: #6c757d;
    flex: 1;
    text-align: right;
    word-break: break-all;
}

.no-data {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 20px;
}

.error-section {
    text-align: center;
    color: white;
}

.error-card {
    background: rgba(255,255,255,0.1);
    padding: 30px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.error-card i {
    font-size: 3rem;
    color: #ff6b6b;
    margin-bottom: 15px;
}

.error-card h3 {
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.error-card p {
    margin-bottom: 20px;
    opacity: 0.9;
}

.retry-btn {
    padding: 10px 20px;
    background: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.retry-btn:hover {
    background: rgba(255,255,255,0.3);
}

.footer {
    text-align: center;
    margin-top: 40px;
    color: white;
    opacity: 0.8;
    font-size: 14px;
}

.hidden {
    display: none !important;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .input-section {
        padding: 20px;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .video-info {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .cover-image {
        height: 200px;
    }
    
    .author-info {
        flex-direction: column;
        text-align: center;
    }
    
    .actions {
        flex-direction: column;
        align-items: center;
    }
    
    .action-btn {
        width: 200px;
        justify-content: center;
    }
}