/* style.css */

/* ========== CSS 变量 ========== */
:root {
    --google-blue: #4285F4;
    --google-blue-light: #8AB4F8;
    --google-blue-dark: #1967D2;
    --google-blue-50: #E8F0FE;
    --google-blue-100: #D2E3FC;
    --google-blue-200: #AECBFA;
    --google-blue-600: #1A73E8;
    --google-blue-700: #1967D2;
    
    --surface: #FFFFFF;
    --surface-variant: #F8F9FA;
    --on-surface: #202124;
    --on-surface-variant: #5F6368;
    --outline: #DADCE0;
    --outline-variant: #E8EAED;
    
    --glass-bg: rgba(255, 255, 255, 0.9);
    --glass-border: rgba(66, 133, 244, 0.12);
    --glass-shadow: 0 4px 20px rgba(66, 133, 244, 0.06);
    
    --ease-emphasized: cubic-bezier(0.2, 0, 0, 1);
    --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
    --duration-short: 200ms;
    --duration-medium: 300ms;
    --duration-long: 500ms;
    
    --nav-height: 64px;
}

/* ========== 基础样式 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Google Sans', 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    min-height: 100vh;
    min-height: 100dvh;
    background: #FFFFFF;
    color: var(--on-surface);
    overflow-x: hidden;
    line-height: 1.5;
    padding-top: var(--nav-height);
}

/* ========== 导航栏 ========== */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--outline-variant);
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--on-surface);
    font-weight: 700;
    font-size: 20px;
}

.nav-logo .material-symbols-rounded {
    font-size: 28px;
    color: var(--google-blue);
}

.nav-tabs {
    display: flex;
    gap: 8px;
}

.nav-tab {
    padding: 8px 16px;
    border: none;
    background: transparent;
    color: var(--on-surface-variant);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 20px;
    transition: all var(--duration-short);
    font-family: inherit;
}

.nav-tab:hover {
    background: var(--google-blue-50);
    color: var(--google-blue);
}

.nav-tab.active {
    background: var(--google-blue);
    color: white;
}

.nav-menu-btn {
    display: none;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: var(--on-surface);
    cursor: pointer;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
}

/* ========== 移动端菜单 ========== */
.mobile-menu {
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: white;
    border-bottom: 1px solid var(--outline-variant);
    padding: 16px;
    flex-direction: column;
    gap: 8px;
    z-index: 999;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.mobile-menu.active {
    display: flex;
}

.mobile-tab {
    padding: 12px 16px;
    border: none;
    background: transparent;
    color: var(--on-surface);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 12px;
    text-align: left;
    font-family: inherit;
}

.mobile-tab.active {
    background: var(--google-blue-50);
    color: var(--google-blue);
}

/* ========== 主内容 ========== */
.main-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 24px;
    min-height: calc(100vh - var(--nav-height));
}

.page {
    display: none;
    animation: fadeIn var(--duration-medium) var(--ease-emphasized);
}

.page.active {
    display: block;
}

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

/* ========== 首页 Hero ========== */
.hero-section {
    text-align: center;
    padding: 48px 0 32px;
}

.hero-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--google-blue) 0%, var(--google-blue-600) 100%);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    box-shadow: 0 8px 32px rgba(66, 133, 244, 0.3);
}

.hero-icon .material-symbols-rounded {
    font-size: 40px;
    color: white;
}

.hero-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
}

.hero-desc {
    font-size: 16px;
    color: var(--on-surface-variant);
    margin-bottom: 32px;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--duration-short);
    font-family: inherit;
    border: none;
}

.hero-btn.primary {
    background: linear-gradient(135deg, var(--google-blue) 0%, var(--google-blue-600) 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(66, 133, 244, 0.35);
}

.hero-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(66, 133, 244, 0.45);
}

.hero-btn.secondary {
    background: var(--surface);
    color: var(--on-surface);
    border: 2px solid var(--outline);
}

.hero-btn.secondary:hover {
    border-color: var(--google-blue);
    color: var(--google-blue);
    background: var(--google-blue-50);
}

/* ========== 功能卡片 ========== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin-top: 48px;
}

.feature-card {
    padding: 24px;
    background: var(--surface);
    border: 1px solid var(--outline);
    border-radius: 20px;
    text-align: center;
    transition: all var(--duration-short);
}

.feature-card:hover {
    border-color: var(--google-blue-200);
    background: var(--google-blue-50);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(66, 133, 244, 0.12);
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: var(--google-blue-50);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.feature-icon .material-symbols-rounded {
    font-size: 24px;
    color: var(--google-blue);
}

.feature-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.feature-card p {
    font-size: 13px;
    color: var(--on-surface-variant);
    line-height: 1.5;
}

/* ========== 页面头部 ========== */
.page-header {
    margin-bottom: 24px;
    padding-top: 8px;
}

.page-header h2 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.page-header h2 .material-symbols-rounded {
    color: var(--google-blue);
}

.page-header p {
    color: var(--on-surface-variant);
    font-size: 15px;
}

/* ========== 子标签 ========== */
.sub-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    padding: 4px;
    background: var(--surface-variant);
    border-radius: 16px;
    width: fit-content;
}

.sub-tab {
    padding: 10px 20px;
    border: none;
    background: transparent;
    color: var(--on-surface-variant);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 12px;
    transition: all var(--duration-short);
    font-family: inherit;
}

.sub-tab.active {
    background: white;
    color: var(--google-blue);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.encode-panel {
    display: none;
}

.encode-panel.active {
    display: block;
    animation: slideUp var(--duration-medium) var(--ease-emphasized);
}

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

/* ========== 类别选择 ========== */
.category-selector {
    margin-bottom: 20px;
}

.category-chips {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.category-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--surface);
    border: 2px solid var(--outline);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    color: var(--on-surface);
    cursor: pointer;
    transition: all var(--duration-short);
    font-family: inherit;
}

.category-chip .material-symbols-rounded {
    font-size: 20px;
    color: var(--google-blue);
}

.category-chip:hover {
    border-color: var(--google-blue-200);
    background: var(--google-blue-50);
}

.category-chip.active {
    background: var(--google-blue);
    border-color: var(--google-blue);
    color: white;
}

.category-chip.active .material-symbols-rounded {
    color: white;
}

/* ========== QQ群配置 ========== */
.qqgroup-config {
    margin-bottom: 20px;
    padding: 20px;
    background: var(--surface-variant);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ========== WiFi 配置 ========== */
.wifi-config {
    margin-bottom: 20px;
    padding: 20px;
    background: var(--surface-variant);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ========== 卡片样式 ========== */
.card-glass {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: var(--glass-shadow);
}

.input-card {
    padding: 28px;
    margin-bottom: 20px;
}

/* ========== 输入区域 ========== */
.input-wrapper {
    margin-bottom: 20px;
}

.input-label, .section-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--google-blue);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.text-field-container {
    position: relative;
    display: flex;
    align-items: center;
}

.text-field, .text-area, select.text-field {
    width: 100%;
    padding: 16px 48px 16px 18px;
    font-size: 16px;
    border: 2px solid var(--outline);
    border-radius: 16px;
    background: var(--surface);
    color: var(--on-surface);
    transition: all var(--duration-short);
    outline: none;
    font-family: inherit;
}

.text-area {
    padding: 16px 18px;
    resize: vertical;
    min-height: 120px;
    font-family: 'Roboto Mono', monospace;
    font-size: 14px;
    line-height: 1.6;
}

select.text-field {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='%235F6368'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.text-field:hover, .text-area:hover {
    border-color: var(--google-blue-200);
}

.text-field:focus, .text-area:focus {
    border-color: var(--google-blue);
    box-shadow: 0 0 0 4px var(--google-blue-50);
}

.clear-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity var(--duration-short);
}

.text-field-container:hover .clear-btn,
.text-field:focus ~ .clear-btn {
    opacity: 1;
}

.input-hint {
    font-size: 12px;
    color: var(--on-surface-variant);
    margin-top: 8px;
    margin-left: 4px;
}

/* ========== Logo 上传 ========== */
.logo-upload-section {
    margin-bottom: 20px;
    padding: 20px;
    background: var(--surface-variant);
    border-radius: 16px;
    border: 2px dashed var(--outline);
    transition: all var(--duration-short);
}

.logo-upload-section:hover {
    border-color: var(--google-blue-200);
    background: var(--google-blue-50);
}

.logo-upload-area {
    position: relative;
    cursor: pointer;
}

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 24px;
    color: var(--on-surface-variant);
    transition: all var(--duration-short);
}

.upload-placeholder .material-symbols-rounded {
    font-size: 40px;
    color: var(--google-blue);
}

.upload-placeholder span {
    font-size: 15px;
    font-weight: 500;
}

.upload-placeholder small {
    font-size: 12px;
    opacity: 0.7;
}

.logo-preview {
    position: relative;
    display: flex;
    justify-content: center;
    padding: 16px;
}

.logo-preview img {
    max-width: 120px;
    max-height: 120px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.remove-logo-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--outline);
    color: var(--on-surface-variant);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--duration-short);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.remove-logo-btn:hover {
    background: #FEE2E2;
    color: #DC2626;
    transform: scale(1.1);
}

.logo-options {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--outline);
}

.slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--outline);
    outline: none;
    -webkit-appearance: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--google-blue);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(66, 133, 244, 0.4);
}

.slider-value {
    display: inline-block;
    margin-top: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--google-blue);
}

/* ========== 快捷操作 & 按钮 ========== */
.quick-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--surface);
    border: 1px solid var(--outline);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--on-surface);
    cursor: pointer;
    transition: all var(--duration-short);
    font-family: inherit;
}

.chip:hover {
    background: var(--google-blue-50);
    border-color: var(--google-blue-200);
    color: var(--google-blue);
}

.fab-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--google-blue) 0%, var(--google-blue-600) 100%);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(66, 133, 244, 0.35);
    transition: all var(--duration-short);
    font-family: inherit;
}

.fab-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(66, 133, 244, 0.45);
}

/* ========== 结果区域 ========== */
.result-section {
    margin-top: 20px;
    animation: scaleIn var(--duration-medium) var(--ease-emphasized);
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.qr-card {
    padding: 28px;
    text-align: center;
}

.qr-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 20px;
    width: 100%;
    padding-top: 20px;
}

/* 二维码类型标签 - 移到外部避免遮挡 */
.qr-type-badge {
    position: absolute;
    top: 0;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--google-blue);
    color: white;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.4);
    z-index: 10;
    animation: badgeSlideIn 0.3s var(--ease-emphasized);
}

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

.qr-type-badge .material-symbols-rounded {
    font-size: 18px;
}

.qr-container {
    padding: 20px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 200px;
    min-height: 200px;
    position: relative;
    overflow: visible;
}

.qr-container canvas,
.qr-container img {
    display: block;
    max-width: 100%;
    height: auto;
}

.qr-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.95);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--duration-short);
    z-index: 20;
}

.qr-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--google-blue-100);
    border-top-color: var(--google-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.qr-info {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--on-surface-variant);
    background: var(--surface-variant);
    padding: 6px 12px;
    border-radius: 16px;
}

.info-item .material-symbols-rounded {
    font-size: 16px;
    color: var(--google-blue);
}

/* 代码提示 */
.code-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--google-blue-50);
    border: 1px solid var(--google-blue-200);
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 14px;
    color: var(--google-blue);
}

.code-notice .material-symbols-rounded {
    font-size: 20px;
}

/* ========== 尺寸选择 ========== */
.size-selector {
    margin-bottom: 24px;
    text-align: left;
}

.size-chips {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.size-chip {
    padding: 12px 8px;
    background: var(--surface);
    border: 2px solid var(--outline);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--on-surface);
    cursor: pointer;
    transition: all var(--duration-short);
    font-family: inherit;
    line-height: 1.3;
}

.size-chip small {
    font-size: 12px;
    font-weight: 500;
    color: var(--on-surface);
    display: block;
    margin-top: 4px;
    opacity: 0.9;
}

.size-chip:hover {
    border-color: var(--google-blue-200);
    background: var(--google-blue-50);
}

.size-chip.active {
    background: var(--google-blue);
    border-color: var(--google-blue);
    color: white;
}

.size-chip.active small {
    color: rgba(255, 255, 255, 0.9);
}

.custom-size-input {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 12px;
    background: var(--surface-variant);
    border-radius: 12px;
}

.custom-size-input input {
    flex: 1;
    padding: 10px 14px;
    border: 2px solid var(--outline);
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    outline: none;
}

.custom-size-input input:focus {
    border-color: var(--google-blue);
    box-shadow: 0 0 0 3px var(--google-blue-50);
}

/* ========== 操作按钮 ========== */
.action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 12px;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 16px;
    background: var(--surface);
    border: 1px solid var(--outline);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    color: var(--on-surface);
    cursor: pointer;
    transition: all var(--duration-short);
    font-family: inherit;
}

.btn-secondary:hover {
    background: var(--google-blue-50);
    border-color: var(--google-blue-200);
    color: var(--google-blue);
    transform: translateY(-2px);
}

/* ========== 读码页面 ========== */
.decode-card {
    padding: 28px;
}

.decode-upload-area {
    position: relative;
    cursor: pointer;
    margin-bottom: 16px;
}

.decode-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 48px 24px;
    background: var(--surface-variant);
    border: 2px dashed var(--outline);
    border-radius: 20px;
    transition: all var(--duration-short);
}

.decode-placeholder .material-symbols-rounded {
    font-size: 48px;
    color: var(--google-blue);
}

.decode-placeholder span {
    font-size: 16px;
    font-weight: 500;
    color: var(--on-surface);
}

.decode-placeholder small {
    font-size: 13px;
    color: var(--on-surface-variant);
}

.decode-upload-area:hover .decode-placeholder {
    border-color: var(--google-blue);
    background: var(--google-blue-50);
}

.decode-preview {
    position: relative;
    display: flex;
    justify-content: center;
    padding: 20px;
    background: var(--surface-variant);
    border-radius: 20px;
}

.decode-preview img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.remove-decode-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--outline);
    color: var(--on-surface-variant);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--duration-short);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.remove-decode-btn:hover {
    background: #FEE2E2;
    color: #DC2626;
    transform: scale(1.1);
}

/* 粘贴按钮区域 */
.paste-actions {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.paste-btn {
    padding: 10px 20px;
    background: var(--google-blue-50);
    border-color: var(--google-blue-200);
    color: var(--google-blue);
}

.paste-btn:hover {
    background: var(--google-blue);
    color: white;
    border-color: var(--google-blue);
}

.decode-result {
    padding: 20px;
    background: var(--google-blue-50);
    border: 1px solid var(--google-blue-200);
    border-radius: 16px;
    margin-top: 20px;
}

.result-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--google-blue);
    margin-bottom: 12px;
}

.result-content {
    padding: 16px;
    background: white;
    border-radius: 12px;
    font-size: 15px;
    word-break: break-all;
    color: var(--on-surface);
    font-family: 'Roboto Mono', monospace;
    line-height: 1.6;
    max-height: 200px;
    overflow-y: auto;
    white-space: pre-wrap;
}

.result-meta {
    margin-top: 12px;
    font-size: 13px;
    color: var(--on-surface-variant);
}

.result-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.decode-error {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    background: #FEE2E2;
    color: #DC2626;
    border-radius: 12px;
    margin-top: 20px;
}

/* ========== 历史记录 ========== */
.history-section {
    margin-top: 32px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding: 0 4px;
}

.section-header h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 700;
}

.text-button {
    background: none;
    border: none;
    color: var(--google-blue);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all var(--duration-short);
    font-family: inherit;
}

.text-button:hover {
    background: var(--google-blue-50);
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    background: var(--surface);
    border-radius: 16px;
    border: 1px solid var(--outline);
    cursor: pointer;
    transition: all var(--duration-short);
}

.history-item:hover {
    border-color: var(--google-blue-200);
    background: var(--google-blue-50);
    transform: translateX(4px);
}

.history-qr {
    width: 48px;
    height: 48px;
    background: white;
    border-radius: 8px;
    padding: 4px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.history-qr img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 4px;
}

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

.history-url {
    font-size: 14px;
    font-weight: 500;
    color: var(--on-surface);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.history-time {
    font-size: 12px;
    color: var(--on-surface-variant);
}

.history-actions {
    display: flex;
    gap: 6px;
}

.icon-button {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--surface-variant);
    color: var(--on-surface-variant);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--duration-short);
    flex-shrink: 0;
}

.icon-button:hover {
    background: var(--google-blue);
    color: white;
    transform: scale(1.1);
}

/* ========== 关于页面 ========== */
.about-content {
    max-width: 600px;
    margin: 0 auto;
}

.about-card {
    padding: 40px;
    text-align: center;
}

.about-logo {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--google-blue) 0%, var(--google-blue-600) 100%);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.about-logo .material-symbols-rounded {
    font-size: 40px;
    color: white;
}

.about-card h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.about-version {
    color: var(--on-surface-variant);
    font-size: 14px;
    margin-bottom: 8px;
}

.about-desc {
    color: var(--google-blue);
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 32px;
}

.about-features {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 32px;
    text-align: left;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

.about-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    color: var(--on-surface);
}

.about-feature .material-symbols-rounded {
    color: var(--google-blue);
}

/* QQ群信息 */
.about-qq {
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid var(--outline);
}

.about-qq h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--on-surface-variant);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.qq-number {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--google-blue-50);
    border: 2px solid var(--google-blue-200);
    border-radius: 12px;
    font-size: 20px;
    font-weight: 700;
    color: var(--google-blue);
    margin-bottom: 8px;
}

.qq-number .material-symbols-rounded {
    font-size: 24px;
}

.copy-qq-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--google-blue);
    cursor: pointer;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 4px;
}

.copy-qq-btn:hover {
    background: var(--google-blue-100);
}

.qq-desc {
    font-size: 13px;
    color: var(--on-surface-variant);
}

/* ========== 代码预览弹窗 ========== */
.code-preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    background: white;
    border-radius: 24px;
    box-shadow: 0 24px 48px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: modalIn var(--duration-medium) var(--ease-emphasized);
}

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

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--outline);
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--surface-variant);
    color: var(--on-surface-variant);
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--duration-short);
}

.modal-close:hover {
    background: #FEE2E2;
    color: #DC2626;
}

.modal-body {
    flex: 1;
    overflow: hidden;
    background: var(--surface-variant);
}

#codeFrame {
    width: 100%;
    height: 100%;
    min-height: 400px;
    border: none;
    background: white;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-top: 1px solid var(--outline);
    background: var(--surface);
}

.modal-footer-left {
    font-size: 14px;
    color: var(--on-surface-variant);
}

.powered-by a {
    color: var(--google-blue);
    text-decoration: none;
    font-weight: 600;
}

.powered-by a:hover {
    text-decoration: underline;
}

/* ========== Toast ========== */
.toast-container {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
    width: calc(100% - 32px);
    max-width: 400px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: var(--on-surface);
    color: white;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    animation: toastSlideUp var(--duration-medium);
    pointer-events: all;
}

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

.toast.hiding {
    animation: toastSlideDown var(--duration-short) forwards;
}

@keyframes toastSlideDown {
    to { opacity: 0; transform: translateY(20px); }
}

.toast .material-symbols-rounded {
    color: var(--google-blue-light);
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
    .nav-tabs {
        display: none;
    }
    
    .nav-menu-btn {
        display: flex;
    }
    
    .hero-title {
        font-size: 28px;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .category-chips {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .size-chips {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .action-buttons {
        grid-template-columns: 1fr;
    }
    
    .result-actions {
        flex-direction: column;
    }
    
    .modal-content {
        max-height: 95vh;
        border-radius: 16px;
    }
    
    #codeFrame {
        min-height: 300px;
    }
    
    .qr-type-badge {
        right: 10px;
        padding: 6px 10px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 16px;
    }
    
    .input-card, .decode-card, .qr-card {
        padding: 20px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .about-card {
        padding: 28px;
    }
    
    .qq-number {
        font-size: 18px;
        padding: 10px 16px;
    }
    
    .category-chips {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ========== 深色模式 ========== */
@media (prefers-color-scheme: dark) {
    :root {
        --surface: #1F1F1F;
        --surface-variant: #2C2C2C;
        --on-surface: #E8EAED;
        --on-surface-variant: #9AA0A6;
        --outline: #3C4043;
        --glass-bg: rgba(32, 33, 36, 0.95);
    }
    
    body {
        background: #121212;
    }
    
    .top-nav {
        background: rgba(32, 33, 36, 0.95);
        border-bottom-color: #3C4043;
    }
    
    .qr-container {
        background: white;
    }
    
    .mobile-menu {
        background: #1F1F1F;
        border-bottom-color: #3C4043;
    }
    
    .modal-content {
        background: #1F1F1F;
    }
    
    .modal-footer {
        background: #2C2C2C;
        border-top-color: #3C4043;
    }
    
    #codeFrame {
        background: white;
    }
}
