/* ToolNet - Shared Styles */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root { --primary: #4f46e5; --primary-light: #818cf8; --success: #10b981; --border: #e2e8f0; --text: #1e293b; --text-secondary: #64748b; --bg: #f8fafc; --radius: 16px; --radius-sm: 10px; }
body { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; }
.nav { background: rgba(255,255,255,.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; }
.nav-inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; height: 60px; display: flex; align-items: center; justify-content: space-between; }
.logo { font-size: 1.25rem; font-weight: 800; background: linear-gradient(135deg, #4f46e5, #06b6d4); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; text-decoration: none; display: flex; align-items: center; gap: 6px; }
.nav-links { display: flex; gap: 4px; align-items: center; }
.nav-links a { color: #64748b; padding: 6px 12px; border-radius: 8px; font-size: .85rem; font-weight: 500; text-decoration: none; transition: all .2s; }
.nav-links a:hover, .nav-links a.active { color: var(--primary); background: rgba(79,70,229,.08); }
.nav-links a.active { font-weight: 700; }
#lang-switcher { margin-left: 10px; padding-left: 10px; border-left: 1px solid var(--border); }
#lang-select { border: 1px solid #d4d4d8; border-radius: 8px; padding: 5px 10px; font-size: .82rem; cursor: pointer; background: #fff; color: #333; outline: none; }
#lang-select:hover { border-color: var(--primary); }
#lang-select:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(79,70,229,.1); }
.hero { background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #06b6d4 100%); color: #fff; text-align: center; padding: 100px 24px 80px; position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%; background: radial-gradient(circle, rgba(255,255,255,.1) 0%, transparent 60%); animation: float 8s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translate(0,0); } 50% { transform: translate(30px,-30px); } }
.hero > * { position: relative; z-index: 1; }
.hero h1 { font-size: 3rem; font-weight: 800; letter-spacing: -1px; margin-bottom: 16px; }
.hero p { font-size: 1.2rem; opacity: .9; max-width: 600px; margin: 0 auto 32px; }
.hero-badge { display: inline-flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.hero-badge span { background: rgba(255,255,255,.15); backdrop-filter: blur(4px); padding: 8px 18px; border-radius: 20px; font-size: .9rem; font-weight: 500; }
.tool-section { max-width: 1200px; margin: -50px auto 60px; padding: 0 24px; position: relative; z-index: 10; }
.tool-grid { display: grid !important; grid-template-columns: repeat(5, 1fr) !important; gap: 20px; }
.card { background: #fff; border-radius: var(--radius); padding: 32px 24px; box-shadow: 0 2px 8px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04); border: 1px solid var(--border); text-decoration: none; color: inherit; transition: all .3s; display: block; }
.card:hover { transform: translateY(-6px); box-shadow: 0 16px 32px rgba(79,70,229,.12); border-color: var(--primary-light); }
.card-icon { width: 52px; height: 52px; border-radius: 14px; background: linear-gradient(135deg, #4f46e5, #06b6d4); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; margin-bottom: 20px; }
.card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; color: var(--text); }
.card p { font-size: .88rem; color: var(--text-secondary); line-height: 1.5; margin-bottom: 14px; }
.card .tag { display: inline-block; padding: 4px 12px; border-radius: 20px; font-size: .72rem; font-weight: 600; background: rgba(79,70,229,.1); color: #6366f1; }
.trust { max-width: 1200px; margin: 0 auto 60px; padding: 0 24px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; text-align: center; }
.trust-item { background: #fff; padding: 24px; border-radius: 12px; border: 1px solid var(--border); }
.trust-item .t-icon { font-size: 2rem; margin-bottom: 12px; }
.trust-item h4 { font-size: 1rem; font-weight: 700; margin-bottom: 6px; }
.trust-item p { font-size: .85rem; color: var(--text-secondary); }
.about { max-width: 800px; margin: 0 auto 80px; padding: 0 24px; text-align: center; }
.about h2 { font-size: 1.6rem; font-weight: 700; margin-bottom: 16px; }
.about p { color: var(--text-secondary); font-size: 1rem; line-height: 1.8; }
.page-stripe { background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #06b6d4 100%); color: #fff; text-align: center; padding: 48px 24px; }
.page-stripe h1 { font-size: 2rem; font-weight: 800; margin-bottom: 8px; }
.page-stripe p { font-size: 1.05rem; opacity: .9; }
.tool-container { max-width: 700px; margin: 40px auto; padding: 0 24px; }
.tool-box { background: #fff; border-radius: var(--radius); padding: 32px; border: 1px solid var(--border); box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; color: var(--text); }
.form-group input[type="text"], .form-group input[type="email"], .form-group input[type="url"], .form-group input[type="number"], .form-group textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: .95rem; font-family: inherit; outline: none; transition: border-color .2s; }
.form-group input:focus, .form-group textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,70,229,.1); }
.form-row { display: flex; gap: 12px; flex-wrap: wrap; }
.form-row .form-group { flex: 1; min-width: 140px; }
.form-group input[type="range"] { width: 100%; margin-top: 6px; accent-color: var(--primary); }
.form-group input[type="color"] { width: 48px; height: 40px; border: 1px solid var(--border); border-radius: 6px; padding: 2px; cursor: pointer; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 12px 20px; border-radius: var(--radius-sm); font-size: .95rem; font-weight: 600; border: none; cursor: pointer; transition: all .2s; font-family: inherit; text-decoration: none; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: #4338ca; }
.btn-secondary { background: rgba(79,70,229,.1); color: var(--primary); }
.btn-secondary:hover { background: rgba(79,70,229,.18); }
.btn-success { background: #059669; color: #fff; }
.btn-success:hover { background: #047857; }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: .85rem; }
.output-area { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--border); display: none; }
.output-area.has-result { display: block; }
.result-display { display: flex; justify-content: center; padding: 16px 0; }
.result-display canvas, .result-display img { max-width: 100%; border-radius: 8px; }
.subscribe-strip { background: linear-gradient(135deg, #4f46e5, #06b6d4); color: #fff; text-align: center; padding: 50px 24px; }
.subscribe-strip h3 { font-size: 1.4rem; font-weight: 800; margin-bottom: 8px; }
.subscribe-strip p { opacity: .85; margin-bottom: 20px; font-size: .95rem; }
.sub-form { display: flex; gap: 10px; max-width: 420px; margin: 0 auto; }
.sub-form input { flex: 1; padding: 12px 16px; border: none; border-radius: var(--radius-sm); font-size: .95rem; font-family: inherit; outline: none; }
.sub-form button { background: #1e293b; color: #fff; border: none; padding: 12px 20px; border-radius: var(--radius-sm); font-size: .95rem; font-weight: 600; cursor: pointer; transition: all .2s; font-family: inherit; }
.sub-form button:hover { background: #334155; }
.sub-msg { font-size: .85rem; margin-top: 8px; min-height: 20px; opacity: 0; transition: opacity .3s; }
.sub-msg.show { opacity: 1; }
.footer { text-align: center; padding: 32px 24px; color: #94a3b8; font-size: .85rem; border-top: 1px solid var(--border); }
.footer a { color: #94a3b8; text-decoration: none; }
.footer a:hover { color: var(--primary); }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(100px); padding: 12px 24px; border-radius: var(--radius-sm); font-size: .9rem; font-weight: 600; z-index: 999; opacity: 0; transition: all .3s; pointer-events: none; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.success { background: #065f46; color: #d1fae5; }
.toast.error { background: #991b1b; color: #fecaca; }
.spinner { display: none; width: 28px; height: 28px; border: 3px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin .6s linear infinite; margin: 20px auto; }
.spinner.show { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.compare-item { text-align: center; }
.compare-item img { max-width: 100%; max-height: 300px; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.compare-item .size { font-size: .85rem; margin-top: 8px; font-weight: 600; }
.compare-item .label { font-size: .8rem; color: var(--text-secondary); }
.file-drop { border: 2px dashed var(--border); border-radius: var(--radius-sm); padding: 40px 20px; text-align: center; cursor: pointer; transition: all .2s; }
.file-drop:hover, .file-drop.dragover { border-color: var(--primary); background: rgba(79,70,229,.04); }
.file-drop .icon { font-size: 2.5rem; margin-bottom: 12px; }
.file-drop p { font-size: .95rem; color: var(--text); }
.file-drop .hint { font-size: .8rem; color: var(--text-secondary); margin-top: 8px; }
.qr-presets { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.qr-presets button { flex: 1; min-width: 70px; }
.password-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.password-options .full { grid-column: 1 / -1; }
.char-types { display: flex; flex-wrap: wrap; gap: 10px; }
.char-types label { display: flex; align-items: center; gap: 6px; font-size: .9rem; font-weight: 400; cursor: pointer; }
.passwords-output { margin-top: 16px; }
.passwords-output .pw-row { display: flex; gap: 8px; margin-bottom: 8px; align-items: center; }
.passwords-output .pw-row code { flex: 1; padding: 8px 12px; background: #f1f5f9; border-radius: 6px; font-family: "SFMono-Regular", Consolas, monospace; font-size: .9rem; word-break: break-all; }
.passwords-output .pw-row .pw-copy-btn { padding: 6px 12px; font-size: .8rem; border-radius: 6px; background: var(--primary); color: #fff; border: none; cursor: pointer; }
.wc-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 10px; margin-top: 16px; }
.wc-stat { background: #f8fafc; border-radius: 8px; padding: 12px; text-align: center; }
.wc-stat .num { font-size: 1.5rem; font-weight: 800; color: var(--primary); }
.wc-stat .lbl { font-size: .78rem; color: var(--text-secondary); margin-top: 2px; }
.json-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.json-actions .btn { flex: 1; min-width: 80px; }
textarea.tool-input { width: 100%; min-height: 200px; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-family: "SFMono-Regular", Consolas, monospace; font-size: .9rem; outline: none; resize: vertical; transition: border-color .2s; }
textarea.tool-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,70,229,.1); }
@media(max-width:768px) {
 .hero h1 { font-size: 2rem; }
 .hero { padding: 60px 20px 50px; }
 .tool-section { margin-top: -30px; }
 .tool-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
 .card { padding: 20px 16px; }
 .trust { grid-template-columns: 1fr; }
 .sub-form { flex-direction: column; }
 .nav-links a { font-size: .78rem; padding: 4px 8px; }
 .page-stripe h1 { font-size: 1.5rem; }
 .tool-box { padding: 20px; }
 .form-row { flex-direction: column; }
 .form-row .form-group { min-width: auto; }
 .compare { grid-template-columns: 1fr; }
 .password-options { grid-template-columns: 1fr; }
 .wc-stats { grid-template-columns: repeat(3, 1fr); }
}


