/* 重置和基础样式 */
:root {
    --primary-color: #667eea;
    --primary-dark: #5a67d8;
    --secondary-color: #764ba2;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --light-color: #f8fafc;
    --dark-color: #1e293b;
    --gray-color: #64748b;
    --gray-light: #e2e8f0;
    --border-radius: 16px;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Poppins', 'Noto Sans SC', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: var(--dark-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    animation: fadeIn 0.8s ease-out;
}

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

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes scan {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100%); }
}

/* 头部样式 */
.header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
    animation: slideDown 0.6s ease-out;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    padding: 20px 40px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.logo-icon {
    font-size: 3.5rem;
    color: #ffd700;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
    animation: pulse 2s infinite;
}

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

.domain {
    font-size: 1.2rem;
    opacity: 0.9;
    font-family: 'Courier New', monospace;
    background: rgba(0, 0, 0, 0.2);
    padding: 5px 15px;
    border-radius: 20px;
    display: inline-block;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* 卡片样式 */
.card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.card-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 25px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.card-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
}

.card-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.card-body {
    padding: 30px;
}

/* 类型选择器 */
.type-selector {
    margin-bottom: 30px;
}

.type-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    background: var(--gray-light);
    padding: 8px;
    border-radius: 12px;
}

.type-tab {
    flex: 1;
    min-width: 100px;
    background: transparent;
    border: none;
    border-radius: 8px;
    padding: 15px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: var(--transition);
    color: var(--gray-color);
    font-weight: 500;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
}

.type-tab i {
    font-size: 1.8rem;
    transition: var(--transition);
}

.type-tab:hover {
    background: rgba(255, 255, 255, 0.5);
    color: var(--primary-color);
}

.type-tab.active {
    background: white;
    color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.type-tab.active i {
    color: var(--primary-color);
}

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

.input-group {
    animation: fadeIn 0.5s ease-out;
}

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

.input-header label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: var(--dark-color);
    font-size: 1rem;
}

.input-header label i {
    color: var(--primary-color);
}

.char-count {
    font-size: 0.9rem;
    color: var(--gray-color);
    background: var(--gray-light);
    padding: 4px 12px;
    border-radius: 12px;
}

textarea, input[type="text"], input[type="url"] {
    width: 100%;
    padding: 18px 20px;
    border: 2px solid var(--gray-light);
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
    resize: vertical;
    min-height: 140px;
    background: white;
}

textarea:focus, input[type="text"]:focus, input[type="url"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-hint {
    margin-top: 10px;
    font-size: 0.9rem;
    color: var(--gray-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 文件上传区域 */
.file-drop-zone {
    border: 3px dashed var(--gray-light);
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: white;
    margin-bottom: 20px;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
}

.file-drop-zone:hover, .file-drop-zone.dragover {
    border-color: var(--primary-color);
    background: rgba(102, 126, 234, 0.05);
}

.drop-zone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.drop-zone-content i {
    font-size: 3rem;
    color: var(--primary-color);
}

.drop-zone-content p {
    color: var(--gray-color);
    font-size: 1.1rem;
}

.file-upload-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-block;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
}

.file-upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.file-formats {
    font-size: 0.9rem !important;
    color: var(--gray-color) !important;
    opacity: 0.8;
}

.file-size-info {
    font-size: 0.9rem;
    color: var(--gray-color);
    background: var(--gray-light);
    padding: 4px 12px;
    border-radius: 12px;
}

/* 文件预览 */
.file-preview {
    margin: 20px 0;
}

.file-preview-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 30px;
    color: var(--gray-color);
    background: var(--gray-light);
    border-radius: 12px;
}

.file-preview-placeholder i {
    font-size: 3rem;
    opacity: 0.5;
}

.file-preview-content {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.file-preview-content img, .file-preview-content video {
    width: 100%;
    max-height: 300px;
    object-fit: contain;
    background: #f5f5f5;
}

.file-info {
    padding: 15px;
    background: white;
    border-top: 1px solid var(--gray-light);
}

.file-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px;
    gap: 15px;
}

.file-icon i {
    font-size: 4rem;
    color: var(--primary-color);
}

.file-icon h4 {
    font-size: 1rem;
    color: var(--dark-color);
    text-align: center;
    word-break: break-all;
}

/* 生成按钮 */
.generate-section {
    text-align: center;
    margin-top: 40px;
}

.generate-btn {
    background: linear-gradient(135deg, var(--success-color) 0%, #34d399 100%);
    color: white;
    border: none;
    padding: 20px 50px;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.3);
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
}

.generate-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(16, 185, 129, 0.4);
}

.generate-btn:active {
    transform: translateY(-1px);
}

.loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
    color: var(--dark-color);
}

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--gray-light);
    border-top: 3px solid var(--success-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.generation-tips {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.tip-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--gray-color);
    font-size: 0.9rem;
}

.tip-item i {
    color: var(--success-color);
}

/* 结果展示 */
.card-actions {
    display: flex;
    gap: 10px;
}

.icon-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.qrcode-display {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.qrcode-container {
    text-align: center;
}

.qrcode-wrapper {
    position: relative;
    display: inline-block;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.qrcode-wrapper img {
    width: 250px;
    height: 250px;
    object-fit: contain;
}

.qrcode-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    border-radius: 12px;
    pointer-events: none;
}

.scan-line {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    animation: scan 2s linear infinite;
}

.qrcode-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--gray-color);
}

.qrcode-meta i {
    width: 16px;
    text-align: center;
}

.qrcode-meta code {
    background: var(--gray-light);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
}

.result-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.result-header h3 {
    font-size: 1.8rem;
    color: var(--dark-color);
    margin: 0;
}

.type-badge {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.result-description {
    color: var(--gray-color);
    margin-bottom: 25px;
    line-height: 1.6;
}

/* 内容预览 */
.content-preview, .access-info {
    background: var(--gray-light);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
}

.preview-header, .info-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    color: var(--dark-color);
    font-weight: 600;
}

.preview-header i, .info-header i {
    color: var(--primary-color);
}

.preview-content {
    max-height: 200px;
    overflow-y: auto;
    padding: 15px;
    background: white;
    border-radius: 8px;
    font-size: 0.95rem;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

/* 访问信息 */
.info-content p {
    margin-bottom: 10px;
    color: var(--dark-color);
}

.url-display {
    display: flex;
    gap: 10px;
    align-items: center;
    margin: 15px 0;
    padding: 12px;
    background: white;
    border-radius: 8px;
    border: 1px solid var(--gray-light);
}

.url-display code {
    flex: 1;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    word-break: break-all;
    color: var(--primary-color);
}

.copy-btn {
    background: var(--gray-light);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
}

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

.access-tip {
    font-size: 0.9rem;
    color: var(--gray-color);
    background: white;
    padding: 10px;
    border-radius: 8px;
    border-left: 4px solid var(--success-color);
}

/* 操作按钮 */
.result-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.action-btn {
    flex: 1;
    min-width: 120px;
    padding: 14px 28px;
    border-radius: 12px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
}

.download-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
}

.share-btn {
    background: var(--gray-light);
    color: var(--dark-color);
}

.info-btn {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.action-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* 最近生成记录 */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h3 {
    font-size: 1.3rem;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.refresh-recent {
    background: var(--gray-light);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
}

.refresh-recent:hover {
    background: var(--primary-color);
    color: white;
    transform: rotate(180deg);
}

.recent-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
}

.recent-item {
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    position: relative;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
}

.recent-item:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.2);
}

.recent-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.recent-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(102, 126, 234, 0.1);
    opacity: 0;
    transition: var(--transition);
}

.recent-item:hover::after {
    opacity: 1;
}

.loading-recent {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: var(--gray-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.loading-recent i {
    font-size: 2rem;
}

/* 使用说明 */
.instructions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.instruction-step {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.step-number {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.step-content h4 {
    color: var(--dark-color);
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.step-content p {
    color: var(--gray-color);
    font-size: 0.95rem;
    line-height: 1.5;
}

.feature-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 25px;
}

.feature {
    text-align: center;
    padding: 25px 15px;
    background: var(--gray-light);
    border-radius: 12px;
    transition: var(--transition);
}

.feature:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.feature h4 {
    color: var(--dark-color);
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.feature p {
    color: var(--gray-color);
    font-size: 0.9rem;
}

/* 底部信息 */
.footer {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h4 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-section p {
    margin-bottom: 15px;
    opacity: 0.9;
}

.server-info {
    font-family: 'Courier New', monospace;
    background: rgba(0, 0, 0, 0.2);
    padding: 8px 15px;
    border-radius: 8px;
    display: inline-block;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 12px;
    opacity: 0.9;
}

.footer-section a {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
}

.footer-section a:hover {
    color: #ffd700;
    transform: translateX(5px);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    margin-bottom: 10px;
    opacity: 0.8;
    font-size: 0.95rem;
}

.footer-note {
    font-size: 0.85rem !important;
    opacity: 0.6 !important;
    font-style: italic;
}

/* 提示消息 */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    padding: 15px 25px;
    background: var(--dark-color);
    color: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    z-index: 1000;
    transform: translateX(100px);
    opacity: 0;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 400px;
}

.toast::before {
    content: '';
    width: 4px;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
    border-radius: 12px 0 0 12px;
}

.toast.success {
    background: white;
    color: var(--success-color);
    border-left: 4px solid var(--success-color);
}

.toast.error {
    background: white;
    color: var(--danger-color);
    border-left: 4px solid var(--danger-color);
}

.toast.info {
    background: white;
    color: var(--info-color);
    border-left: 4px solid var(--info-color);
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

/* 模态框 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease-out;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: var(--border-radius);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: slideDown 0.3s ease-out;
}

.modal-header {
    padding: 25px 30px;
    border-bottom: 1px solid var(--gray-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: var(--dark-color);
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--gray-color);
    transition: var(--transition);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
}

.modal-close:hover {
    background: var(--gray-light);
    color: var(--danger-color);
}

.modal-body {
    padding: 30px;
}

.detail-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--gray-light);
}

.detail-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.detail-label {
    font-weight: 600;
    color: var(--dark-color);
    min-width: 100px;
}

.detail-value {
    color: var(--gray-color);
    text-align: right;
    word-break: break-all;
}

.detail-url {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    justify-content: flex-end;
}

.detail-url code {
    background: var(--gray-light);
    padding: 8px 12px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    word-break: break-all;
    color: var(--primary-color);
    flex: 1;
}

/* 安装按钮 */
.install-btn {
    position: fixed;
    bottom: 80px;
    right: 20px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border: none;
    border-radius: 25px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
    z-index: 999;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: slideIn 0.3s ease-out;
    display: none;
}

@keyframes slideIn {
    from { transform: translateX(100px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* 移动端适配 */
@media (max-width: 768px) {
    body {
        padding: 12px;
        font-size: 14px;
    }
    
    .container {
        padding: 0;
        margin: 0 auto;
        max-width: 100%;
        width: 100%;
    }
    
    /* 头部调整 */
    .header {
        margin-bottom: 30px;
        padding: 0 12px;
    }
    
    .logo {
        flex-direction: column;
        text-align: center;
        gap: 15px;
        padding: 20px;
        margin: 0 auto;
        max-width: 100%;
        width: auto;
        border-radius: 20px;
    }
    
    .logo-icon {
        font-size: 2.8rem;
    }
    
    .logo-text h1 {
        font-size: 1.8rem;
        text-align: center;
        margin-bottom: 8px;
    }
    
    .logo .domain {
        font-size: 1rem;
        padding: 4px 12px;
    }
    
    .subtitle {
        font-size: 0.95rem;
        padding: 0 12px;
        line-height: 1.5;
    }
    
    /* 卡片调整 */
    .card {
        margin-bottom: 20px;
        border-radius: 20px;
    }
    
    .card-header {
        padding: 20px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .card-header h2 {
        font-size: 1.3rem;
    }
    
    .card-badge {
        align-self: flex-start;
    }
    
    .card-body {
        padding: 20px;
    }
    
    /* 类型标签调整 */
    .type-tabs {
        flex-direction: column;
        gap: 8px;
        padding: 12px;
        border-radius: 16px;
    }
    
    .type-tab {
        min-width: 100%;
        flex-direction: row;
        justify-content: flex-start;
        padding: 14px 20px;
        border-radius: 12px;
        gap: 12px;
    }
    
    .type-tab i {
        font-size: 1.5rem;
    }
    
    .type-tab span {
        font-size: 1rem;
    }
    
    /* 输入区域调整 */
    .input-section {
        margin-bottom: 25px;
    }
    
    .input-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .input-header label {
        font-size: 1rem;
    }
    
    textarea, input[type="text"], input[type="url"] {
        padding: 16px;
        font-size: 1rem;
        min-height: 120px;
        border-radius: 14px;
    }
    
    .char-count, .file-size-info {
        align-self: flex-start;
        font-size: 0.85rem;
        padding: 3px 10px;
    }
    
    .input-hint {
        font-size: 0.85rem;
        margin-top: 8px;
    }
    
    /* 文件上传区域调整 */
    .file-drop-zone {
        padding: 30px 16px;
        border-radius: 16px;
        margin-bottom: 16px;
    }
    
    .drop-zone-content i {
        font-size: 2.5rem;
    }
    
    .drop-zone-content p {
        font-size: 1rem;
        margin: 8px 0;
    }
    
    .file-upload-btn {
        padding: 14px 28px;
        font-size: 1rem;
        margin: 10px 0;
    }
    
    .file-formats {
        font-size: 0.8rem;
        margin-top: 8px;
    }
    
    /* 文件预览调整 */
    .file-preview {
        margin: 16px 0;
    }
    
    .file-preview-content img,
    .file-preview-content video {
        max-height: 200px;
    }
    
    .file-icon i {
        font-size: 3rem;
    }
    
    .file-icon h4 {
        font-size: 0.95rem;
    }
    
    /* 生成按钮调整 */
    .generate-section {
        margin-top: 30px;
    }
    
    .generate-btn {
        width: 100%;
        padding: 18px;
        font-size: 1.1rem;
        justify-content: center;
        border-radius: 16px;
        min-height: 56px;
    }
    
    .loading-spinner {
        font-size: 0.95rem;
    }
    
    .generation-tips {
        gap: 20px;
        margin-top: 25px;
    }
    
    .tip-item {
        font-size: 0.85rem;
        gap: 8px;
    }
    
    /* 结果展示调整 */
    .qrcode-display {
        grid-template-columns: 1fr;
        gap: 30px;
        margin-bottom: 30px;
    }
    
    .qrcode-wrapper {
        padding: 15px;
    }
    
    .qrcode-wrapper img {
        width: 220px;
        height: 220px;
    }
    
    .qrcode-meta {
        font-size: 0.85rem;
        gap: 6px;
        margin-top: 15px;
    }
    
    .result-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 15px;
    }
    
    .result-header h3 {
        font-size: 1.5rem;
    }
    
    .type-badge {
        align-self: flex-start;
        padding: 4px 12px;
        font-size: 0.9rem;
    }
    
    .result-description {
        font-size: 0.95rem;
        margin-bottom: 20px;
    }
    
    /* 内容预览调整 */
    .content-preview, .access-info {
        padding: 16px;
        margin-bottom: 20px;
        border-radius: 14px;
    }
    
    .preview-header, .info-header {
        font-size: 1rem;
        margin-bottom: 12px;
    }
    
    .preview-content {
        max-height: 180px;
        padding: 12px;
        font-size: 0.95rem;
    }
    
    /* 访问信息调整 */
    .url-display {
        padding: 10px;
        margin: 12px 0;
    }
    
    .url-display code {
        font-size: 0.85rem;
    }
    
    .copy-btn {
        width: 32px;
        height: 32px;
    }
    
    .access-tip {
        font-size: 0.85rem;
        padding: 10px;
        margin-top: 12px;
    }
    
    /* 操作按钮调整 */
    .result-actions {
        flex-direction: column;
        gap: 12px;
    }
    
    .action-btn {
        width: 100%;
        padding: 16px;
        font-size: 1rem;
        border-radius: 14px;
        min-width: auto;
        min-height: 56px;
    }
    
    /* 最近记录调整 */
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        margin-bottom: 15px;
    }
    
    .section-header h3 {
        font-size: 1.2rem;
    }
    
    .recent-list {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
    
    .recent-item img {
        height: 100px;
    }
    
    /* 使用说明调整 */
    .instructions {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 30px;
    }
    
    .instruction-step {
        gap: 15px;
    }
    
    .step-number {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }
    
    .step-content h4 {
        font-size: 1.1rem;
        margin-bottom: 6px;
    }
    
    .step-content p {
        font-size: 0.9rem;
    }
    
    .feature-list {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .feature {
        padding: 20px 15px;
    }
    
    .feature-icon {
        font-size: 2rem;
        margin-bottom: 12px;
    }
    
    .feature h4 {
        font-size: 1.1rem;
        margin-bottom: 8px;
    }
    
    .feature p {
        font-size: 0.9rem;
    }
    
    /* 底部调整 */
    .footer {
        margin-top: 40px;
        padding-top: 30px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        margin-bottom: 25px;
    }
    
    .footer-section {
        text-align: center;
    }
    
    .footer-section h4 {
        font-size: 1.2rem;
        margin-bottom: 15px;
        justify-content: center;
    }
    
    .server-info {
        padding: 6px 12px;
        font-size: 0.9rem;
    }
    
    .footer-section ul li {
        margin-bottom: 10px;
        display: flex;
        justify-content: center;
    }
    
    .footer-section a {
        justify-content: center;
    }
    
    .footer-bottom {
        padding-top: 20px;
    }
    
    .footer-bottom p {
        font-size: 0.85rem;
        line-height: 1.4;
    }
    
    .footer-note {
        font-size: 0.8rem;
        margin-top: 10px;
    }
    
    /* 模态框调整 */
    .modal-content {
        max-width: 90%;
        max-height: 80vh;
        margin: 10px;
    }
    
    .modal-header {
        padding: 20px;
    }
    
    .modal-header h3 {
        font-size: 1.3rem;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .detail-info {
        gap: 15px;
    }
    
    .detail-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        padding-bottom: 15px;
    }
    
    .detail-label {
        min-width: auto;
        font-size: 0.95rem;
    }
    
    .detail-value {
        text-align: left;
        padding-left: 0;
        font-size: 0.95rem;
        width: 100%;
    }
    
    .detail-url {
        width: 100%;
        justify-content: flex-start;
        margin-top: 8px;
    }
    
    /* 提示消息调整 */
    .toast {
        bottom: 20px;
        right: 20px;
        left: 20px;
        transform: none;
        width: auto;
        max-width: none;
        padding: 12px 20px;
    }
    
    .toast.show {
        transform: none;
    }
    
    /* 导航按钮调整 */
    .card-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .icon-btn {
        width: 36px;
        height: 36px;
    }
    
    /* 安装按钮调整 */
    .install-btn {
        bottom: 70px;
        right: 10px;
        padding: 10px 16px;
        font-size: 13px;
    }
}

/* 小屏幕手机优化 */
@media (max-width: 480px) {
    .header {
        margin-bottom: 20px;
    }
    
    .logo {
        padding: 16px;
    }
    
    .logo-text h1 {
        font-size: 1.5rem;
    }
    
    .subtitle {
        font-size: 0.9rem;
    }
    
    .recent-list {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .qrcode-wrapper img {
        width: 200px;
        height: 200px;
    }
    
    .preview-content {
        max-height: 150px;
    }
}

/* 横屏模式优化 */
@media (max-height: 500px) and (orientation: landscape) {
    .container {
        padding: 5px;
    }
    
    .card {
        margin-bottom: 15px;
    }
    
    .card-body {
        padding: 15px;
    }
    
    .content-preview {
        max-height: 120px;
    }
    
    .qrcode-wrapper img {
        width: 180px;
        height: 180px;
    }
    
    .install-btn {
        display: none !important;
    }
}

/* 触屏优化 */
@media (hover: none) {
    .generate-btn:hover,
    .action-btn:hover,
    .btn:hover,
    .type-tab:hover {
        transform: none;
    }
    
    .generate-btn:active,
    .action-btn:active,
    .btn:active,
    .type-tab:active {
        transform: scale(0.98);
    }
    
    .icon-btn:hover {
        transform: none;
    }
    
    .icon-btn:active {
        transform: scale(0.95);
    }
    
    .copy-btn:hover {
        background: var(--gray-light);
        color: inherit;
    }
    
    .copy-btn:active {
        background: var(--primary-color);
        color: white;
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    :root {
        --light-color: #1e293b;
        --dark-color: #f8fafc;
        --gray-color: #94a3b8;
        --gray-light: #334155;
    }
    
    body {
        background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    }
    
    .card {
        background: #0f172a;
        border: 1px solid #334155;
    }
    
    .card-header {
        background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    }
    
    .type-tabs {
        background: #1e293b;
    }
    
    .type-tab {
        color: #94a3b8;
    }
    
    .type-tab.active {
        background: #334155;
        color: #f8fafc;
    }
    
    .type-tab:hover {
        background: #334155;
    }
    
    textarea, input[type="text"], input[type="url"] {
        background: #1e293b;
        border-color: #334155;
        color: #f8fafc;
    }
    
    .file-drop-zone {
        background: #1e293b;
        border-color: #334155;
    }
    
    .file-preview-content {
        background: #1e293b;
    }
    
    .file-info {
        background: #1e293b;
        border-color: #334155;
    }
    
    .content-preview, .access-info {
        background: #1e293b;
        border-color: #334155;
    }
    
    .preview-content {
        background: #0f172a;
        color: #f8fafc;
    }
    
    .url-display {
        background: #0f172a;
        border-color: #334155;
    }
    
    .url-display code {
        background: #1e293b;
        color: #60a5fa;
    }
    
    .access-tip {
        background: #0f172a;
        color: #94a3b8;
    }
    
    .share-btn {
        background: #334155;
        color: #f8fafc;
    }
    
    .info-btn {
        color: #60a5fa;
        border-color: #60a5fa;
    }
    
    .modal-content {
        background: #0f172a;
        color: #f8fafc;
    }
    
    .modal-header h3 {
        color: #f8fafc;
    }
    
    .modal-body {
        color: #f8fafc;
    }
    
    .detail-label {
        color: #f8fafc;
    }
    
    .detail-value {
        color: #94a3b8;
    }
    
    .detail-url code {
        background: #1e293b;
        color: #60a5fa;
    }
    
    .toast.success {
        background: #0f172a;
        color: #34d399;
    }
    
    .toast.error {
        background: #0f172a;
        color: #f87171;
    }
    
    .toast.info {
        background: #0f172a;
        color: #60a5fa;
    }
}

/* 防止iOS橡皮筋效果 */
html {
    height: 100%;
    overflow: hidden;
}

body {
    height: 100%;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

/* 优化iOS输入框 */
input, textarea {
    -webkit-appearance: none;
    border-radius: 0;
}

/* 禁用文本选择（除了可编辑区域） */
* {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

input, textarea, .preview-content, .content-display {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

/* 优化长按菜单 */
* {
    -webkit-touch-callout: none;
}

/* 优化滚动 */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

/* 优化动画性能 */
.card, .type-tab, .btn, .action-btn {
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* 防止页面缩放 */
html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* 响应式图片 */
img {
    max-width: 100%;
    height: auto;
}

/* 加载动画优化 */
.spinner, .fa-spinner {
    animation: spin 1s linear infinite;
}

/* 竖屏模式优化 */
@media (max-width: 768px) and (orientation: portrait) {
    .preview-content {
        max-height: 200px;
    }
}