/* 跨境行李超重费用计算器 - 样式表 */

:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --accent-color: #f59e0b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: rgba(30, 41, 59, 0.8);
    --bg-glass: rgba(255, 255, 255, 0.05);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.2);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.3);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition-normal: 0.3s ease;
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: var(--font-family); background: var(--bg-primary); color: var(--text-primary); line-height: 1.6; min-height: 100vh; }

.bg-decoration { position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: -1; overflow: hidden; }
.bg-circle { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.4; }
.bg-circle-1 { width: 600px; height: 600px; background: linear-gradient(135deg, #6366f1, #8b5cf6); top: -200px; right: -200px; animation: float 20s ease-in-out infinite; }
.bg-circle-2 { width: 400px; height: 400px; background: linear-gradient(135deg, #0ea5e9, #06b6d4); bottom: -100px; left: -100px; animation: float 25s ease-in-out infinite reverse; }
.bg-circle-3 { width: 300px; height: 300px; background: linear-gradient(135deg, #f59e0b, #f97316); top: 50%; left: 50%; transform: translate(-50%, -50%); animation: pulse 15s ease-in-out infinite; }

@keyframes float { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-20px, 20px); } }
@keyframes pulse { 0%, 100% { opacity: 0.3; transform: translate(-50%, -50%) scale(1); } 50% { opacity: 0.5; transform: translate(-50%, -50%) scale(1.1); } }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes slideIn { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }

.container { max-width: 1200px; margin: 0 auto; padding: 20px; }
.header { text-align: center; padding: 40px 20px; margin-bottom: 20px; }
.logo { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 12px; }
.logo-icon { font-size: 2.5rem; animation: bounce 2s ease infinite; }
.header h1 { font-size: 2rem; font-weight: 700; background: var(--primary-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.subtitle { color: var(--text-secondary); font-size: 1.1rem; }

.calculator-card { background: var(--bg-card); backdrop-filter: blur(20px); border: 1px solid var(--border-color); border-radius: var(--radius-xl); padding: 32px; margin-bottom: 24px; box-shadow: var(--shadow-lg), var(--shadow-glow); }
.card-header { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid var(--border-color); }
.card-icon { font-size: 1.8rem; }
.card-header h2 { font-size: 1.5rem; font-weight: 600; }

.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-bottom: 24px; }
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-group.full-width { grid-column: 1 / -1; }
.form-group label { font-size: 0.9rem; font-weight: 500; color: var(--text-secondary); }

.select-wrapper { position: relative; }
.select-wrapper select { width: 100%; padding: 14px 40px 14px 16px; font-size: 1rem; color: var(--text-primary); background: var(--bg-glass); border: 1px solid var(--border-color); border-radius: var(--radius-md); cursor: pointer; appearance: none; transition: var(--transition-normal); }
.select-wrapper select:focus { outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2); }
.select-arrow { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--text-muted); pointer-events: none; }

input[type="number"] { width: 100%; padding: 14px 16px; font-size: 1rem; color: var(--text-primary); background: var(--bg-glass); border: 1px solid var(--border-color); border-radius: var(--radius-md); transition: var(--transition-normal); }
input[type="number"]:focus { outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2); }
input[type="number"]::placeholder { color: var(--text-muted); }

.weight-input-wrapper { position: relative; }
.weight-input-wrapper input { padding-right: 50px; }
.weight-input-wrapper .unit { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--text-muted); }

.weight-slider-container { margin-top: 12px; }
input[type="range"] { width: 100%; height: 8px; background: var(--bg-glass); border-radius: 4px; appearance: none; cursor: pointer; }
input[type="range"]::-webkit-slider-thumb { appearance: none; width: 24px; height: 24px; background: var(--primary-gradient); border-radius: 50%; cursor: pointer; border: 3px solid var(--bg-primary); }
.slider-labels { display: flex; justify-content: space-between; margin-top: 8px; font-size: 0.8rem; color: var(--text-muted); }
.slider-labels .free-mark { color: var(--success-color); text-align: center; }
.slider-labels .free-mark small { display: block; font-size: 0.7rem; }

.form-actions { display: flex; gap: 16px; justify-content: center; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 14px 32px; font-size: 1rem; font-weight: 600; border: none; border-radius: var(--radius-md); cursor: pointer; transition: var(--transition-normal); }
.btn-icon { font-size: 1.1rem; }
.btn-primary { background: var(--primary-gradient); color: white; box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4); }
.btn-secondary { background: var(--bg-glass); color: var(--text-secondary); border: 1px solid var(--border-color); }
.btn-secondary:hover { background: var(--border-color); color: var(--text-primary); }

.result-card { background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1)); border: 1px solid var(--primary-color); border-radius: var(--radius-lg); padding: 24px; animation: slideIn 0.5s ease; }
.result-card.hidden { display: none; }
.result-header { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.result-icon { font-size: 1.5rem; }
.result-header h3 { font-size: 1.2rem; font-weight: 600; }
.result-main { text-align: center; padding: 24px; background: var(--bg-glass); border-radius: var(--radius-md); margin-bottom: 20px; }
.result-label { display: block; font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 8px; }
.result-value { font-size: 2.5rem; font-weight: 700; color: var(--accent-color); }
.result-details { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 16px; }
.detail-item { background: var(--bg-glass); padding: 12px; border-radius: var(--radius-sm); text-align: center; }
.detail-label { display: block; font-size: 0.8rem; color: var(--text-muted); margin-bottom: 4px; }
.detail-value { font-size: 1.1rem; font-weight: 600; }
.result-note { display: flex; align-items: flex-start; gap: 8px; padding: 12px; background: rgba(245, 158, 11, 0.1); border-radius: var(--radius-sm); border-left: 3px solid var(--warning-color); }
.note-icon { font-size: 1.2rem; }
.result-note p { font-size: 0.9rem; color: var(--text-secondary); }

section { margin-bottom: 24px; }
.section-header { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.section-icon { font-size: 1.8rem; }
.section-header h2 { font-size: 1.5rem; font-weight: 600; }

.formula-section, .examples-section, .details-section { background: var(--bg-card); backdrop-filter: blur(20px); border: 1px solid var(--border-color); border-radius: var(--radius-xl); padding: 32px; }
.formula-content { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.formula-card { background: var(--bg-glass); border: 1px solid rgba(255,255,255,0.05); border-radius: var(--radius-lg); padding: 24px; }
.formula-card h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 16px; color: var(--primary-light); }
.formula-box { background: var(--bg-secondary); padding: 16px; border-radius: var(--radius-sm); margin-bottom: 16px; }
.formula-box code { font-family: monospace; font-size: 1rem; color: var(--accent-color); }
.formula-list { list-style: none; }
.formula-list li { padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.05); font-size: 0.95rem; color: var(--text-secondary); }
.formula-list li:last-child { border-bottom: none; }
.formula-list li strong { color: var(--text-primary); }

.weight-tiers { display: flex; flex-wrap: wrap; gap: 12px; }
.tier { flex: 1; min-width: 100px; padding: 16px 12px; border-radius: var(--radius-sm); text-align: center; }
.tier-range { display: block; font-size: 0.9rem; font-weight: 600; margin-bottom: 4px; }
.tier-label { font-size: 0.8rem; color: var(--text-muted); }
.tier-free { background: rgba(16, 185, 129, 0.2); border: 1px solid var(--success-color); }
.tier-free .tier-range { color: var(--success-color); }
.tier-low { background: rgba(245, 158, 11, 0.2); border: 1px solid var(--warning-color); }
.tier-low .tier-range { color: var(--warning-color); }
.tier-medium { background: rgba(249, 115, 22, 0.2); border: 1px solid #f97316; }
.tier-medium .tier-range { color: #f97316; }
.tier-high { background: rgba(239, 68, 68, 0.2); border: 1px solid var(--error-color); }
.tier-high .tier-range { color: var(--error-color); }

.examples-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.example-card { background: var(--bg-glass); border: 1px solid rgba(255,255,255,0.05); border-radius: var(--radius-lg); overflow: hidden; transition: var(--transition-normal); }
.example-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--primary-light); }
.example-header { display: flex; justify-content: space-between; padding: 16px; background: var(--primary-gradient); }
.example-badge { font-size: 0.85rem; font-weight: 600; color: white; }
.airline-tag { font-size: 0.8rem; padding: 4px 10px; background: rgba(255,255,255,0.2); border-radius: 20px; color: white; }
.example-body { padding: 20px; }
.example-scenario { font-size: 0.95rem; color: var(--text-secondary); margin-bottom: 16px; }
.example-scenario strong { color: var(--text-primary); }
.example-calc { margin-bottom: 16px; }
.calc-step { padding: 8px 12px; background: var(--bg-secondary); border-radius: var(--radius-sm); margin-bottom: 8px; font-size: 0.9rem; color: var(--text-secondary); }
.example-result { display: flex; justify-content: space-between; padding: 12px 16px; background: rgba(16, 185, 129, 0.1); border: 1px solid var(--success-color); border-radius: var(--radius-sm); }
.result-text { font-weight: 500; color: var(--text-secondary); }
.result-amount { font-size: 1.3rem; font-weight: 700; color: var(--success-color); }

.details-content { display: flex; flex-direction: column; gap: 24px; }
.detail-card { background: var(--bg-glass); border: 1px solid rgba(255,255,255,0.05); border-radius: var(--radius-lg); padding: 24px; }
.detail-card h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 20px; color: var(--primary-light); }

.table-wrapper { overflow-x: auto; }
.fee-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.fee-table th, .fee-table td { padding: 14px 12px; text-align: left; border-bottom: 1px solid var(--border-color); }
.fee-table th { background: var(--bg-secondary); font-weight: 600; white-space: nowrap; }
.fee-table td { color: var(--text-secondary); }
.fee-table tbody tr:hover { background: var(--bg-glass); }
.fee-table td strong { color: var(--text-primary); }
.table-note { margin-top: 12px; font-size: 0.85rem; color: var(--text-muted); font-style: italic; }

.cabin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.cabin-item { display: flex; align-items: center; gap: 16px; padding: 20px; background: var(--bg-secondary); border-radius: var(--radius-md); transition: var(--transition-normal); }
.cabin-item:hover { transform: translateX(4px); }
.cabin-icon { font-size: 2rem; width: 60px; height: 60px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); }
.cabin-icon.economy { background: rgba(100, 116, 139, 0.2); }
.cabin-icon.premium { background: rgba(16, 185, 129, 0.2); }
.cabin-icon.business { background: rgba(99, 102, 241, 0.2); }
.cabin-icon.first { background: rgba(245, 158, 11, 0.2); }
.cabin-info h4 { font-size: 1rem; font-weight: 600; margin-bottom: 4px; }
.cabin-info p { font-size: 0.9rem; color: var(--text-secondary); }

.tips-card { border-left: 4px solid var(--warning-color); }
.tips-list { list-style: none; }
.tips-list li { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.tips-list li:last-child { border-bottom: none; }
.tip-icon { font-size: 1.2rem; }
.tips-list li span:last-child { color: var(--text-secondary); font-size: 0.95rem; }
.tips-list li strong { color: var(--accent-color); }

.tips-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.tip-item { padding: 20px; background: var(--bg-secondary); border-radius: var(--radius-md); text-align: center; transition: var(--transition-normal); }
.tip-item:hover { transform: translateY(-4px); }
.tip-emoji { font-size: 2.5rem; display: block; margin-bottom: 12px; }
.tip-item p { font-size: 0.9rem; color: var(--text-secondary); }

.ad-container { margin: 24px 0; min-height: 100px; display: flex; align-items: center; justify-content: center; background: var(--bg-glass); border: 1px dashed var(--border-color); border-radius: var(--radius-lg); padding: 16px; }

.footer { margin-top: 40px; padding: 32px 20px; text-align: center; border-top: 1px solid var(--border-color); }
.footer-links { margin-bottom: 16px; }
.footer-links a { color: var(--text-secondary); text-decoration: none; transition: var(--transition-normal); }
.footer-links a:hover { color: var(--primary-light); }
.footer-links .divider { margin: 0 12px; color: var(--text-muted); }
.disclaimer { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 8px; }
.copyright { font-size: 0.8rem; color: var(--text-muted); }

@media (max-width: 768px) {
    .container { padding: 16px; }
    .header { padding: 24px 16px; }
    .header h1 { font-size: 1.5rem; }
    .calculator-card, .formula-section, .examples-section, .details-section { padding: 20px; border-radius: var(--radius-lg); }
    .form-grid { grid-template-columns: 1fr; }
    .form-actions { flex-direction: column; }
    .btn { width: 100%; justify-content: center; }
    .result-value { font-size: 2rem; }
    .weight-tiers { flex-direction: column; }
    .tier { min-width: 100%; }
}

@media (max-width: 480px) {
    html { font-size: 14px; }
    .logo { flex-direction: column; gap: 8px; }
    .result-details { grid-template-columns: 1fr; }
}
