/* ===== Free Online Tools - Premium Global Style ===== */
/* Inspired by: ILovePDF, SmallPDF, Convertio */

/* Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #dbeafe;
  --secondary: #7c3aed;
  --accent: #06b6d4;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --bg: #ffffff;
  --bg-gray: #f1f5f9;
  --bg-dark: #0f172a;
  --text: #0f172a;
  --text-secondary: #64748b;
  --text-light: #94a3b8;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --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: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --max-width: 1200px;
  --header-height: 68px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-dark); }

img { max-width: 100%; height: auto; }

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

/* ===== Header ===== */
.header {
  background: rgba(255,255,255,0.98);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 22px;
  font-weight: 800;
  color: var(--primary);
  text-decoration: none !important;
}
.logo svg { width: 32px; height: 32px; }
.logo span { color: var(--text); font-weight: 700; }
.nav { display: flex; gap: 6px; align-items: center; }
.nav a {
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  text-decoration: none !important;
}
.nav a:hover, .nav a.active {
  color: var(--primary);
  background: var(--primary-light);
}

/* ===== Hero ===== */
.hero {
  text-align: center;
  padding: 80px 24px 60px;
  background: linear-gradient(135deg, #eff6ff 0%, #f5f3ff 50%, #ecfeff 100%);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 50% 50%, rgba(37,99,235,0.03) 0%, transparent 50%);
  pointer-events: none;
}
.hero h1 {
  font-size: 44px;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
  color: var(--text);
}
.hero h1 span { color: var(--primary); }
.hero p {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 32px;
  line-height: 1.7;
}
.hero .search-box {
  max-width: 500px;
  margin: 0 auto;
  display: flex;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 50px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.hero .search-box input {
  flex: 1;
  border: none;
  padding: 14px 20px;
  font-size: 15px;
  outline: none;
  font-family: inherit;
}
.hero .search-box button {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 14px 28px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.hero .search-box button:hover { background: var(--primary-dark); }

/* Stats bar */
.stats-bar {
  display: flex;
  justify-content: center;
  gap: 40px;
  padding: 20px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-secondary);
}
.stats-bar strong { color: var(--text); font-size: 18px; display: block; }

/* ===== Tool Grid ===== */
.section-title {
  text-align: center;
  padding: 60px 24px 12px;
  font-size: 30px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.3px;
}
.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 16px;
  margin-bottom: 40px;
}
.category-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px 48px;
}
.category-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding: 16px 20px;
  background: var(--bg-gray);
  border-radius: var(--radius);
  cursor: pointer;
}
.category-header h2 { font-size: 20px; font-weight: 700; }
.category-header span { color: var(--text-secondary); font-size: 14px; margin-left: auto; }

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.tool-card {
  display: block;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none !important;
  position: relative;
  overflow: hidden;
}
.tool-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  opacity: 0;
  transition: opacity 0.25s;
}
.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}
.tool-card:hover::before { opacity: 1; }
.tool-card .icon { font-size: 36px; margin-bottom: 12px; display: block; }
.tool-card h3 { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.tool-card p { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }

/* ===== Tool Page Layout ===== */
.tool-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 24px 60px;
}
.tool-page h1 { font-size: 32px; font-weight: 800; margin-bottom: 8px; letter-spacing: -0.3px; }
.tool-page .subtitle { color: var(--text-secondary); font-size: 16px; margin-bottom: 32px; line-height: 1.6; }
.tool-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow);
}

/* ===== Ad Slots ===== */
.ad-slot {
  text-align: center;
  padding: 24px;
  margin: 32px auto;
  max-width: 728px;
  min-height: 90px;
  background: var(--bg-gray);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 13px;
  border: 1px dashed var(--border);
}
.ad-slot-inline {
  margin: 24px 0;
  padding: 16px;
  min-height: 60px;
}
.ad-slot-sidebar {
  margin: 0;
  min-height: 250px;
}

/* ===== Footer ===== */
.footer {
  background: var(--bg-dark);
  color: var(--text-light);
  padding: 48px 24px 32px;
  margin-top: 60px;
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 32px;
}
.footer h4 { color: #fff; font-size: 14px; font-weight: 600; margin-bottom: 16px; }
.footer a {
  display: block;
  color: var(--text-light);
  font-size: 13px;
  margin-bottom: 8px;
  transition: color 0.2s;
  text-decoration: none !important;
}
.footer a:hover { color: #fff; }
.footer-bottom {
  max-width: var(--max-width);
  margin: 32px auto 0;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
  font-size: 13px;
}
.footer-bottom a { display: inline; margin: 0 8px; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  font-family: inherit;
  text-decoration: none !important;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-success { background: var(--success); color: #fff; }
.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-sm { padding: 8px 18px; font-size: 13px; }
.btn-lg { padding: 14px 36px; font-size: 16px; }

/* ===== Forms ===== */
input, select, textarea {
  font-family: inherit;
  font-size: 15px;
}
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.form-group input, .form-group select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.2s;
}
.form-group input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }

/* ===== Status Tags ===== */
.tag { display: inline-block; padding: 2px 10px; border-radius: 50px; font-size: 12px; font-weight: 500; }
.tag-green { background: #dcfce7; color: #166534; }
.tag-blue { background: var(--primary-light); color: var(--primary-dark); }
.tag-yellow { background: #fef3c7; color: #92400e; }
.tag-red { background: #fee2e2; color: #991b1b; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .hero h1 { font-size: 30px; }
  .hero p { font-size: 16px; }
  .nav { gap: 2px; }
  .nav a { padding: 6px 10px; font-size: 13px; }
  .tool-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .tool-card { padding: 18px 14px; }
  .tool-card .icon { font-size: 28px; }
  .stats-bar { flex-wrap: wrap; gap: 16px; }
  .section-title { font-size: 24px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

/* ===== SEO Breadcrumbs ===== */
.breadcrumbs {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 12px 24px;
  font-size: 13px;
  color: var(--text-secondary);
}
.breadcrumbs a { color: var(--text-secondary); }
.breadcrumbs a:hover { color: var(--primary); }
.breadcrumbs .sep { margin: 0 6px; }

/* ===== Announcement Bar ===== */
.announcement {
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  color: #fff;
  text-align: center;
  padding: 8px;
  font-size: 13px;
  font-weight: 500;
}
.announcement a { color: #fff; text-decoration: underline; }
