/* ===== QR Code Generator - 极致拟态 Pro 版 ===== */
:root {
    --primary-500: #8b5cf6; --primary-600: #7c3aed; --primary-700: #6d28d9;
    --secondary-500: #ec4899; --secondary-600: #db2777;
    --accent-blue: #0ea5e9;
    --bg-gradient-start: #e0f2fe; --bg-gradient-middle: #f0f9ff; --bg-gradient-end: #fdf4ff;
    --surface-01: rgba(255, 255, 255, 0.9); --surface-02: rgba(255, 255, 255, 0.7);
    --text-primary: #1f2937; --text-secondary: #4b5563; --text-tertiary: #6b7280;
    --border-light: rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1); --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.dark-mode {
    --bg-gradient-start: #1e1b4b; --bg-gradient-middle: #1e293b; --bg-gradient-end: #312e81;
    --surface-01: rgba(30, 41, 59, 0.85); --surface-02: rgba(30, 41, 59, 0.6);
    --text-primary: #f9fafb; --text-secondary: #e5e7eb; --text-tertiary: #d1d5db;
    --border-light: rgba(255, 255, 255, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4); --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, var(--bg-gradient-start), var(--bg-gradient-middle), var(--bg-gradient-end));
    color: var(--text-primary); transition: all 0.5s ease; overflow-x: hidden;
}

/* 动态背景 */
.grid-background { position: fixed; inset: 0; z-index: -3; opacity: 0.05; background-image: radial-gradient(circle at 20% 30%, var(--primary-500) 0%, transparent 15%), radial-gradient(circle at 80% 70%, var(--secondary-500) 0%, transparent 15%), radial-gradient(circle at 40% 80%, var(--accent-blue) 0%, transparent 15%); }
.geometric-shapes { position: fixed; inset: 0; z-index: -2; opacity: 0.15; }
.shape { position: absolute; opacity: 0.2; background: linear-gradient(45deg, var(--primary-500), var(--secondary-500)); animation: shapeFloat 20s infinite linear; }
.shape:nth-child(1) { width: 300px; height: 300px; border-radius: 30% 70% 70% 30%/30% 30% 70% 70%; top: -100px; left: -100px; }
.shape:nth-child(2) { width: 400px; height: 400px; border-radius: 50%; bottom: -150px; right: -100px; animation-delay: -5s; }
.shape:nth-child(3) { width: 200px; height: 200px; border-radius: 60% 40% 30% 70%; top: 40%; left: 80%; animation-delay: -10s; }
@keyframes shapeFloat { 100% { transform: translate(100px, 50px) rotate(360deg); } }

/* 头部图标 */
.icon-container { width: 80px; height: 80px; }
.icon-glow { position: absolute; inset: -5px; background: linear-gradient(45deg, var(--primary-500), var(--secondary-500)); border-radius: 20px; filter: blur(15px); opacity: 0.6; animation: glowRotate 8s linear infinite; }
.icon-container i { background: linear-gradient(135deg, var(--primary-500), var(--secondary-500)); color: white; width: 100%; height: 100%; border-radius: 20px; display: flex; justify-content: center; align-items: center; z-index: 2; box-shadow: var(--shadow-lg); }
@keyframes glowRotate { 100% { transform: rotate(360deg); } }
.title { font-size: clamp(2.5rem, 5vw, 3rem); font-weight: 800; background: linear-gradient(135deg, var(--primary-600), var(--secondary-600), var(--accent-blue)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; letter-spacing: -1px; }
.badge-item { background: var(--surface-01); padding: 8px 18px; border-radius: 24px; font-size: 0.85rem; font-weight: 600; border: 1px solid var(--border-light); box-shadow: 0 2px 5px rgba(0,0,0,0.05); }

/* 主题按钮 */
.theme-toggle { top: 24px; right: 24px; width: 52px; height: 52px; background: var(--surface-01); backdrop-filter: blur(10px); border: 1px solid var(--border-light); cursor: pointer; color: var(--text-secondary); transition: 0.3s ease; }
.theme-toggle:hover { transform: scale(1.1) rotate(15deg); border-color: var(--primary-500); color: var(--primary-600); }

/* 卡片 */
.custom-glass-card { background: var(--surface-01); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid var(--border-light); border-radius: 24px; transition: 0.4s; box-shadow: var(--shadow-lg); }
.card-glow { position: absolute; inset: -2px; background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(236, 72, 153, 0.1)); z-index: -1; opacity: 0; transition: 0.4s; border-radius: 26px; }
.custom-glass-card:hover .card-glow { opacity: 1; }

/* 输入表单体系 */
.custom-input { width: 100%; padding: 14px 16px; border: 1px solid var(--border-light); border-radius: 16px; background: var(--surface-02); color: var(--text-primary); font-size: 1rem; outline: none; transition: 0.3s; }
.custom-input:focus { border-color: var(--primary-500); box-shadow: 0 0 0 4px rgba(139,92,246,0.15); background: var(--surface-01); }

/* File Upload 专属定制 */
input[type="file"].custom-input { padding: 8px 16px; cursor: pointer; }
input[type="file"]::file-selector-button { background: linear-gradient(135deg, var(--primary-500), var(--secondary-500)); color: white; border: none; padding: 6px 16px; border-radius: 8px; margin-right: 12px; font-weight: 600; cursor: pointer; transition: all 0.3s ease; }
input[type="file"]::file-selector-button:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(139, 92, 246, 0.3); }

/* 背景与定制复选框 */
.bg-custom-light { background: var(--surface-02); border: 1px solid var(--border-light); border-radius: 16px; }
.custom-checkbox { appearance: none; -webkit-appearance: none; width: 26px; height: 26px; border-radius: 8px; background: var(--surface-02); border: 2px solid var(--primary-500); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.3s ease; margin: 0; }
.custom-checkbox:hover { box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15); }
.custom-checkbox:checked { background: linear-gradient(135deg, var(--primary-600), var(--primary-400)); border-color: transparent; box-shadow: 0 4px 10px rgba(139, 92, 246, 0.3); }
.custom-checkbox:checked::after { content: '\f00c'; font-family: "Font Awesome 6 Free"; font-weight: 900; color: white; font-size: 14px; }

/* 模式切换器 */
.mode-selector { background: var(--surface-02); border-radius: 16px; border: 1px solid var(--border-light); }
.mode-btn { border: none; background: transparent; padding: 12px; border-radius: 12px; color: var(--text-secondary); font-weight: 600; transition: 0.3s; display: flex; align-items: center; justify-content: center; gap: 8px; }
.mode-btn.active { background: var(--surface-01); color: var(--primary-600); box-shadow: 0 1px 2px rgba(0,0,0,0.05); border: 1px solid var(--border-light); }

/* 主按钮 */
.btn-main { border: none; background: linear-gradient(135deg, var(--primary-600), var(--primary-500)); color: #fff; border-radius: 16px; font-size: 1.05rem; transition: 0.3s; box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3); display: flex; align-items: center; justify-content: center; }
.btn-main:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(139,92,246,0.4); }

/* 🌟 QR Code 专属限制：强制 1:1 正方形 */
#qrResult img, #qrResult canvas { width: 100%; max-width: 320px; aspect-ratio: 1 / 1; height: auto; border-radius: 12px; box-shadow: var(--shadow-lg); object-fit: contain; }
.hidden { display: none !important; }
.footer-b { background: linear-gradient(135deg, var(--primary-500), var(--secondary-500)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; font-weight: 700; }

@media (max-width: 768px) {
  .theme-toggle { top: 15px; right: 15px; width: 45px; height: 45px; }
  .custom-glass-card { padding: 30px 20px !important; }
  .mode-btn { font-size: 0.9rem; padding: 10px 5px; }
}