/* macOS风格样式 */
:root {
    /* 浅色主题变量 */
    --bg-primary: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    --bg-secondary: rgba(255, 255, 255, 0.8);
    --bg-card: rgba(255, 255, 255, 0.6);
    --bg-input: #f5f5f7;
    --bg-button: #007aff;
    --bg-button-hover: #0056b3;
    --bg-success: #34c759;
    --bg-danger: rgba(255, 59, 48, 0.1);
    --bg-danger-hover: rgba(255, 59, 48, 0.2);
    
    --text-primary: #1d1d1f;
    --text-secondary: #86868b;
    --text-muted: #333;
    --text-white: white;
    --text-accent: #007aff;
    --text-success: #34c759;
    --text-danger: #ff3b30;
    --text-danger-hover: #d70015;
    
    --border-light: rgba(255, 255, 255, 0.3);
    --border-muted: rgba(0, 0, 0, 0.05);
    --border-input: rgba(0, 0, 0, 0.1);
    
    --shadow-light: rgba(0, 0, 0, 0.1);
    --shadow-medium: rgba(0, 0, 0, 0.2);
    
    /* 添加缺失的accent颜色变量 */
    --accent-color: #007aff;
    --accent-hover: #0056b3;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg-primary);
    min-height: 100vh;
    color: var(--text-muted);
    line-height: 1.6;
    transition: background 0.3s ease, color 0.3s ease;
}

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

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
}

@media (max-width: 768px) {
    .container {
        padding: 16px 12px;
    }
    
    .content-wrapper {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .main-content,
    .fetch-section {
        padding: 16px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    
    .logo-icon {
        width: 40px;
        height: 40px;
    }
    
    .logo-circle {
        width: 20px;
        height: 20px;
    }
    
    .logo-clock {
        height: 6px;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }
    
    .logo-clock::before {
        height: 4px;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) rotate(90deg);
    }
    
    .header-text h1 {
        font-size: 1.5rem;
    }
    
    .subtitle {
        font-size: 0.8rem;
    }
}

/* Header */
.header {
    position: relative;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.02) 0%, rgba(118, 75, 162, 0.02) 100%);
    border-radius: 16px;
    backdrop-filter: blur(10px);
}

.header-content {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* Logo */
.logo {
    flex-shrink: 0;
}

.logo-icon {
    position: relative;
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.logo-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

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

.logo-icon:hover::before {
    left: 100%;
}

.logo-circle {
    width: 24px;
    height: 24px;
    border: 2px solid rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    position: relative;
}

.logo-clock {
    position: absolute;
    width: 2px;
    height: 8px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 1px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transform-origin: center;
    animation: clockTick 2s linear infinite;
}

.logo-clock::before {
    content: '';
    position: absolute;
    width: 1px;
    height: 6px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 0.5px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(90deg);
    transform-origin: center;
}

.logo-share {
    position: absolute;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-bottom: 6px solid rgba(255, 255, 255, 0.8);
    top: -2px;
    right: -2px;
    transform: rotate(45deg);
}

@keyframes clockTick {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Header Text */
.header-text {
    flex: 1;
    min-width: 0;
}

.header-text h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0 0 4px 0;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease-in-out infinite;
    transition: all 0.3s ease;
}

.header-text h1:hover {
    transform: translateX(2px);
    background-size: 300% 300%;
}

.subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 400;
    transition: all 0.3s ease;
    margin: 0;
    line-height: 1.4;
    opacity: 0.8;
    position: relative;
    top: -8px;
}

.subtitle::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 1px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: width 0.3s ease;
}

.header-text:hover .subtitle::before {
    width: 100%;
}

/* Storage Info */
.storage-info {
    margin-top: 12px;
    padding: 10px 12px;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    border: 1px solid var(--border-light);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.storage-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border-muted);
}

.current-ip {
    font-size: 0.75rem;
    color: var(--text-primary);
    font-weight: 500;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    transition: color 0.3s ease;
}

.current-ip span {
    color: var(--text-accent);
    font-weight: 600;
}

.storage-ttl-compact {
    font-size: 0.75rem;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

#ttl-time {
    display: inline-block;
    min-width: 60px;
    text-align: left;
}

/* 历史记录按钮 */
.fetch-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.history-button {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: #86868b;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.history-button:hover {
    background-color: #f5f5f7;
    color: #007aff;
}

.history-button svg {
    width: 18px;
    height: 18px;
}

/* 历史记录弹窗 */
.history-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.history-modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 70vh;
    overflow: hidden;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.history-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid #e5e5e7;
}

.history-modal-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #1d1d1f;
}

.history-close {
    background: none;
    border: none;
    padding: 6px;
    cursor: pointer;
    color: #86868b;
    border-radius: 4px;
    transition: all 0.2s ease;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.history-close:hover {
    background-color: #f5f5f7;
    color: #1d1d1f;
}

.history-close svg {
    width: 16px;
    height: 16px;
}

.history-list {
    max-height: 400px;
    overflow-y: auto;
    padding: 0;
}

.history-item {
    display: grid;
    grid-template-columns: 1fr auto auto auto auto;
    gap: 16px;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid #f5f5f7;
    cursor: pointer;
    transition: background-color 0.2s ease;
    position: relative;
}

.history-item:hover {
    background-color: #f5f5f7;
}

.history-item:last-child {
    border-bottom: none;
}

.history-item-code {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 0.9rem;
    font-weight: 600;
    color: #1d1d1f;
    word-break: break-all;
    min-width: 0;
}

.history-item-type {
    background-color: #007aff;
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
}

.history-item-type.file {
    background-color: #34c759;
}

.history-item-time {
    font-size: 0.8rem;
    color: #86868b;
    font-weight: 500;
    white-space: nowrap;
}

.history-item-delete {
    background: rgba(255, 59, 48, 0.1);
    border: none;
    border-radius: 6px;
    padding: 6px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ff3b30;
}

.history-item:hover .history-item-delete {
    opacity: 1;
    visibility: visible;
}

.history-item-delete:hover {
    background: rgba(255, 59, 48, 0.2);
    color: #d70015;
}

.history-empty {
    padding: 40px 20px;
    text-align: center;
    color: #86868b;
}

/* 历史记录响应式设计 */
@media (max-width: 768px) {
    .history-item {
        grid-template-columns: 1fr auto auto;
        gap: 12px;
        padding: 10px 16px;
    }
    
    .history-item-code {
        font-size: 0.85rem;
    }
    
    .history-item-type {
        font-size: 0.7rem;
        padding: 3px 8px;
    }
    
    .history-item-time {
        font-size: 0.75rem;
    }
    
    .history-item-delete {
        position: absolute;
        right: 16px;
        top: 50%;
        transform: translateY(-50%);
        width: 24px;
        height: 24px;
    }
}

.history-empty p {
    margin: 0;
    font-size: 0.9rem;
}

/* 存储空间列表 */
.storage-list {
    display: flex;
    flex-direction: row;
    gap: 16px;
    align-items: center;
    justify-content: center;
}

/* 存储项目 */
.storage-item {
    background: transparent;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
    padding: 12px 16px;
    flex: 1;
}

.storage-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 悬停时的背景色加深 */
.public-storage:hover {
    background: rgba(33, 150, 243, 0.08);
}

.personal-storage:hover {
    background: rgba(156, 39, 176, 0.08);
}

/* 公用存储空间 - 添加淡蓝色背景 */
.public-storage {
    border-color: rgba(33, 150, 243, 0.3);
    background: rgba(33, 150, 243, 0.05);
}

/* 个人存储空间 - 添加淡紫色背景 */
.personal-storage {
    border-color: rgba(156, 39, 176, 0.3);
    background: rgba(156, 39, 176, 0.05);
}

/* 下载进度条样式 */
.download-progress-container {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    padding: 16px;
    margin: 12px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    animation: slideInDown 0.3s ease-out;
}

.download-progress-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.download-file-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.download-file-info .file-icon {
    width: 20px;
    height: 20px;
    color: #666;
    flex-shrink: 0;
}

.download-file-name {
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 14px;
}

.download-cancel-btn {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    border-radius: 4px;
    color: #666;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.download-cancel-btn:hover {
    background: rgba(255, 59, 48, 0.1);
    color: #ff3b30;
}

.download-cancel-btn svg {
    width: 16px;
    height: 16px;
}

.download-progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.download-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #007aff, #34c759);
    border-radius: 4px;
    width: 0%;
    transition: width 0.3s ease;
    position: relative;
}

.download-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

.download-progress-fill.download-complete {
    background: #34c759;
}

.download-progress-fill.download-error {
    background: #ff3b30;
}

.download-progress-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12px;
    color: #666;
}

.download-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.download-status-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.download-size {
    font-weight: 500;
    color: #333;
}

.download-percentage {
    font-weight: 600;
    color: #333;
    min-width: 40px;
}

.download-speed {
    color: #007aff;
    font-weight: 500;
    min-width: 60px;
    text-align: center;
}

.download-status {
    color: #666;
    min-width: 80px;
    text-align: right;
}

/* 动画效果 */
@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.storage-item-content {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.storage-item-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1d1d1f;
    min-width: 60px;
    flex-shrink: 0;
}

.storage-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.storage-item-usage {
    display: flex;
    align-items: baseline;
    gap: 2px;
    font-size: 0.85rem;
}

.storage-item-value {
    font-size: 0.85rem;
    font-weight: 700;
    color: #007AFF;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
}

.storage-item-separator {
    font-size: 0.8rem;
    font-weight: 500;
    color: #86868b;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
}

.storage-item-total {
    font-size: 0.8rem;
    font-weight: 500;
    color: #1d1d1f;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
}

/* 进度条 */
.storage-item-progress {
    height: 4px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.storage-item-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #007AFF 0%, #5AC8FA 100%);
    border-radius: 2px;
    transition: width 0.3s ease;
    width: 0%;
}

/* 公用存储进度条颜色 */
.public-storage .storage-item-progress-fill {
    background: linear-gradient(90deg, #2196F3 0%, #64B5F6 100%);
}

/* 个人存储进度条颜色 */
.personal-storage .storage-item-progress-fill {
    background: linear-gradient(90deg, #9C27B0 0%, #BA68C8 100%);
}

/* 进度条状态颜色 */
.storage-item-progress-fill.warning {
    background: linear-gradient(90deg, #FF9500 0%, #FFB84D 100%);
}

.storage-item-progress-fill.danger {
    background: linear-gradient(90deg, #FF3B30 0%, #FF6B6B 100%);
}

@media (max-width: 768px) {
    .storage-item {
        padding: 10px 12px;
    }
    
    .storage-item-content {
        gap: 12px;
    }
    
    .storage-item-name {
        min-width: 50px;
        font-size: 0.85rem;
    }
    
    .storage-item-usage {
        font-size: 0.8rem;
    }
}

/* Main Content */
.main-content {
    background: var(--bg-secondary);
    backdrop-filter: blur(20px);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 16px var(--shadow-light);
    border: 1px solid var(--border-light);
    height: fit-content;
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Tab Container */
.tab-container {
    display: flex;
    background: var(--bg-input);
    border-radius: 8px;
    padding: 3px;
    margin-bottom: 20px;
    transition: background 0.3s ease;
}

.tab-button {
    flex: 1;
    padding: 8px 16px;
    border: none;
    background: transparent;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.tab-button.active {
    background: var(--bg-secondary);
    color: var(--text-primary);
    box-shadow: 0 2px 8px var(--shadow-light);
}

.tab-button:hover:not(.active) {
    color: var(--text-primary);
}

.tab-count {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 6px;
    background: var(--accent-color);
    color: white;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    min-width: 18px;
    text-align: center;
    line-height: 1.2;
    transition: all 0.2s ease;
}

.tab-button.active .tab-count {
    background: var(--accent-hover);
}

/* Tab Content */
.tab-content {
    display: none;
    height: 180px; /* 使用固定高度而不是最小高度 */
    overflow: hidden; /* 防止内容溢出 */
}

.tab-content.active {
    display: block;
}

/* Form Groups */
.form-group {
    margin-bottom: 6px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 6px;
    transition: color 0.3s ease;
}

/* Text Input */
#text-input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-input);
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.2s ease, background-color 0.3s ease;
    background: var(--bg-secondary);
    color: var(--text-primary);
    height: 100px; /* 调整高度与文件上传区域匹配 */
}

#text-input:focus {
    outline: none;
    border-color: var(--text-accent);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.char-counter {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 6px;
    transition: color 0.3s ease;
}

.char-counter.warning {
    color: #ff9500;
}

.char-counter.error {
    color: #ff3b30;
}

/* File Upload */
.file-upload-area {
    border: 2px dashed #d2d2d7;
    border-radius: 8px;
    padding: 8px; /* 进一步减少padding */
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
    height: 100px; /* 保持100px高度 */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden; /* 防止内容溢出 */
}

.file-upload-area:hover {
    border-color: #007aff;
    background: #f8f9ff;
}

.file-upload-area.dragover {
    border-color: #007aff;
    background: #f0f7ff;
}

.upload-icon {
    width: 24px; /* 缩小图标 */
    height: 24px;
    color: #86868b;
    margin-bottom: 6px; /* 减少间距 */
}

.file-upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.file-upload-content p {
    margin-bottom: 2px; /* 减少文本间距 */
    color: #1d1d1f;
    font-size: 0.85rem; /* 稍微缩小字体 */
    line-height: 1.2; /* 减少行高 */
}

.file-limit {
    font-size: 0.75rem; /* 缩小字体 */
    color: #86868b;
    margin-top: 2px; /* 减少顶部间距 */
}

.file-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: #f5f5f7;
    border-radius: 8px;
}

.file-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.file-name {
    font-weight: 500;
    color: #1d1d1f;
    font-size: 0.9rem;
}

.file-size {
    font-size: 0.8rem;
    color: #86868b;
}

.remove-file {
    padding: 6px 12px;
    background: #ff3b30;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.remove-file:hover {
    background: #d70015;
}

/* Submit Button */
.submit-button {
    width: 100%;
    padding: 12px;
    background: var(--bg-button);
    color: var(--text-white);
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.submit-button:hover:not(:disabled) {
    background: var(--bg-button-hover);
    transform: translateY(-1px);
}

.submit-button:disabled {
    background: #d2d2d7;
    cursor: not-allowed;
    transform: none;
}

.loading-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Result Container */
.result-container {
    background: #f0f7ff;
    border: 1px solid #007aff;
    border-radius: 8px;
    padding: 16px;
    margin-top: 16px;
}

.result-content h3 {
    color: #007aff;
    margin-bottom: 12px;
    font-size: 1rem;
}

.share-code {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.share-code input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #d2d2d7;
    border-radius: 6px;
    font-size: 0.9rem;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    background: white;
}

.copy-button {
    padding: 8px 16px;
    background: #007aff;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.copy-button:hover {
    background: #0056b3;
}

.expire-info {
    font-size: 0.8rem;
    color: #86868b;
}

/* Fetch Section */
.fetch-section {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    height: fit-content;
}

.fetch-section h2 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 16px;
}

.fetch-input-group {
    display: flex;
    gap: 8px;
}

.fetch-input-group input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #d2d2d7;
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    background: white;
}

.fetch-input-group input:focus {
    outline: none;
    border-color: #007aff;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.fetch-button {
    padding: 10px 16px;
    background: #007aff;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.fetch-button:hover {
    background: #0056b3;
}

/* Fetch Result */
.fetch-result {
    margin-top: 16px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9ff 0%, #e8f2ff 100%);
    border-radius: 12px;
    border: 2px solid #007aff;
    box-shadow: 0 8px 32px rgba(0, 122, 255, 0.15);
    position: relative;
    overflow: hidden;
    opacity: 1;
    transform: translateY(0);
}

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

.fetch-result.animate-in {
    animation: fadeInUp 0.6s ease-out forwards;
}

.fetch-result::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #007aff, #34c759, #ff9500);
    border-radius: 12px 12px 0 0;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    border: 1px solid rgba(0, 122, 255, 0.2);
    backdrop-filter: blur(10px);
}

.content-type {
    font-size: 0.9rem;
    font-weight: 600;
    color: #007aff;
    background: rgba(0, 122, 255, 0.1);
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid rgba(0, 122, 255, 0.3);
}

.content-actions {
    display: flex;
    gap: 8px;
}

.action-button {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #007aff;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-button:hover {
    background: #0056b3;
    transform: translateY(-1px);
}

.action-button svg {
    width: 14px;
    height: 14px;
}

.fetch-content {
    white-space: pre-wrap;
    word-break: break-word;
    font-family: inherit;
    line-height: 1.6;
    background: rgba(255, 255, 255, 0.9);
    padding: 16px;
    border-radius: 8px;
    border: 1px solid rgba(0, 122, 255, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.fetch-content.file-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.file-download {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    border: 1px solid rgba(0, 122, 255, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.file-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 122, 255, 0.15);
}

.file-icon {
    width: 24px;
    height: 24px;
    color: #666;
    flex-shrink: 0;
}

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

.file-name {
    font-weight: 500;
    color: #333;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 96px;
}

.file-size {
    font-size: 0.85rem;
    color: #666;
}

.file-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.download-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #007aff;
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.85rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.download-link:hover {
    background: #0056b3;
    transform: translateY(-1px);
    text-decoration: none;
}

.download-link svg {
    width: 14px;
    height: 14px;
}

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

    .main-content,
    .fetch-section {
        padding: 16px 12px;
    }

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

    .fetch-input-group {
        flex-direction: column;
    }

    .share-code {
        flex-direction: column;
    }
}

/* 微信风格模态框系统 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(0.5px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.modal-overlay.show {
    opacity: 1;
}

.modal-content {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    padding: 12px;
    max-width: 200px;
    width: 85%;
    text-align: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    transform: scale(0.9) translateY(10px);
    transition: all 0.1s ease;
    backdrop-filter: blur(8px);
}

.modal-overlay.show .modal-content {
    transform: scale(1) translateY(0);
}

.modal-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px 0;
}

.modal-message {
    font-size: 12px;
    color: #666;
    line-height: 1.4;
    margin: 0 0 12px 0;
}

.modal-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.modal-button {
    flex: 1;
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.1s ease;
}

.modal-button.primary {
    background: #007aff;
    color: white;
}

.modal-button.primary:hover {
    background: #0056cc;
}

.modal-button.secondary {
    background: #f2f2f7;
    color: #333;
}

.modal-button.secondary:hover {
    background: #e5e5ea;
}

.modal-button.danger {
    background: #ff3b30;
    color: white;
}

.modal-button.danger:hover {
    background: #d70015;
}

/* Toast notifications - 优化为居中显示 */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    padding: 8px 16px;
    border-radius: 6px;
    color: white;
    font-weight: 500;
    font-size: 12px;
    z-index: 10001;
    opacity: 0;
    transition: all 0.15s ease;
    max-width: 180px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(8px);
}

.toast.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.toast.success {
    background: linear-gradient(135deg, rgba(52, 199, 89, 0.8), rgba(48, 209, 88, 0.8));
}

.toast.error {
    background: linear-gradient(135deg, rgba(255, 59, 48, 0.8), rgba(255, 69, 58, 0.8));
}

.toast.info {
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.8), rgba(90, 200, 250, 0.8));
}

/* File upload progress */
.file-status {
    margin-top: 8px;
}

.upload-progress {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background-color: #e5e5ea;
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: #007aff;
    border-radius: 3px;
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.85rem;
    color: #666;
    text-align: center;
}

.upload-success {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #34c759;
    font-size: 0.85rem;
    font-weight: 500;
}

.success-icon {
    width: 16px;
    height: 16px;
    stroke: #34c759;
}

/* 预览模态框样式 */
.preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    padding: 20px;
}

.preview-content {
    background: white;
    border-radius: 12px;
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e5e5e7;
    background: #f8f9fa;
}

.preview-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1d1d1f;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.close-preview {
    background: none;
    border: none;
    font-size: 24px;
    color: #86868b;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.close-preview:hover {
    background: #e5e5e7;
    color: #1d1d1f;
}

.preview-body {
    padding: 20px;
    overflow: auto;
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 文件操作按钮样式 */
.preview-file-btn {
    background: #007AFF;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    margin-right: 8px;
}

.preview-file-btn:hover {
    background: #0056CC;
    transform: translateY(-1px);
}

.preview-file-btn svg {
    width: 16px;
    height: 16px;
}

.download-file-btn {
    background: #34C759;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.download-file-btn:hover {
    background: #28A745;
    transform: translateY(-1px);
}

.download-file-btn svg {
    width: 16px;
    height: 16px;
}

/* 阅后即焚选项样式 - 简约内联设计 */
.burn-option {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.burn-option input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    cursor: pointer;
}

.burn-option label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    cursor: pointer;
    margin: 0;
    transition: color 0.2s ease;
}

.burn-option input[type="checkbox"]:checked + label {
    color: #ff6b6b;
    font-weight: 500;
}

/* 文件选项区域样式 */
.file-options {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.file-options .remove-file {
    margin: 0;
    padding: 6px 12px;
    font-size: 0.8rem;
}

/* 文件分享的阅后即焚选项样式 */
.file-burn-option {
    margin-top: 12.5px; /* 从6px增加到10px，往下一点点 */
    padding-top: 0; /* 保持0，减少间距 */
    border-top: none; /* 取消上面的线 */
}

.file-burn-option .burn-option {
    margin: 0;
}

/* 阅后即焚内容特殊样式 */
.burn-after-reading {
    border: 2px solid #ff6b6b !important;
    background: linear-gradient(135deg, #fff5f5 0%, #ffe6e6 100%) !important;
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.3) !important;
    position: relative;
}

.burn-after-reading::before {
    content: "🔥 阅后即焚内容";
    position: absolute;
    top: -12px;
    left: 12px;
    background: #ff6b6b;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    z-index: 10;
}

.burn-warning {
    color: #d63031 !important;
    font-weight: bold !important;
    background: rgba(255, 107, 107, 0.1) !important;
    padding: 8px 12px !important;
    border-radius: 6px !important;
    border-left: 4px solid #ff6b6b !important;
    margin-top: 8px !important;
}

/* 代码预览样式 */
.preview-title {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8f9fa;
}

.preview-header-left {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0; /* 允许flex子元素收缩 */
}

.preview-header-right {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.preview-filename {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex-shrink: 0;
}

.language-badge {
    background: linear-gradient(135deg, #007aff, #5ac8fa);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 2px 4px rgba(0, 122, 255, 0.3);
    margin-left: 8px;
    flex-shrink: 0;
}

.copy-btn {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

.copy-btn:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.4);
}

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

.copy-btn.copied {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.code-container {
    background: #2d3748;
    border-radius: 8px;
    overflow: hidden;
    margin: 0;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.code-preview {
    background: #2d3748 !important;
    padding: 20px !important;
    margin: 0 !important;
    border-radius: 0 !important;
    overflow: auto !important;
    max-height: 70vh !important;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'Courier New', monospace !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
    color: #e2e8f0 !important;
    border: none !important;
}

.code-preview code {
    background: transparent !important;
    padding: 0 !important;
    border-radius: 0 !important;
    font-family: inherit !important;
    font-size: inherit !important;
    color: inherit !important;
}

/* Prism.js 主题覆盖 - 使用深色主题 */
.code-preview .token.comment,
.code-preview .token.prolog,
.code-preview .token.doctype,
.code-preview .token.cdata {
    color: #6a9955 !important;
}

.code-preview .token.punctuation {
    color: #d4d4d4 !important;
}

.code-preview .token.property,
.code-preview .token.tag,
.code-preview .token.boolean,
.code-preview .token.number,
.code-preview .token.constant,
.code-preview .token.symbol,
.code-preview .token.deleted {
    color: #b5cea8 !important;
}

.code-preview .token.selector,
.code-preview .token.attr-name,
.code-preview .token.string,
.code-preview .token.char,
.code-preview .token.builtin,
.code-preview .token.inserted {
    color: #ce9178 !important;
}

.code-preview .token.operator,
.code-preview .token.entity,
.code-preview .token.url,
.code-preview .language-css .token.string,
.code-preview .style .token.string {
    color: #d4d4d4 !important;
}

.code-preview .token.atrule,
.code-preview .token.attr-value,
.code-preview .token.keyword {
    color: #569cd6 !important;
}

/* 覆盖 Prism.js 的 text-shadow 样式 */
.code-preview code[class*=language-],
.code-preview pre[class*=language-] {
    text-shadow: none !important;
}

.code-preview .token.function,
.code-preview .token.class-name {
    color: #dcdcaa !important;
}

.code-preview .token.regex,
.code-preview .token.important,
.code-preview .token.variable {
    color: #d16969 !important;
}

/* 行号样式（如果启用） */
.code-preview .line-numbers .line-numbers-rows {
    border-right: 1px solid #4a5568 !important;
}

.code-preview .line-numbers-rows > span:before {
    color: #718096 !important;
}

/* 滚动条样式 */
.code-preview::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.code-preview::-webkit-scrollbar-track {
    background: #1a202c;
    border-radius: 4px;
}

.code-preview::-webkit-scrollbar-thumb {
    background: #4a5568;
    border-radius: 4px;
}

.code-preview::-webkit-scrollbar-thumb:hover {
    background: #718096;
}

/* 纯文本文件样式（无代码高亮） */
.code-preview:not(.language-javascript):not(.language-python):not(.language-java):not(.language-cpp):not(.language-php):not(.language-ruby):not(.language-go):not(.language-rust):not(.language-html):not(.language-css):not(.language-sql):not(.language-json):not(.language-yaml):not(.language-markdown):not(.language-dockerfile) {
    background: #f8f9fa !important;
    color: #2d3748 !important;
}

.code-preview:not(.language-javascript):not(.language-python):not(.language-java):not(.language-cpp):not(.language-php):not(.language-ruby):not(.language-go):not(.language-rust):not(.language-html):not(.language-css):not(.language-sql):not(.language-json):not(.language-yaml):not(.language-markdown):not(.language-dockerfile) code {
    color: #2d3748 !important;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .code-preview {
        font-size: 12px !important;
        padding: 16px !important;
    }
    
    .language-badge {
        font-size: 10px;
        padding: 3px 6px;
    }
    
    .preview-title {
        gap: 8px;
    }
}

