* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; background: #f5f7fa; color: #333; line-height: 1.6; }
a { text-decoration: none; color: inherit; }

/* 广告 */
.ad-banner-top { background: #e8f0fe; border-bottom: 1px solid #c6dafc; padding: 8px 20px; text-align: center; position: relative; font-size: 14px; color: #5f6368; }
.ad-close { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; font-size: 16px; color: #666; }
.ad-footer { background: #e8f0fe; padding: 40px 20px; text-align: center; margin-top: 40px; }
.ad-placeholder { background: #fff; border: 2px dashed #c6dafc; padding: 30px; border-radius: 8px; color: #5f6368; font-size: 14px; }
.ad-video-placeholder { background: #f0f0f0; border-radius: 8px; padding: 40px; text-align: center; margin: 15px 0; }
.ad-timer { font-size: 48px; font-weight: bold; color: #1a73e8; margin: 10px 0; }

/* 导航 */
.navbar { background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,0.08); padding: 0 30px; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 100; }
.nav-brand a { font-size: 22px; font-weight: 700; color: #1a73e8; padding: 15px 0; display: inline-block; }
.nav-links { display: flex; gap: 5px; }
.nav-links a { padding: 15px 12px; color: #5f6368; font-size: 14px; border-bottom: 3px solid transparent; transition: all 0.2s; }
.nav-links a:hover { color: #1a73e8; border-bottom-color: #1a73e8; }
.nav-right { display: flex; align-items: center; gap: 15px; }
.lang-switch { cursor: pointer; font-size: 13px; color: #5f6368; padding: 5px 10px; border: 1px solid #dadce0; border-radius: 4px; }
.lang-switch:hover { background: #f1f3f4; }
.btn-premium { background: linear-gradient(135deg, #1a73e8, #4285f4); color: #fff; padding: 8px 16px; border-radius: 20px; font-size: 14px; font-weight: 500; transition: transform 0.2s; }
.btn-premium:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(26,115,232,0.3); }

/* 英雄区 */
.hero { background: linear-gradient(135deg, #1a73e8, #34a853); color: #fff; padding: 60px 30px; text-align: center; }
.hero h1 { font-size: 38px; margin-bottom: 15px; font-weight: 700; }
.hero p { font-size: 18px; opacity: 0.95; margin-bottom: 30px; max-width: 600px; margin-left: auto; margin-right: auto; }
.search-box { max-width: 500px; margin: 0 auto; }
.search-box input { width: 100%; padding: 14px 24px; border: none; border-radius: 30px; font-size: 16px; box-shadow: 0 4px 20px rgba(0,0,0,0.15); outline: none; }

/* 使用次数 */
.usage-bar { background: #fff; padding: 12px 30px; display: flex; align-items: center; justify-content: center; gap: 15px; font-size: 14px; border-bottom: 1px solid #e8eaed; flex-wrap: wrap; }
#usageCount { font-weight: bold; color: #1a73e8; font-size: 18px; }
.btn-watch-ad { background: #fce8e6; color: #c5221f; border: 1px solid #f9ab99; padding: 6px 14px; border-radius: 16px; cursor: pointer; font-size: 13px; font-weight: 500; }
.btn-watch-ad:hover { background: #f9ab99; color: #fff; }
.link-subscribe { color: #1a73e8; font-size: 13px; font-weight: 500; }
.link-subscribe:hover { text-decoration: underline; }

/* 工具网格 */
.tools-grid { max-width: 1200px; margin: 0 auto; padding: 40px 30px; }
.tool-category { margin-bottom: 50px; }
.tool-category h2 { font-size: 22px; margin-bottom: 20px; color: #202124; display: flex; align-items: center; gap: 10px; }
.tool-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.tool-card { background: #fff; border-radius: 12px; padding: 24px; box-shadow: 0 1px 6px rgba(0,0,0,0.06); transition: all 0.25s; border: 1px solid #e8eaed; display: block; }
.tool-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.12); border-color: #1a73e8; }
.tool-icon { font-size: 36px; margin-bottom: 12px; }
.tool-name { font-size: 16px; font-weight: 600; color: #202124; margin-bottom: 6px; }
.tool-desc { font-size: 13px; color: #5f6368; }

/* 工具页面 */
.tool-page { max-width: 900px; margin: 0 auto; padding: 30px; }
.tool-page h1 { font-size: 28px; margin-bottom: 10px; }
.tool-page .subtitle { color: #5f6368; margin-bottom: 30px; }
.tool-nav { display: flex; gap: 10px; margin-bottom: 30px; flex-wrap: wrap; }
.tool-nav a { padding: 8px 16px; background: #fff; border: 1px solid #dadce0; border-radius: 20px; font-size: 14px; color: #5f6368; }
.tool-nav a.active { background: #1a73e8; color: #fff; border-color: #1a73e8; }
.tool-workspace { background: #fff; border-radius: 12px; padding: 30px; box-shadow: 0 1px 6px rgba(0,0,0,0.06); border: 1px solid #e8eaed; }

/* 上传区 */
.upload-zone { border: 2px dashed #dadce0; border-radius: 12px; padding: 50px 30px; text-align: center; cursor: pointer; transition: all 0.2s; background: #fafafa; }
.upload-zone:hover { border-color: #1a73e8; background: #f8faff; }
.upload-zone.dragover { border-color: #1a73e8; background: #e8f0fe; }
.upload-zone .icon { font-size: 48px; margin-bottom: 15px; }
.upload-zone p { color: #5f6368; font-size: 14px; }
.upload-zone input { display: none; }

/* 按钮 */
.btn { display: inline-block; padding: 10px 24px; border-radius: 6px; border: none; cursor: pointer; font-size: 14px; font-weight: 500; transition: all 0.2s; margin: 5px; }
.btn-primary { background: #1a73e8; color: #fff; }
.btn-primary:hover { background: #1557b0; }
.btn-secondary { background: #f1f3f4; color: #3c4043; border: 1px solid #dadce0; }
.btn-secondary:hover { background: #e8eaed; }
.btn-danger { background: #fce8e6; color: #c5221f; border: 1px solid #f9ab99; }
.btn-success { background: #e6f4ea; color: #137333; border: 1px solid #a8dab5; }

/* 表单 */
input[type="text"], input[type="number"], input[type="range"], select, textarea { padding: 10px 14px; border: 1px solid #dadce0; border-radius: 6px; font-size: 14px; width: 100%; margin: 5px 0; outline: none; font-family: inherit; }
input:focus, textarea:focus, select:focus { border-color: #1a73e8; box-shadow: 0 0 0 2px rgba(26,115,232,0.15); }
textarea { min-height: 200px; resize: vertical; }

/* 结果区 */
.result-area { background: #f8f9fa; border-radius: 8px; padding: 20px; margin-top: 20px; min-height: 100px; }
.result-area pre { white-space: pre-wrap; word-break: break-all; font-family: "SF Mono", Monaco, "Cascadia Code", monospace; font-size: 13px; }

/* 表格 */
table { width: 100%; border-collapse: collapse; margin: 15px 0; font-size: 14px; }
th, td { padding: 10px; text-align: left; border-bottom: 1px solid #e8eaed; }
th { background: #f1f3f4; font-weight: 600; }

/* 页脚 */
.footer { background: #fff; border-top: 1px solid #e8eaed; padding: 40px 30px; text-align: center; }
.footer-links { display: flex; justify-content: center; gap: 25px; margin-bottom: 20px; flex-wrap: wrap; }
.footer-links a { color: #5f6368; font-size: 14px; }
.footer-links a:hover { color: #1a73e8; }
.footer p { color: #9aa0a6; font-size: 13px; }

/* 弹窗 */
.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); z-index: 1000; display: flex; align-items: center; justify-content: center; }
.modal { background: #fff; border-radius: 16px; padding: 30px; max-width: 400px; width: 90%; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,0.2); }
.modal h3 { margin-bottom: 15px; }
.modal button { margin-top: 15px; }

/* 订阅页 */
.pricing-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 25px; max-width: 800px; margin: 40px auto; padding: 0 30px; }
.pricing-card { background: #fff; border-radius: 16px; padding: 30px; text-align: center; box-shadow: 0 2px 12px rgba(0,0,0,0.08); border: 2px solid transparent; }
.pricing-card.featured { border-color: #1a73e8; position: relative; }
.pricing-card.featured::before { content: "推荐"; position: absolute; top: -10px; left: 50%; transform: translateX(-50%); background: #1a73e8; color: #fff; padding: 4px 14px; border-radius: 12px; font-size: 12px; font-weight: 600; }
.pricing-card h3 { font-size: 20px; margin-bottom: 10px; }
.pricing-card .price { font-size: 36px; font-weight: 700; color: #1a73e8; margin: 15px 0; }
.pricing-card .price span { font-size: 16px; color: #5f6368; font-weight: 400; }
.pricing-card ul { text-align: left; margin: 20px 0; list-style: none; }
.pricing-card ul li { padding: 8px 0; border-bottom: 1px solid #f1f3f4; font-size: 14px; color: #5f6368; }
.pricing-card ul li::before { content: "✓"; color: #34a853; margin-right: 8px; font-weight: bold; }

/* 计算器 */
.calculator { max-width: 320px; margin: 0 auto; background: #fff; border-radius: 16px; padding: 20px; box-shadow: 0 4px 20px rgba(0,0,0,0.08); }
.calc-display { background: #f1f3f4; border-radius: 8px; padding: 15px; font-size: 28px; text-align: right; margin-bottom: 15px; min-height: 60px; word-break: break-all; }
.calc-buttons { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.calc-btn { padding: 15px; border: none; border-radius: 8px; font-size: 18px; cursor: pointer; background: #f1f3f4; transition: all 0.15s; }
.calc-btn:hover { background: #e8eaed; }
.calc-btn.op { background: #d2e3fc; color: #1a73e8; }
.calc-btn.eq { background: #1a73e8; color: #fff; }
.calc-btn.eq:hover { background: #1557b0; }

/* 隐藏 */
.hidden { display: none !important; }

/* 响应式 */
@media (max-width: 768px) {
    .navbar { flex-wrap: wrap; padding: 0 15px; }
    .nav-links { order: 3; width: 100%; justify-content: center; overflow-x: auto; }
    .hero h1 { font-size: 26px; }
    .hero p { font-size: 15px; }
    .tool-cards { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .tool-card { padding: 16px; }
    .usage-bar { padding: 10px 15px; font-size: 12px; }
}
@media (max-width: 480px) {
    .tool-cards { grid-template-columns: 1fr; }
}
