/* =================================================================
   1. GLOBAL STYLES & CSS VARIABLES
   ================================================================= */
:root {
  --primary-color: #0d6efd;
  --primary-hover: #0b5ed7;
  --secondary-color: #6c757d;
  --secondary-hover: #5c636a;
  --background-color: #f8f9fa;
  --surface-color: #ffffff;
  --text-color: #212529;
  --text-muted: #6c757d;
  --border-color: #dee2e6;
  --border-radius: 0.5rem; /* 8px */
  
  --diff-add-bg: rgba(40, 167, 69, 0.1);
  --diff-add-text: #155724;
  --diff-del-bg: rgba(220, 53, 69, 0.1);
  --diff-del-text: #721c24;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  
  --font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: 'SFMono-Regular', Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  margin: 0;
  background-color: var(--background-color);
  color: var(--text-color);
  line-height: 1.6;
}

/* =================================================================
   2. LAYOUT & CONTAINER
   ================================================================= */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
}

header {
  background-color: var(--surface-color);
  box-shadow: var(--shadow-sm);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--border-color);
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0;
  padding-bottom: 0;
}

.logo {
  font-weight: 700;
  font-size: 1.5rem;
  text-decoration: none;
  color: var(--primary-color);
}

nav a {
  margin-left: 1.5rem;
  text-decoration: none;
  color: var(--text-color);
  font-weight: 500;
  transition: color 0.2s ease;
}
nav a:hover {
  color: var(--primary-color);
}

.breadcrumb {
  margin-bottom: 1.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* =================================================================
   3. TOOL BOX & MAIN INTERFACE
   ================================================================= */
.tool-box {
  background-color: var(--surface-color);
  padding: 2rem;
  border-radius: 1rem; /* 16px */
  box-shadow: var(--shadow-md);
  text-align: center;
}

.tool-icon {
  width: 64px;
  height: 64px;
  margin-bottom: 1rem;
}

.tool-box h1 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 2.5rem;
}

.description {
  max-width: 700px;
  margin: 0 auto 2.5rem auto;
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* Input Panels */
.diff-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  text-align: left;
}

.text-panel label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

textarea {
  width: 100%;
  height: 300px;
  padding: 0.75rem 1rem;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  resize: vertical;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.25);
}

/* Action Buttons */
.action-buttons {
  margin: 1.5rem 0;
  display: flex;
  justify-content: center;
  gap: 1rem;
}

button {
  border: none;
  border-radius: var(--border-radius);
  padding: 0.75rem 1.75rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
button:active {
  transform: translateY(0);
}

#compareBtn {
  background-color: var(--primary-color);
  color: white;
}
#compareBtn:hover {
  background-color: var(--primary-hover);
}

.btn-secondary {
  background-color: var(--secondary-color);
  color: white;
}
.btn-secondary:hover {
  background-color: var(--secondary-hover);
}

/* Results Display */
.results-wrapper {
  margin-top: 2rem;
  text-align: left;
}

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #e9ecef;
  padding: 0.75rem 1.25rem;
  border-radius: var(--border-radius) var(--border-radius) 0 0;
  border: 1px solid var(--border-color);
  border-bottom: none;
}
.results-header h3 {
  margin: 0;
  font-size: 1.1rem;
}

.stats-display {
  font-weight: 500;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.diff-output {
  padding: 1.25rem;
  border: 1px solid var(--border-color);
  border-radius: 0 0 var(--border-radius) var(--border-radius);
  min-height: 150px;
  font-family: var(--font-mono);
  white-space: pre-wrap;
  word-wrap: break-word;
  line-height: 1.7;
  background-color: var(--surface-color);
}
.diff-output:empty::before {
  content: 'Comparison results will appear here...';
  color: var(--text-muted);
}

/* Difference Highlighting */
del {
  background-color: var(--diff-del-bg);
  color: var(--diff-del-text);
  text-decoration: none;
}
ins {
  background-color: var(--diff-add-bg);
  color: var(--diff-add-text);
  text-decoration: none;
}
.legend-del, .legend-add {
  padding: 2px 4px;
  border-radius: 4px;
  font-family: var(--font-mono);
}
.legend-del { background-color: var(--diff-del-bg); color: var(--diff-del-text); }
.legend-add { background-color: var(--diff-add-bg); color: var(--diff-add-text); }

/* =================================================================
   4. CONTENT & INFO SECTIONS
   ================================================================= */
.content-section {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}
.content-section h2 {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 2rem;
}

/* Related Tools Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}
.card {
  background-color: var(--surface-color);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  text-align: center;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}
.card a { margin-top: auto; text-decoration: none; }
.card button { width: 100%; }

/* FAQ Section */
.faq {
  max-width: 800px;
  margin: 0 auto;
}
.faq-item {
  background-color: var(--surface-color);
  padding: 1.25rem;
  border-radius: var(--border-radius);
  margin-bottom: 1rem;
  border: 1px solid var(--border-color);
}
.faq-item h3 { margin-top: 0; }

/* =================================================================
   5. FOOTER & UTILITIES
   ================================================================= */
footer {
  text-align: center;
  padding: 2rem 1rem;
  margin-top: 4rem;
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
}
.footer-links {
  margin-bottom: 1rem;
}
.footer-links a {
  margin: 0 0.75rem;
  color: var(--text-muted);
  text-decoration: none;
}
.footer-links a:hover {
  color: var(--primary-color);
}

#backToTop {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  font-size: 1.5rem;
  cursor: pointer;
  display: none;
  box-shadow: var(--shadow-md);
  transition: opacity 0.3s, transform 0.3s;
}
#backToTop:hover {
  background-color: var(--primary-hover);
  transform: scale(1.05);
}

.adsense {
  text-align: center;
  background: #e9ecef;
  padding: 1rem;
  margin: 2rem 0;
  border-radius: var(--border-radius);
}

/* =================================================================
   6. RESPONSIVE DESIGN
   ================================================================= */
@media (max-width: 768px) {
  .diff-container {
    grid-template-columns: 1fr;
  }
  .results-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  .tool-box h1 {
    font-size: 2rem;
  }
  .description {
    font-size: 1rem;
  }
}
/* style.css */

/* --- Global Styles & Variables --- */
:root {
  --primary: #0056ff;
  --secondary: linear-gradient(135deg, #00E0FF, #00FFFF); /* Bright Cyan Gradient */
  --text: #222;
}

body {
  font-family: Poppins, sans-serif;
  margin: 0;
  background: var(--secondary);
  color: var(--text);
}

.container {
  max-width: 1200px;
  margin: auto;
  padding: 20px;
}

/* --- Header Styles --- */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(90deg, #0056ff, #00aaff);
  padding: 15px 30px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: auto;
}

/* Logo */
.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: transform 0.3s ease;
}

.logo-img {
  margin-right: 12px;
  filter: brightness(1) invert(0.9) sepia(0.8) saturate(3) hue-rotate(45deg);
}

.logo-text {
  font-size: 24px;
  color: #fff;
  text-shadow: 1px 1px 5px rgba(0,0,0,0.3);
  font-weight: 700;
}

/* Navbar links */
#navbar {
  display: flex;
  align-items: center;
  gap: 20px;
}

#navbar a {
  color: #fff;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  transition: all 0.3s ease;
  padding: 5px 0;
}

#navbar a:hover {
  color: #fffa;
  transform: scale(1.1);
}

/* Hamburger Icon */
#hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
  z-index: 1002;
}

#hamburger span {
  width: 25px;
  height: 3px;
  background: #fff;
  border-radius: 3px;
  transition: all 0.3s ease;
}

/* Dropdown styles */
.dropdown {
  position: relative;
}

.dropbtn {
  background: none;
  border: none;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  font-size: 16px;
  font-family: Poppins, sans-serif;
}

.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #0056ff;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  min-width: 180px;
  z-index: 999;
  border: 1px solid #004acb;
}

.dropdown-content a {
  display: block;
  padding: 10px 15px;
  color: #ffffff;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.dropdown-content a:hover {
  background-color: #004acb;
}

.dropdown:hover .dropdown-content {
  display: block;
}

/* --- Mobile Responsive Menu --- */
@media screen and (max-width: 768px) {
  #hamburger {
    display: flex;
  }

  #navbar {
    position: fixed;
    top: 80px;
    right: 15px;
    width: 250px;
    background: linear-gradient(180deg, #0056ff, #00399d);
    flex-direction: column;
    align-items: flex-start;
    padding: 10px 0;
    gap: 0;
    box-shadow: -5px 5px 15px rgba(0,0,0,0.25);
    z-index: 1001;
    border-radius: 12px;
    transform: translateX(110%);
    transition: transform 0.3s ease-in-out;
  }

  #navbar.show {
    display: flex;
    transform: translateX(0);
  }

  #navbar a, .dropdown {
    padding: 15px 25px;
    text-align: left;
    width: 100%;
    box-sizing: border-box;
  }

  .dropdown-content {
    position: static;
    display: none;
    background: rgba(0, 0, 0, 0.2);
    box-shadow: none;
    border-radius: 0;
    border: none;
    min-width: 100%;
  }

  .dropdown-content a {
    color: #e0f7ff;
    font-weight: normal;
    padding-left: 40px;
  }

  .dropdown.active .dropdown-content {
    display: block;
  }
}

/* --- Footer Styles --- */
footer a {
  text-decoration: none;
  color: var(--primary);
  margin-right: 15px;
}

footer a:hover {
  color: #0039c1;
}

/* Social media icon hover effect */
.footer-social a:hover {
    transform: scale(1.15);
}