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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(145deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
    min-height: 100vh;
    padding: 16px;
    position: relative;
}

/* 装饰性背景元素 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.15) 0%, transparent 50%);
    pointer-events: none;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 80% 80%, rgba(118, 75, 162, 0.15) 0%, transparent 50%);
    pointer-events: none;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* 主卡片 */
.card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-radius: 48px;
    padding: 28px 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

@media (max-width: 640px) {
    body {
        padding: 12px;
    }
    .card {
        padding: 20px 16px;
        border-radius: 32px;
    }
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.3);
}

/* 头部区域 */
.header {
    text-align: center;
    margin-bottom: 28px;
}

.logo {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 36px;
    box-shadow: 0 10px 25px -5px rgba(102, 126, 234, 0.4);
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.title {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    letter-spacing: -0.3px;
}

@media (max-width: 640px) {
    .title {
        font-size: 24px;
    }
    .logo {
        width: 60px;
        height: 60px;
        font-size: 30px;
        border-radius: 24px;
    }
}

.subtitle {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 16px;
}

.badge-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f3f4f6;
    color: #4b5563;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.badge-primary {
    background: linear-gradient(135deg, #667eea20 0%, #764ba220 100%);
    color: #667eea;
}

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

.input-label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.input-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: #9ca3af;
    pointer-events: none;
}

.input-field {
    width: 100%;
    padding: 16px 16px 16px 48px;
    border: 2px solid #e5e7eb;
    border-radius: 28px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #ffffff;
    font-family: monospace;
    font-size: 13px;
}

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

/* 示例链接提示 */
.example-hint {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 12px;
    background: #f0f4ff;
    border-radius: 20px;
    margin-top: 8px;
}

.example-text {
    font-size: 12px;
    color: #667eea;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.example-link {
    font-family: monospace;
    font-size: 11px;
    background: white;
    padding: 4px 10px;
    border-radius: 20px;
    color: #764ba2;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #d8e0ff;
}

.example-link:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.btn-fill-example {
    background: transparent;
    border: none;
    color: #667eea;
    font-size: 12px;
    cursor: pointer;
    padding: 4px 12px;
    border-radius: 20px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-fill-example:hover {
    background: rgba(102, 126, 234, 0.1);
}

/* 按钮组 */
.button-group {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.btn {
    flex: 1;
    padding: 14px 20px;
    border: none;
    border-radius: 40px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: white;
    color: #4b5563;
    border: 2px solid #e5e7eb;
}

.btn-secondary:hover {
    border-color: #667eea;
    color: #667eea;
    background: #f9fafb;
}

@media (max-width: 640px) {
    .button-group {
        flex-direction: column;
        gap: 10px;
    }
    .btn {
        padding: 12px 16px;
        font-size: 14px;
    }
}

/* 加载动画 */
.loading {
    display: none;
    text-align: center;
    padding: 40px 20px;
    background: #f9fafb;
    border-radius: 32px;
    margin-top: 20px;
}

.loading.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}

.spinner {
    width: 48px;
    height: 48px;
    border: 3px solid #e5e7eb;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

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

.loading-text {
    color: #6b7280;
    font-size: 14px;
}

.loading-sub {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 8px;
}

/* 图片展示区域 */
.image-container {
    display: none;
    margin-top: 24px;
    animation: fadeInUp 0.5s ease;
}

.image-container.show {
    display: block;
}

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

.preview-card {
    background: #f9fafb;
    border-radius: 32px;
    overflow: hidden;
}

.image-preview-wrapper {
    background: linear-gradient(145deg, #1a1a2e 0%, #16213e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    min-height: 320px;
    position: relative;
}

.preview-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: #374151;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    transition: background 0.2s ease, transform 0.2s ease, color 0.2s ease;
    padding-bottom: 4px;
}

.preview-nav-btn:hover {
    background: #fff;
    color: #667eea;
    transform: translateY(-50%) scale(1.05);
}

.preview-nav-prev {
    left: 12px;
}

.preview-nav-next {
    right: 12px;
}

.preview-counter {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    padding: 6px 14px;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(8px);
    color: #f9fafb;
    font-size: 12px;
    font-weight: 600;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    pointer-events: none;
}

.image-preview {
    max-width: 100%;
    max-height: 400px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    object-fit: contain;
    cursor: pointer;
    transition: all 0.3s ease;
}

.image-preview:hover {
    transform: scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
}

/* 水印提示 */
.watermark-badge {
    position: absolute;
    bottom: 16px;
    right: 16px;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    color: #10b981;
    display: flex;
    align-items: center;
    gap: 6px;
    pointer-events: none;
}

.image-info {
    padding: 20px;
    background: white;
    border-top: 1px solid #e5e7eb;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.info-card {
    background: #f9fafb;
    padding: 12px;
    border-radius: 20px;
}

.info-label {
    font-size: 11px;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.info-value {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
}

.info-url {
    background: #f3f4f6;
    padding: 14px;
    border-radius: 20px;
    margin-top: 12px;
    word-break: break-all;
    font-size: 11px;
    font-family: monospace;
    color: #059669;
    line-height: 1.5;
}

.url-list-heading {
    margin-bottom: 10px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #1f2937;
}

.url-list-heading strong {
    font-size: 13px;
    font-weight: 600;
}

.image-url-list {
    list-style: none;
    margin: 0;
    padding: 0;
    counter-reset: url-idx;
}

.image-url-list li {
    counter-increment: url-idx;
    position: relative;
    padding: 10px 10px 10px 2.5rem;
    margin-bottom: 8px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid transparent;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
    line-height: 1.45;
}

.image-url-list li:last-child {
    margin-bottom: 0;
}

.image-url-list li::before {
    content: counter(url-idx);
    position: absolute;
    left: 10px;
    top: 12px;
    transform: none;
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    flex-shrink: 0;
}

.image-url-list li:hover {
    border-color: rgba(102, 126, 234, 0.35);
    background: rgba(255, 255, 255, 0.9);
}

.image-url-list li.is-active {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.08);
    box-shadow: 0 0 0 1px rgba(102, 126, 234, 0.2);
}

.image-url-list-link {
    word-break: break-all;
    font-family: monospace;
    font-size: 11px;
    color: #059669;
}

.action-buttons {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.btn-outline {
    flex: 1;
    padding: 12px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 40px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-outline:hover {
    border-color: #667eea;
    color: #667eea;
    background: #f9fafb;
    transform: translateY(-1px);
}

@media (max-width: 640px) {
    .info-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .action-buttons {
        flex-direction: column;
        gap: 10px;
    }
    .image-preview-wrapper {
        padding: 16px;
        min-height: 260px;
    }
    .preview-nav-btn {
        width: 38px;
        height: 38px;
        font-size: 22px;
    }
    .preview-nav-prev {
        left: 6px;
    }
    .preview-nav-next {
        right: 6px;
    }
    .watermark-badge {
        bottom: 12px;
        right: 12px;
        font-size: 10px;
        padding: 4px 10px;
    }
}

/* 提示消息 */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #1f2937;
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    z-index: 1000;
    opacity: 0;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

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

.toast-success {
    background: linear-gradient(135deg, #10b981, #059669);
}

.toast-error {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.toast-info {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

@media (max-width: 640px) {
    .toast {
        white-space: normal;
        max-width: 85%;
        text-align: center;
        font-size: 13px;
        padding: 10px 20px;
    }
}

/* 页脚 */
.footer {
    text-align: center;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 20px;
    padding: 16px;
}

.footer p {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* 动画 */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* 暗色模式适配 */
@media (prefers-color-scheme: dark) {
    .card {
        background: rgba(30, 30, 45, 0.98);
    }
    .title {
        background: linear-gradient(135deg, #8b9dff, #a885d8);
        -webkit-background-clip: text;
        background-clip: text;
    }
    .subtitle {
        color: #9ca3af;
    }
    .input-field {
        background: #1f1f2e;
        border-color: #374151;
        color: #e5e7eb;
    }
    .input-field:focus {
        border-color: #8b9dff;
    }
    .example-hint {
        background: rgba(102, 126, 234, 0.15);
    }
    .example-text {
        color: #8b9dff;
    }
    .example-link {
        background: #1f1f2e;
        color: #a885d8;
        border-color: #374151;
    }
    .btn-secondary {
        background: #1f1f2e;
        color: #d1d5db;
        border-color: #374151;
    }
    .btn-secondary:hover {
        background: #2d2d44;
        border-color: #8b9dff;
        color: #8b9dff;
    }
    .loading {
        background: #1f1f2e;
    }
    .loading-text {
        color: #9ca3af;
    }
    .preview-card {
        background: #1f1f2e;
    }
    .image-info {
        background: #1a1a2e;
        border-top-color: #374151;
    }
    .info-card {
        background: #252542;
    }
    .info-value {
        color: #e5e7eb;
    }
    .info-url {
        background: #252542;
        color: #6ee7b7;
    }
    .url-list-heading {
        color: #e5e7eb;
    }
    .image-url-list li {
        background: rgba(37, 37, 66, 0.9);
    }
    .image-url-list li:hover {
        background: rgba(45, 45, 68, 0.95);
        border-color: rgba(139, 157, 255, 0.4);
    }
    .image-url-list li.is-active {
        border-color: #8b9dff;
        background: rgba(102, 126, 234, 0.15);
        box-shadow: 0 0 0 1px rgba(139, 157, 255, 0.25);
    }
    .image-url-list-link {
        color: #6ee7b7;
    }
    .preview-nav-btn {
        background: rgba(45, 45, 68, 0.95);
        color: #e5e7eb;
    }
    .preview-nav-btn:hover {
        background: #2d2d44;
        color: #8b9dff;
    }
    .btn-outline {
        background: #1f1f2e;
        border-color: #374151;
        color: #d1d5db;
    }
    .btn-outline:hover {
        background: #2d2d44;
        border-color: #8b9dff;
        color: #8b9dff;
    }
}
