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

/* ===== Variables ===== */
:root {
  /* Colors */
  --color-primary: #2563eb; /* Blue primary */
  --color-primary-hover: #1d4ed8;
  --color-secondary: #10b981; /* Green secondary */
  --color-secondary-hover: #059669;
  
  --color-bg: #f8fafc; /* Light background */
  --color-surface: #ffffff; /* Card background */
  
  --color-text-main: #1f2937;
  --color-text-muted: #6b7280;
  
  --color-border: #e2e8f0;
  --color-shadow: rgba(0, 0, 0, 0.05);
  
  /* Layout */
  --container-width: 1200px;
  --border-radius: 12px;
  --transition: all 0.3s ease;
  
  /* Z-index */
  --z-header: 100;
  --z-modal: 1000;
}

/* ===== Global Reset ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  text-decoration: none;
  color: var(--color-primary);
  transition: var(--transition);
}

a:hover {
  color: var(--color-primary-hover);
}

ul {
  list-style: none;
}

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

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===== Utility Classes ===== */
.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  font-size: 1rem;
}

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

.btn-primary:hover {
  background-color: var(--color-primary-hover);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(37, 99, 235, 0.2);
}

.btn-secondary {
  background-color: var(--color-secondary);
  color: #fff;
}

.btn-secondary:hover {
  background-color: var(--color-secondary-hover);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(16, 185, 129, 0.2);
}

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

.btn-outline:hover {
  background-color: var(--color-primary);
  color: #fff;
}

.card {
  background-color: var(--color-surface);
  border-radius: var(--border-radius);
  padding: 2rem;
  box-shadow: 0 4px 6px var(--color-shadow);
  border: 1px solid var(--color-border);
  transition: var(--transition);
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--color-text-main);
  text-align: center;
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--color-text-muted);
  text-align: center;
  margin-bottom: 3rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== Typography Structure ===== */
h1, h2, h3, h4, h5, h6 {
  color: var(--color-text-main);
  font-weight: 700;
  line-height: 1.2;
}

/* ===== Header & Navigation ===== */
.header {
  background-color: var(--color-surface);
  box-shadow: 0 2px 10px var(--color-shadow);
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  width: 100%;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo span {
  color: var(--color-primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  color: var(--color-text-main);
  font-weight: 500;
  position: relative;
}

.nav-link:hover, .nav-link.active {
  color: var(--color-primary);
}

/* Hamburger Menu */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 0.5rem;
  background: none;
  border: none;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background-color: var(--color-text-main);
  border-radius: 3px;
  transition: var(--transition);
}

/* ===== Main Content Area ===== */
.main-content {
  flex-grow: 1;
  padding: 2rem 0;
}

/* ===== AdSense Placeholders ===== */
.ad-placeholder {
  background-color: #f1f5f9;
  border: 1px dashed #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-weight: 500;
  margin: 2rem auto;
  border-radius: 8px;
  text-transform: uppercase;
  font-size: 0.875rem;
}

.ad-top-banner {
  width: 100%;
  max-width: 728px;
  height: 90px;
}

.ad-in-content {
  width: 100%;
  max-width: 336px;
  height: 280px;
}

.ad-bottom {
  width: 100%;
  max-width: 728px;
  height: 90px;
}

@media (max-width: 768px) {
  .ad-top-banner, .ad-bottom {
    max-width: 320px;
    height: 100px;
  }
}

/* ===== Hero Section ===== */
.hero {
  text-align: center;
  padding: 4rem 0 2rem;
  background: linear-gradient(to bottom, #ffffff, var(--color-bg));
  border-radius: var(--border-radius);
  margin-bottom: 3rem;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  background: linear-gradient(to right, var(--color-primary), var(--color-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 1.25rem;
  color: var(--color-text-muted);
  max-width: 700px;
  margin: 0 auto 2rem;
}

/* ===== Grid Layouts ===== */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.tool-card {
  text-align: center;
  padding: 2.5rem 2rem;
}

.tool-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  border-color: var(--color-primary);
}

.tool-icon {
  width: 64px;
  height: 64px;
  background-color: #eff6ff;
  color: var(--color-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 24px;
}

.tool-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.tool-card p {
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
}

/* ===== Content Pages (About, Privacy, etc.) ===== */
.content-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
  background: var(--color-surface);
  border-radius: var(--border-radius);
  box-shadow: 0 4px 6px var(--color-shadow);
}

.content-page h2 {
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.content-page p {
  margin-bottom: 1rem;
  color: var(--color-text-muted);
}

.content-page ul {
  list-style: disc;
  margin-left: 2rem;
  margin-bottom: 1rem;
  color: var(--color-text-muted);
}

/* ===== Contact Form ===== */
.contact-form {
  display: grid;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-weight: 500;
  color: var(--color-text-main);
}

.form-group input,
.form-group textarea {
  padding: 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  outline: none;
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group textarea {
  min-height: 150px;
  resize: vertical;
}

/* ===== Tool UI Layouts (Compressors, etc.) ===== */
.tool-ui {
  max-width: 800px;
  margin: 0 auto;
  background: var(--color-surface);
  border-radius: var(--border-radius);
  padding: 2rem;
  box-shadow: 0 4px 6px var(--color-shadow);
  text-align: center;
}

.drop-zone {
  border: 2px dashed var(--color-primary);
  border-radius: 12px;
  padding: 4rem 2rem;
  background: #eff6ff;
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 2rem;
}

.drop-zone:hover, .drop-zone.dragover {
  background: #dbeafe;
  border-color: var(--color-primary-hover);
}

.drop-zone p {
  font-size: 1.125rem;
  color: var(--color-text-main);
  margin: 1rem 0;
  font-weight: 500;
}

.drop-zone span {
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

.tool-options {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.tool-options label {
  font-weight: 500;
}

.settings-panel {
  text-align: left;
  background: var(--color-bg);
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 2rem;
}

.btn-group {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.results-panel {
  margin-top: 2rem;
  padding: 1.5rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: #f8fafc;
  display: none;
}

.results-panel.active {
  display: block;
}

.results-stats {
  display: flex;
  justify-content: space-around;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.stat {
  text-align: center;
}

.stat-label {
  display: block;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-bottom: 0.25rem;
}

.stat-value {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-text-main);
}

.stat-value.success {
  color: var(--color-secondary);
}

/* ===== Footer ===== */
.footer {
  background-color: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: 4rem 0 2rem;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.footer-col h4 {
  font-size: 1.125rem;
  margin-bottom: 1.5rem;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-col a {
  color: var(--color-text-muted);
}

.footer-col a:hover {
  color: var(--color-primary);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
  color: var(--color-text-muted);
}

/* ===== Responsive Utilities ===== */
@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 80px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 80px);
    background-color: var(--color-surface);
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    transition: var(--transition);
    border-top: 1px solid var(--color-border);
  }
  
  .nav-links.active {
    left: 0;
  }
  
  .hamburger {
    display: flex;
  }
  
  .hamburger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  
  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }
  
  .hamburger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .hero h1 {
    font-size: 2rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
}
