/* ========== CSS Variables ========== */
:root {
  --primary: #1877F2;
  --primary-dark: #166FE5;
  --primary-hover: #1670E0;
  --primary-light: #E7F3FF;
  --primary-bg: #EBF5FF;
  --bg: #F0F2F5;
  --white: #FFFFFF;
  --text: #1C1E21;
  --text-secondary: #65676B;
  --text-light: #8A8D91;
  --border: #DADDE1;
  --border-light: #E4E6EB;
  --success: #42B72A;
  --success-hover: #36A420;
  --warning: #F7B928;
  --danger: #FA383E;
  --danger-hover: #E03135;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.06);
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.1), 0 4px 10px rgba(0,0,0,0.06);
  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --transition: 0.2s ease;
  --max-width: 1200px;
  --nav-height: 60px;
}

/* ========== Reset & Base ========== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html { font-size: 16px; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; font-family: inherit; font-size: inherit; }
input, textarea { font-family: inherit; font-size: inherit; }

/* ========== Navigation Bar ========== */
.navbar {
  background: var(--white);
  height: var(--nav-height);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--border-light);
}

.navbar-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 0;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  margin-right: 24px;
  white-space: nowrap;
}

.nav-brand i {
  font-size: 1.5rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition);
  white-space: nowrap;
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
  background: var(--primary-bg);
}

.nav-links a i {
  margin-right: 6px;
}

.nav-search {
  flex: 1;
  max-width: 400px;
  margin-left: auto;
  margin-right: 16px;
  position: relative;
}

.nav-search input {
  width: 100%;
  height: 38px;
  padding: 0 40px 0 16px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--bg);
  font-size: 0.875rem;
  outline: none;
  transition: all var(--transition);
}

.nav-search input:focus {
  border-color: var(--primary);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(24,119,242,0.12);
}

.nav-search button {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: transparent;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.nav-search button:hover { color: var(--primary); }

.nav-user {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.nav-user .btn {
  padding: 7px 16px;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 600;
  transition: all var(--transition);
}

.nav-user .btn-login {
  background: var(--primary);
  color: var(--white);
}

.nav-user .btn-login:hover {
  background: var(--primary-hover);
}

.nav-user .btn-register {
  background: var(--success);
  color: var(--white);
}

.nav-user .btn-register:hover {
  background: var(--success-hover);
}

.nav-user .user-info {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius);
  transition: all var(--transition);
}

.nav-user .user-info:hover {
  background: var(--bg);
}

.nav-user .user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 0.9rem;
}

.nav-user .user-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

/* Mobile hamburger */
.nav-toggle {
  display: none;
  background: none;
  font-size: 1.3rem;
  color: var(--text);
  padding: 4px;
}

/* ========== Main Container ========== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 24px 20px;
}

/* ========== Card ========== */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  margin-bottom: 20px;
  border: 1px solid var(--border-light);
}

.card-header {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-header i {
  color: var(--primary);
}

/* ========== Announcement ========== */
.announcement {
  background: var(--primary-bg);
  border: 1px solid #BED9FA;
  border-radius: var(--radius-lg);
  padding: 14px 20px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.announcement i {
  color: var(--primary);
  font-size: 1.1rem;
  flex-shrink: 0;
}

.announcement-content {
  flex: 1;
  font-size: 0.9rem;
  color: var(--text);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.announcement-tag {
  background: var(--primary);
  color: var(--white);
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

/* ========== Tool Category ========== */
.tool-category {
  margin-bottom: 8px;
}

.tool-category-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  padding: 12px 0 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tool-category-title i {
  color: var(--primary);
}

.tool-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.tool-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  transition: all var(--transition);
  cursor: pointer;
  background: var(--white);
  overflow: hidden;
}

.tool-item:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.tool-item-info {
  flex: 1;
  min-width: 0;
}

.tool-item-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tool-item-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tool-item-badge {
  flex-shrink: 0;
  margin-left: 12px;
}

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-free {
  background: #E8F5E9;
  color: #2E7D32;
}

.badge-paid {
  background: #FFF3E0;
  color: #E65100;
}

/* ========== Buttons ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all var(--transition);
  border: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: var(--shadow-md);
}

.btn-success {
  background: var(--success);
  color: var(--white);
}

.btn-success:hover {
  background: var(--success-hover);
}

.btn-danger {
  background: var(--danger);
  color: var(--white);
}

.btn-danger:hover {
  background: var(--danger-hover);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary-bg);
}

.btn-block {
  width: 100%;
}

.btn-lg {
  padding: 12px 32px;
  font-size: 1rem;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.8rem;
}

/* ========== Form ========== */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  outline: none;
  transition: all var(--transition);
  background: var(--white);
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(24,119,242,0.12);
}

.form-input.error {
  border-color: var(--danger);
}

.form-error {
  color: var(--danger);
  font-size: 0.8rem;
  margin-top: 4px;
  display: none;
}

.form-error.show {
  display: block;
}

.form-textarea {
  width: 100%;
  min-height: 120px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  outline: none;
  resize: vertical;
  transition: all var(--transition);
}

.form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(24,119,242,0.12);
}

/* ========== Auth Pages ========== */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--nav-height));
  padding: 40px 20px;
}

.auth-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 40px;
  width: 100%;
  max-width: 420px;
  border: 1px solid var(--border-light);
}

.auth-title {
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 4px;
  color: var(--text);
}

.auth-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 28px;
}

.auth-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.auth-footer a {
  color: var(--primary);
  font-weight: 600;
}

.auth-footer a:hover {
  text-decoration: underline;
}

/* ========== Tool Page ========== */
.tool-header {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 28px;
  margin-bottom: 20px;
  border: 1px solid var(--border-light);
}

.tool-header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.tool-header-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}

.tool-header-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.tool-header .badge {
  font-size: 0.85rem;
  padding: 5px 14px;
}

.tool-header .badge-paid {
  font-size: 0.85rem;
  padding: 5px 14px;
}

.tool-price {
  color: #E65100;
  font-weight: 700;
  font-size: 0.85rem;
}

.tool-operation {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 28px;
  border: 1px solid var(--border-light);
}

.tool-locked {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  padding: 48px 28px;
  border: none;
  background: linear-gradient(135deg, var(--white) 0%, var(--bg) 100%);
  color: var(--text-light);
  font-size: 0.9rem;
}

.tool-locked-inner {
  text-align: center;
  max-width: 360px;
}

.tool-locked-inner i {
  font-size: 1.5rem;
  width: 48px;
  height: 48px;
  line-height: 48px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  margin: 0 auto 16px;
  display: block;
}

.tool-locked-msg {
  font-size: 1.05rem;
  color: var(--text);
  margin-bottom: 24px;
  line-height: 1.6;
  font-weight: 500;
}

/* ========== Tool Links (友情链接) ========== */
.tool-links {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 20px 28px;
  margin-top: 20px;
  border: 1px solid var(--border-light);
}

.tool-links-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.tool-links-title i {
  color: var(--primary);
  margin-right: 4px;
}

.tool-links-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.tool-links-list a {
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: color var(--transition);
}

.tool-links-list a:hover {
  color: var(--primary);
}

/* ========== Profile Page ========== */
.profile-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 20px;
  align-items: start;
}

.profile-sidebar {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 32px 24px;
  text-align: center;
  border: 1px solid var(--border-light);
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--primary-light);
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--primary);
}

.profile-username {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.profile-qq {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.profile-balance {
  background: var(--primary-bg);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}

.profile-balance-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.profile-balance-amount {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

.profile-balance-amount span {
  font-size: 0.9rem;
  font-weight: 500;
}

.profile-sidebar .btn {
  width: 100%;
  margin-bottom: 8px;
}

/* ========== Table ========== */
.table-wrapper {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

table th,
table td {
  padding: 12px 16px;
  text-align: left;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--border-light);
}

table th {
  background: var(--bg);
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

table tbody tr:hover {
  background: var(--primary-bg);
}

table td {
  color: var(--text);
}

.table-empty {
  text-align: center;
  padding: 40px;
  color: var(--text-light);
  font-size: 0.9rem;
}

/* ========== Recharge Page ========== */
.recharge-page {
  max-width: 640px;
  margin: 0 auto;
}

.recharge-balance-card {
  background: linear-gradient(135deg, var(--primary) 0%, #4A9FF5 100%);
  border-radius: var(--radius-xl);
  padding: 28px 32px;
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
  color: white;
  box-shadow: 0 4px 15px rgba(24, 119, 242, 0.3);
}

.recharge-balance-icon {
  width: 56px;
  height: 56px;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.recharge-balance-label {
  font-size: 0.85rem;
  opacity: 0.85;
  margin-bottom: 2px;
}

.recharge-balance-amount {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.recharge-balance-amount span {
  font-size: 0.9rem;
  font-weight: 500;
  opacity: 0.85;
}

.recharge-main-card {
  padding: 28px;
}

.recharge-section {
  margin-bottom: 24px;
}

.recharge-section-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 14px;
}

.recharge-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.recharge-option {
  background: var(--white);
  border: 2px solid var(--border-light);
  border-radius: var(--radius);
  padding: 16px 12px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
}

.recharge-option:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.recharge-option.selected {
  border-color: var(--primary);
  background: var(--primary-bg);
}

.recharge-option.selected::after {
  content: '\f00c';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  top: 6px;
  right: 8px;
  font-size: 0.65rem;
  color: white;
  background: var(--primary);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.recharge-amount {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
}

.recharge-amount span {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.recharge-custom {
  display: flex;
  gap: 12px;
  align-items: center;
}

.recharge-custom-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.recharge-custom-input {
  flex: 1;
  display: flex;
  align-items: center;
  border: 2px solid var(--border-light);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition);
}

.recharge-custom-input:focus-within {
  border-color: var(--primary);
}

.recharge-custom-prefix {
  padding: 0 12px;
  font-weight: 700;
  color: var(--text-secondary);
  background: var(--bg);
  height: 42px;
  display: flex;
  align-items: center;
  border-right: 1px solid var(--border-light);
}

.recharge-custom-input .form-input {
  border: none;
  border-radius: 0;
  height: 42px;
}

.recharge-custom-input .form-input:focus {
  box-shadow: none;
}

.recharge-pay-types {
  display: flex;
  gap: 12px;
}

.recharge-pay-option {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px;
  border: 2px solid var(--border-light);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  font-weight: 600;
  font-size: 0.95rem;
}

.recharge-pay-option i {
  font-size: 1.4rem;
}

.recharge-pay-option:hover {
  border-color: var(--primary);
}

.recharge-pay-option.selected {
  border-color: var(--primary);
  background: var(--primary-bg);
}

.recharge-pay-option.selected i.fa-alipay {
  color: #1677FF;
}

.recharge-pay-option.selected i.fa-weixin {
  color: #07C160;
}

.recharge-submit {
  margin-top: 8px;
  font-size: 1rem;
  padding: 14px;
}

/* ========== Pay Modal ========== */
.pay-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.pay-modal.show {
  display: flex;
}

.pay-modal-content {
  background: var(--white);
  border-radius: var(--radius-xl);
  width: 90%;
  max-width: 400px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  animation: modalIn 0.25s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.pay-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-light);
}

.pay-modal-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
}

.pay-modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  background: transparent;
  transition: all var(--transition);
}

.pay-modal-close:hover {
  background: var(--bg);
  color: var(--text);
}

.pay-modal-body {
  padding: 28px 24px;
  text-align: center;
}

.pay-qr-code {
  margin-bottom: 16px;
}

.pay-qr-code img {
  width: 200px;
  height: 200px;
  margin: 0 auto;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
}

.pay-amount {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 8px;
}

.pay-tip {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.pay-status {
  font-size: 0.85rem;
  color: var(--text-light);
  padding: 8px 16px;
  background: var(--bg);
  border-radius: var(--radius);
}

.pay-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-light);
  text-align: center;
}

/* ========== Category Page ========== */
.category-header {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 24px 28px;
  margin-bottom: 20px;
  border: 1px solid var(--border-light);
}

.category-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.category-breadcrumb a {
  color: var(--primary);
  transition: opacity var(--transition);
}

.category-breadcrumb a:hover {
  opacity: 0.8;
}

.category-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.category-title i {
  color: var(--primary);
  margin-right: 4px;
}

.category-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ========== Feedback Page ========== */
.feedback-page {
  max-width: 640px;
  margin: 0 auto;
}

/* ========== Change Password ========== */
.change-pwd-page {
  max-width: 480px;
  margin: 0 auto;
}

/* ========== Toast ========== */
.toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 9999;
  animation: toastIn 0.3s ease;
  box-shadow: var(--shadow-lg);
}

.toast-success {
  background: #E8F5E9;
  color: #2E7D32;
  border: 1px solid #A5D6A7;
}

.toast-error {
  background: #FFEBEE;
  color: #C62828;
  border: 1px solid #EF9A9A;
}

.toast-info {
  background: var(--primary-bg);
  color: var(--primary);
  border: 1px solid #BED9FA;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-12px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ========== User Dropdown Menu ========== */
.nav-user-dropdown {
  position: relative;
}

.user-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-light);
  min-width: 160px;
  z-index: 1001;
  padding: 4px 0;
  margin-top: 4px;
}

.user-dropdown-menu.show {
  display: block;
}

.user-dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 0.85rem;
  color: var(--text);
  transition: background var(--transition);
  white-space: nowrap;
}

.user-dropdown-menu a:hover {
  background: var(--primary-bg);
  color: var(--primary);
}

.user-dropdown-menu a i {
  width: 16px;
  text-align: center;
  color: var(--text-secondary);
}

.dropdown-divider {
  height: 1px;
  background: var(--border-light);
  margin: 4px 0;
}

.user-avatar-img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

/* ========== Nav More Categories Dropdown ========== */
.nav-more-categories {
  position: relative;
}

.nav-more-trigger {
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.nav-more-trigger:hover {
  color: var(--primary);
  background: var(--primary-bg);
}

.nav-more-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-light);
  min-width: 160px;
  z-index: 1001;
  padding: 4px 0;
  margin-top: 4px;
}

.nav-more-categories:hover .nav-more-dropdown {
  display: block;
}

.nav-more-dropdown a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 0.85rem;
  color: var(--text);
  transition: background var(--transition);
  white-space: nowrap;
}

.nav-more-dropdown a:hover {
  background: var(--primary-bg);
  color: var(--primary);
}

/* ========== Badge Login ========== */
.badge-login {
  background: #E3F2FD;
  color: #1565C0;
}

/* ========== Announcement Scroll ========== */
.announcement-scroll {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  position: relative;
}

.announcement-content {
  display: inline-block;
  transition: opacity 0.3s ease;
}

@media (max-width: 768px) {
  .announcement-content {
    white-space: nowrap;
  }
}

@media (min-width: 769px) {
  .announcement-content {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    display: block;
  }
}

/* ========== Footer ========== */
.footer {
  text-align: center;
  padding: 24px;
  color: var(--text-light);
  font-size: 0.8rem;
  border-top: 1px solid var(--border-light);
  margin-top: 40px;
}

/* ========== Tool Form ========== */
.tool-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tool-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tool-form-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

.tool-form-row {
  display: flex;
  gap: 12px;
}

.tool-form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.tool-result {
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 16px;
  margin-top: 4px;
}

.tool-result-header {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tool-result-body {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.6;
  word-break: break-all;
  white-space: pre-wrap;
}

.tool-result-success { border-color: var(--success); background: rgba(16,185,129,0.05); }
.tool-result-danger { border-color: var(--danger); background: rgba(239,68,68,0.05); }
.tool-result-warning { border-color: var(--warning); background: rgba(245,158,11,0.05); }
.tool-result-info { border-color: var(--primary); background: rgba(59,130,246,0.05); }

.tool-result-body a {
  color: var(--primary);
  text-decoration: none;
}

.tool-result-body a:hover {
  text-decoration: underline;
}

@media (max-width: 576px) {
  .tool-form-row {
    flex-direction: column;
    gap: 0;
  }
}

/* ========== Responsive ========== */
@media (max-width: 900px) {
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 12px;
    box-shadow: var(--shadow-md);
    border-bottom: 1px solid var(--border-light);
    gap: 2px;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    width: 100%;
    padding: 10px 16px;
  }

  .nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .nav-search {
    margin-left: 0;
    margin-right: auto;
  }

  .nav-user {
    margin-left: 0;
  }

  .profile-grid {
    grid-template-columns: 1fr;
  }

  .tool-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .navbar-inner {
    padding: 0 12px;
    gap: 6px;
  }

  .nav-brand {
    font-size: 1rem;
    margin-right: 8px;
  }

  .nav-brand span {
    display: none;
  }

  .nav-search {
    max-width: 200px;
  }

  .nav-user .user-name {
    display: none;
  }

  .container {
    padding: 16px 12px;
  }

  .card {
    padding: 16px;
  }

  .auth-card {
    padding: 24px;
  }

  .tool-header {
    padding: 20px;
  }

  .tool-header-top {
    flex-direction: column;
  }

  .tool-operation {
    padding: 40px 16px;
    min-height: 200px;
  }

  .recharge-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .btn {
    padding: 8px 16px;
    font-size: 0.85rem;
  }
}