/* ===== Pro 级恢复：Barcode Generator CSS ===== */
: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; font-size: 2.5rem; position: relative; z-index: 2; box-shadow: var(--shadow-lg); }
@keyframes glowRotate { 100% { transform: rotate(360deg); } }
.title { font-size: 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); backdrop-filter: blur(20px); }

/* 主题按钮 */
.theme-toggle { top: 24px; right: 24px; width: 52px; height: 52px; background: var(--surface-01); backdrop-filter: blur(20px); border: 1px solid var(--border-light); cursor: pointer; transition: 0.3s ease; }
.theme-toggle:hover { transform: scale(1.1) rotate(15deg); border-color: var(--primary-500); }
.theme-toggle i { color: var(--text-secondary); font-size: 1.2rem; }

/* ✅ 核心卡片恢复：替换了原版的.card，防止被破坏 */
.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; box-shadow: var(--shadow-lg); transition: all 0.4s ease; }
.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 ease; }
.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 ease; }
.custom-input:focus { border-color: var(--primary-500); box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15); background: var(--surface-01); }

.bg-custom-light { 
    background: var(--surface-02); 
    border: 1px solid var(--border-light); 
    border-radius: 16px; /* ✅ 强行加上 16px 大圆角，跟其他输入框完美统一！ */
}
.eye-btn { background: none; border: none; color: var(--text-tertiary); cursor: pointer; font-size: 1.1rem; transition: 0.3s; }
.eye-btn:hover { color: var(--primary-500); }

/* 模式切换器 */
.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 ease; 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); }

/* 隐藏箭头及定制数字微调器 */
input[type="number"]::-webkit-inner-spin-button, input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.custom-num-input { background: var(--surface-02); border: 1px solid var(--border-light); border-radius: 30px; transition: 0.3s; height: 52px; }
.custom-num-input:focus-within { border-color: var(--primary-500); box-shadow: 0 0 0 4px rgba(139,92,246,0.15); background: var(--surface-01); }
.custom-num-input input { color: var(--primary-700); outline: none; background: transparent; border: none; text-align: center; font-weight: 700; width: 100%; padding: 0; box-shadow: none; }
.dark-mode .custom-num-input input { color: var(--primary-400); }
.s-btn { background: transparent; border: none; color: var(--primary-600); transition: 0.2s; width: 50px; font-size: 1.1rem; display: flex; justify-content: center; align-items: center; }
.s-btn:hover { background: rgba(139,92,246,0.1); color: var(--primary-800); }
.dark-mode .s-btn:hover { color: var(--primary-300); }

/* 主按钮 */
.btn-main { background: linear-gradient(135deg, var(--primary-500), var(--primary-700)); color: white; border: none; border-radius: 16px; font-size: 1.05rem; transition: 0.3s ease; box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3); }
.btn-main:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4); }

.hidden { display: none !important; }
#barcodeResult img { max-width: 100%; border-radius: 8px; box-shadow: var(--shadow-md); }

/* 手机端适配 */
@media (max-width: 768px) {
    .title { font-size: 2.2rem; }
    .theme-toggle { top: 15px; right: 15px; width: 45px; height: 45px; }
    .mode-btn { font-size: 0.9rem; padding: 10px 5px; }
}

/* ✅ 彻底消灭原生四方格，定制高级圆润复选框 */
.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);
}

/* 植入 FontAwesome 的漂亮勾勾 */
.custom-checkbox:checked::after {
    content: '\f00c'; /* FontAwesome 的勾号 */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: white;
    font-size: 14px;
}