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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 0;
}

header h1 {
    font-size: 2.8rem;
    margin-bottom: 16px;
    color: #2c3e50;
    font-weight: 300;
    letter-spacing: -0.5px;
}

header p {
    font-size: 1.2rem;
    color: #7f8c8d;
    font-weight: 300;
}

main {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    border: 1px solid #e1e8ed;
}

.input-section {
    margin-bottom: 40px;
}

.url-input-container {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

#urlInput {
    flex: 1;
    padding: 16px 24px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 16px;
    outline: none;
    transition: all 0.2s ease;
    background: #fafbfc;
    font-weight: 400;
}

#urlInput:focus {
    border-color: #3498db;
    background: white;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

#parseBtn {
    padding: 16px 32px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    min-width: 120px;
}

#parseBtn:hover {
    background: #2980b9;
    transform: translateY(-1px);
}

#parseBtn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
}

.platform-tips {
    color: #7f8c8d;
    font-size: 14px;
    text-align: center;
    padding: 8px 0;
}

.result-section {
    border-top: 1px solid #e1e8ed;
    padding-top: 32px;
}

.result-section h3 {
    margin-bottom: 24px;
    color: #2c3e50;
    font-size: 1.6rem;
    font-weight: 400;
}

.result-content {
    background: #fafbfc;
    border-radius: 8px;
    padding: 24px;
    border: 1px solid #e1e8ed;
}

.loading-section {
    text-align: center;
    padding: 60px 0;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #ecf0f1;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 24px;
}

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

.loading-section p {
    color: #7f8c8d;
    font-size: 16px;
    font-weight: 300;
}

.error-section {
    background: #ffeaa7;
    border: 1px solid #fdcb6e;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.error-message {
    color: #e17055;
    font-weight: 500;
}

footer {
    text-align: center;
    margin-top: 40px;
    color: #7f8c8d;
    font-size: 14px;
    padding: 20px 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    main {
        padding: 20px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .url-input-container {
        flex-direction: column;
    }
    
    #parseBtn {
        width: 100%;
    }
}

/* 结果样式 */
.result-item {
    margin-bottom: 20px;
    padding: 0;
    background: white;
    border-radius: 8px;
    border: 1px solid #e1e8ed;
    overflow: hidden;
}

.result-item-header {
    padding: 16px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e1e8ed;
}

.result-item-title {
    font-weight: 500;
    color: #2c3e50;
    font-size: 15px;
    margin: 0;
}

.result-item-content {
    padding: 20px;
    color: #34495e;
    word-break: break-all;
}

.result-item-content pre {
    background: #f8f9fa;
    padding: 16px;
    border-radius: 6px;
    overflow-x: auto;
    font-size: 14px;
    margin: 0;
    border: 1px solid #e1e8ed;
}

/* URL链接特殊样式 */
.url-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 12px;
    border: 1px solid #e1e8ed;
}

.url-text {
    flex: 1;
    color: #3498db;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 14px;
    word-break: break-all;
}

.download-btn {
    background: #27ae60;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    margin-left: 12px;
    transition: background 0.2s ease;
    white-space: nowrap;
}

.download-btn:hover {
    background: #219a52;
}

/* 视频特殊样式 */
.video-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.video-player {
    width: 100%;
    max-width: 600px;
    height: 400px;
    border-radius: 8px;
    background: #000;
}

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

.video-info {
    font-size: 14px;
    color: #666;
    text-align: center;
}

/* 图片特殊样式 */
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.image-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e1e8ed;
    background: white;
}

.image-item img {
    width: 100%;
    max-width: 300px;
    height: 200px;
    object-fit: cover;
    display: block;
}

.image-info {
    padding: 12px;
    font-size: 13px;
    color: #7f8c8d;
    border-top: 1px solid #e1e8ed;
    text-align: center;
}

/* JSON数据样式 */
.json-data {
    background: #f8f9fa;
    border: 1px solid #e1e8ed;
    border-radius: 6px;
    padding: 16px;
    margin: 8px 0;
}

.json-key {
    color: #e74c3c;
    font-weight: 500;
}

.json-string {
    color: #27ae60;
}

.json-number {
    color: #3498db;
}

.json-boolean {
    color: #9b59b6;
}