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

        :root {
            --primary: #2563eb;
            --primary-light: #3b82f6;
            --primary-lighter: #dbeafe;
            --bg: #f8fafc;
            --card-bg: #ffffff;
            --text-primary: #0f172a;
            --text-secondary: #64748b;
            --text-tertiary: #94a3b8;
            --border: #e2e8f0;
            --border-light: #f1f5f9;
            --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
            --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
            --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
            --radius-sm: 6px;
            --radius: 12px;
            --radius-lg: 16px;
            --radius-xl: 24px;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', sans-serif;
            background: var(--bg);
            min-height: 100vh;
            color: var(--text-primary);
            line-height: 1.6;
        }

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

        /* Header */
        .header {
            text-align: center;
            margin-bottom: 50px;
            padding-top: 20px;
        }

        .header h1 {
            font-size: 3rem;
            font-weight: 700;
            color: var(--text-primary);
            margin-bottom: 12px;
            letter-spacing: -0.02em;
        }

        .header p {
            font-size: 1.125rem;
            color: var(--text-secondary);
            margin-bottom: 24px;
        }

        .platform-tags {
            display: inline-flex;
            gap: 12px;
            background: var(--card-bg);
            padding: 8px;
            border-radius: 100px;
            box-shadow: var(--shadow-sm);
            border: 1px solid var(--border);
        }

        .tag {
            display: flex;
            align-items: center;
            gap: 6px;
            padding: 8px 16px;
            background: var(--border-light);
            border-radius: 100px;
            font-size: 0.875rem;
            font-weight: 500;
            color: var(--text-secondary);
            transition: all 0.2s;
        }

        .tag:hover {
            background: var(--primary-lighter);
            color: var(--primary);
        }

        .tag-icon {
            font-size: 1.1em;
        }

        /* Main Card */
        .main-card {
            background: var(--card-bg);
            border-radius: var(--radius-xl);
            padding: 48px;
            box-shadow: var(--shadow-lg);
            border: 1px solid var(--border);
        }

        /* Input Section */
        .input-section {
            margin-bottom: 40px;
        }

        .input-wrapper {
            position: relative;
            margin-bottom: 16px;
        }

        #urlInput {
            width: 100%;
            padding: 20px 24px;
            padding-right: 140px;
            border: 2px solid var(--border);
            border-radius: var(--radius-lg);
            font-size: 1rem;
            background: var(--bg);
            transition: all 0.2s;
            color: var(--text-primary);
        }

        #urlInput:focus {
            outline: none;
            border-color: var(--primary);
            background: var(--card-bg);
            box-shadow: 0 0 0 4px var(--primary-lighter);
        }

        #urlInput::placeholder {
            color: var(--text-tertiary);
        }

        #parseBtn {
            position: absolute;
            right: 8px;
            top: 50%;
            transform: translateY(-50%);
            padding: 12px 24px;
            background: var(--primary);
            color: white;
            border: none;
            border-radius: var(--radius);
            font-size: 0.9375rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        #parseBtn:hover:not(:disabled) {
            background: var(--primary-light);
            transform: translateY(-50%) scale(1.02);
        }

        #parseBtn:disabled {
            opacity: 0.6;
            cursor: not-allowed;
        }

        #parseBtn.loading {
            background: var(--text-tertiary);
        }

        .tips {
            display: flex;
            align-items: flex-start;
            gap: 12px;
            padding: 16px 20px;
            background: var(--primary-lighter);
            border-radius: var(--radius);
            color: var(--primary);
            font-size: 0.875rem;
            line-height: 1.6;
        }

        .tips-icon {
            font-size: 1.25rem;
            flex-shrink: 0;
        }

        /* Loading */
        .loading {
            display: none;
            text-align: center;
            padding: 60px 20px;
        }

        .loading.active {
            display: block;
        }

        .spinner {
            width: 48px;
            height: 48px;
            border: 3px solid var(--border);
            border-top-color: var(--primary);
            border-radius: 50%;
            animation: spin 1s linear infinite;
            margin: 0 auto 20px;
        }

        @keyframes spin {
            to { transform: rotate(360deg); }
        }

        .loading p {
            color: var(--text-secondary);
            font-size: 0.9375rem;
        }

        /* Error */
        .error-msg {
            display: none;
            padding: 16px 20px;
            background: #fef2f2;
            border: 1px solid #fecaca;
            border-radius: var(--radius);
            color: #dc2626;
            font-size: 0.9375rem;
            margin-bottom: 24px;
            align-items: center;
            gap: 10px;
        }

        .error-msg.active {
            display: flex;
        }

        /* Result */
        .result {
            display: none;
            animation: fadeIn 0.4s ease;
        }

        .result.active {
            display: block;
        }

        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(10px); }
            to { opacity: 1; transform: translateY(0); }
        }

        /* Content Info */
        .content-info {
            background: var(--bg);
            border-radius: var(--radius-lg);
            padding: 28px;
            margin-bottom: 32px;
            border: 1px solid var(--border);
        }

        .author-row {
            display: flex;
            align-items: center;
            gap: 16px;
            margin-bottom: 20px;
            padding-bottom: 20px;
            border-bottom: 1px solid var(--border);
        }

        .author-avatar {
            width: 56px;
            height: 56px;
            border-radius: 50%;
            object-fit: cover;
            background: var(--border);
            border: 2px solid var(--card-bg);
            box-shadow: var(--shadow-sm);
        }

        .author-meta {
            flex: 1;
        }

        .author-name {
            font-size: 1.125rem;
            font-weight: 600;
            color: var(--text-primary);
            margin-bottom: 4px;
        }

        .platform-badge {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            font-size: 0.8125rem;
            color: var(--text-secondary);
            background: var(--card-bg);
            padding: 4px 12px;
            border-radius: 100px;
            border: 1px solid var(--border);
        }

        .content-text {
            color: var(--text-primary);
            line-height: 1.8;
            font-size: 1rem;
            white-space: pre-wrap;
            word-wrap: break-word;
        }

        .content-text:empty::before {
            content: '暂无文案内容';
            color: var(--text-tertiary);
            font-style: italic;
        }

        /* Resources Grid */
        .resources-section {
            margin-bottom: 32px;
        }

        .section-title {
            font-size: 1.125rem;
            font-weight: 600;
            color: var(--text-primary);
            margin-bottom: 20px;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .resources-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
            gap: 20px;
        }

        .resource-item {
            position: relative;
            border-radius: var(--radius-lg);
            overflow: hidden;
            background: var(--bg);
            aspect-ratio: 3/4;
            cursor: pointer;
            transition: all 0.3s ease;
            border: 1px solid var(--border);
            box-shadow: var(--shadow-sm);
        }

        .resource-item:hover {
            transform: translateY(-4px);
            box-shadow: var(--shadow-lg);
            border-color: var(--primary-lighter);
        }

        .resource-item img,
        .resource-item video {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }

        /* 骨架屏加载动画 */
        .resource-item.skeleton {
            background: linear-gradient(90deg, var(--border) 25%, var(--border-light) 50%, var(--border) 75%);
            background-size: 200% 100%;
            animation: shimmer 1.5s infinite;
        }

        @keyframes shimmer {
            0% { background-position: 200% 0; }
            100% { background-position: -200% 0; }
        }

        .resource-type {
            position: absolute;
            top: 12px;
            right: 12px;
            background: rgba(0, 0, 0, 0.6);
            backdrop-filter: blur(8px);
            color: white;
            padding: 6px 12px;
            border-radius: 100px;
            font-size: 0.75rem;
            font-weight: 500;
            display: flex;
            align-items: center;
            gap: 4px;
        }

        .resource-actions {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            background: linear-gradient(transparent, rgba(0,0,0,0.8));
            padding: 30px 16px 16px;
            opacity: 0;
            transition: opacity 0.3s;
            display: flex;
            gap: 8px;
        }

        .resource-item:hover .resource-actions {
            opacity: 1;
        }

        .btn-icon {
            width: 40px;
            height: 40px;
            border-radius: var(--radius);
            border: none;
            background: rgba(255,255,255,0.9);
            color: var(--text-primary);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s;
            font-size: 1.1rem;
        }

        .btn-icon:hover {
            background: white;
            transform: scale(1.1);
        }

        .btn-download {
            flex: 1;
            background: var(--primary);
            color: white;
            font-size: 0.875rem;
            font-weight: 500;
        }

        .btn-download:hover {
            background: var(--primary-light);
        }

        /* 图片加载错误状态 */
        .resource-item.error {
            background: var(--border);
            display: flex;
            align-items: center;
            justify-content: center;
            flex-direction: column;
            gap: 12px;
            color: var(--text-secondary);
        }

        .error-icon {
            font-size: 3rem;
            opacity: 0.5;
        }

        .error-text {
            font-size: 0.875rem;
        }

        /* Actions Bar */
        .actions-bar {
            display: flex;
            gap: 12px;
            justify-content: center;
            flex-wrap: wrap;
            padding-top: 24px;
            border-top: 1px solid var(--border);
        }

        .action-btn {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 14px 28px;
            border-radius: var(--radius);
            border: none;
            font-size: 0.9375rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
        }

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

        .btn-primary {
            background: var(--primary);
            color: white;
        }

        .btn-primary:hover {
            background: var(--primary-light);
        }

        .btn-secondary {
            background: var(--bg);
            color: var(--text-primary);
            border: 1px solid var(--border);
        }

        .btn-secondary:hover {
            background: var(--border-light);
            border-color: var(--primary-lighter);
        }

        /* History */
        .history-section {
            margin-top: 48px;
            padding-top: 48px;
            border-top: 1px solid var(--border);
        }

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

        .history-title {
            font-size: 1.25rem;
            font-weight: 600;
            color: var(--text-primary);
        }

        .btn-text {
            font-size: 0.875rem;
            color: var(--text-secondary);
            background: none;
            border: none;
            cursor: pointer;
            padding: 8px 12px;
            border-radius: var(--radius-sm);
            transition: all 0.2s;
        }

        .btn-text:hover {
            color: var(--primary);
            background: var(--primary-lighter);
        }

        .history-list {
            display: grid;
            gap: 12px;
        }

        .history-item {
            display: flex;
            align-items: center;
            gap: 16px;
            padding: 16px;
            background: var(--bg);
            border-radius: var(--radius);
            cursor: pointer;
            transition: all 0.2s;
            border: 1px solid transparent;
        }

        .history-item:hover {
            background: var(--card-bg);
            border-color: var(--border);
            box-shadow: var(--shadow-sm);
        }

        .history-thumb {
            width: 72px;
            height: 72px;
            border-radius: var(--radius);
            object-fit: cover;
            background: var(--border);
            flex-shrink: 0;
        }

        .history-info {
            flex: 1;
            min-width: 0;
        }

        .history-text {
            font-weight: 500;
            color: var(--text-primary);
            margin-bottom: 6px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .history-meta {
            font-size: 0.8125rem;
            color: var(--text-secondary);
            display: flex;
            gap: 12px;
        }

        .history-arrow {
            color: var(--text-tertiary);
            font-size: 1.25rem;
        }

        .empty-state {
            text-align: center;
            padding: 48px 20px;
            color: var(--text-tertiary);
        }

        .empty-icon {
            width: 64px;
            height: 64px;
            margin-bottom: 16px;
            opacity: 0.3;
        }

        /* Toast */
        .toast {
            position: fixed;
            top: 24px;
            left: 50%;
            transform: translateX(-50%) translateY(-100px);
            background: var(--text-primary);
            color: white;
            padding: 14px 28px;
            border-radius: 100px;
            font-size: 0.9375rem;
            font-weight: 500;
            opacity: 0;
            transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            z-index: 1000;
            box-shadow: var(--shadow-lg);
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .toast.show {
            transform: translateX(-50%) translateY(0);
            opacity: 1;
        }

        .toast-icon {
            font-size: 1.2em;
        }

        /* Lightbox */
        .lightbox {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0,0,0,0.9);
            z-index: 999;
            align-items: center;
            justify-content: center;
            padding: 20px;
        }

        .lightbox.active {
            display: flex;
        }

        .lightbox img,
        .lightbox video {
            max-width: 90%;
            max-height: 90%;
            border-radius: var(--radius);
        }

        .lightbox-close {
            position: absolute;
            top: 20px;
            right: 20px;
            width: 48px;
            height: 48px;
            border-radius: 50%;
            background: rgba(255,255,255,0.1);
            border: none;
            color: white;
            font-size: 1.5rem;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: background 0.2s;
        }

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

        /* Responsive */
        @media (max-width: 768px) {
            .container {
                padding: 20px 16px;
            }

            .header h1 {
                font-size: 2rem;
            }

            .main-card {
                padding: 24px;
            }

            .resources-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 12px;
            }

            .actions-bar {
                flex-direction: column;
            }

            .action-btn {
                width: 100%;
                justify-content: center;
            }
        }
