/* CSS RESET & DESIGN SYSTEM */
:root {
  --primary-color: #007bff;
  --primary-color-dark: #0056b3;
  --secondary-color: #f472b6;
  /* A secondary accent color */
  --background-light: #f8f9fa;
  --background-white: #ffffff;
  --text-dark: #212529;
  --text-light: #6c757d;
  --border-color: #dee2e6;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 6px 16px rgba(0, 0, 0, 0.12);
}

body.dark-mode {
  --primary-color: #0084ff;
  --primary-color-dark: #0060ba;
  --secondary-color: #f9a8d4;
  --background-light: #2a2a2e;
  --background-white: #1e1e22;
  --text-dark: #e1e1e1;
  --text-light: #a0a0a0;
  --border-color: #444;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.3s, color 0.3s;
  /* Animated Gradient Background */
  background: linear-gradient(315deg, #ffffff, #f8f9fa, #ffffff);
  background-size: 400% 400%;
  animation: gradientAnimation 20s ease infinite;
}

body.dark-mode {
  background: linear-gradient(315deg, #121212, #1a1a1d, #121212);
  background-size: 400% 400%;
  animation: gradientAnimation 20s ease infinite;
}

/* Restore solid background for main content */
main,
.header,
.footer {
  background-color: var(--background-white);
}

.article-section {
  background-color: var(--background-light);
}

/* GENERAL STYLES */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

section {
  padding: 4rem 0;
  background-color: var(--background-white);
  /* Ensure sections cover the animation */
}

h1,
h2,
h3,
h4 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-dark);
}

h1 {
  font-size: 3rem;
}

h2 {
  font-size: 2.5rem;
}

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

h4 {
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
  margin-top: 1.5rem;
  color: var(--primary-color);
}

p {
  margin-bottom: 1rem;
  color: var(--text-light);
}

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

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

.btn {
  display: inline-block;
  background-color: var(--primary-color);
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn:hover {
  background-color: var(--primary-color-dark);
  transform: translateY(-2px);
}

.btn:disabled {
  background-color: #ccc;
  color: #666;
  cursor: not-allowed;
  transform: none;
}

/* HEADER & NAVIGATION */
.header {
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 1000;
  transition: box-shadow 0.3s ease, background-color 0.3s;
}

.header.scrolled {
  box-shadow: var(--shadow);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary-color);
}

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

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-menu a {
  color: var(--text-dark);
  font-weight: 600;
  position: relative;
}

.nav-menu a.active-link::after,
.nav-menu a:hover::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 2px;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--primary-color);
  transition: width 0.3s ease;
}

.nav-menu a:not(:hover):not(.active-link)::after {
  width: 0;
}

/* THEME TOGGLE SWITCH */
.theme-switch-wrapper {
  display: flex;
  align-items: center;
}

.theme-switch {
  display: inline-block;
  height: 24px;
  position: relative;
  width: 50px;
}

.theme-switch input {
  display: none;
}

.slider {
  background-color: #ccc;
  bottom: 0;
  cursor: pointer;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
  transition: 0.4s;
  border-radius: 34px;
}

.slider:before {
  background-color: #fff;
  bottom: 4px;
  content: "";
  height: 16px;
  left: 4px;
  position: absolute;
  transition: 0.4s;
  width: 16px;
  border-radius: 50%;
}

input:checked+.slider {
  background-color: var(--primary-color);
}

input:checked+.slider:before {
  transform: translateX(26px);
}

.hamburger {
  display: none;
  cursor: pointer;
  z-index: 1001;
}

.hamburger .bar {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px auto;
  background-color: var(--text-dark);
  transition: all 0.3s ease-in-out;
}

/* HERO SECTION */
.hero {
  padding: 1rem 0;
  overflow: hidden;
  /* Prevents animation from overflowing */
  min-height: 90vh;
  /* Ensures the section has enough height */
  display: flex;
  align-items: center;
  background-color: transparent;
  /* Makes hero transparent to show body animation */
}

.hero h1,
.hero .subtext {
  color: var(--text-dark);
  /* Ensure text is readable */
}

body:not(.dark-mode) .hero h1,
body:not(.dark-mode) .hero .subtext {
  color: #333;
}

body.dark-mode .hero h1,
body.dark-mode .hero .subtext {
  color: #f1f1f1;
}

.hero-layout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
}

/* Left Column: Text */
.hero-text {
  flex: 1 1 55%;
  /* Takes up 55% of the width */
  text-align: left;
  /* Align text to the left */
}

.hero-text h1 {
  font-size: 3.2rem;
  /* Slightly smaller for the column layout */
  line-height: 1.2;
}

.hero-text .subtext {
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

/* --- ANIMATION RECREATED FROM IMAGE --- */

.hero-animation {
  flex: 1 1 45%;
  position: relative;
  min-height: 450px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  /* Hide particles that float off-screen */
}

.animation-scene {
  position: relative;
  width: 350px;
  height: 350px;
}

/* 1. CENTRAL ICON */
.center-icon-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  /* Centers the icon container */
  z-index: 10;
  animation: float 4s ease-in-out infinite;
}

.center-icon {
  width: 90px;
  height: 90px;
  background-color: var(--primary-color);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
  box-shadow: 0 10px 25px rgba(0, 123, 255, 0.4),
    inset 0 -4px 10px rgba(0, 0, 0, 0.1);
  position: relative;
}

.center-icon::before,
.center-icon::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 18px;
  z-index: -1;
}

.center-icon::before {
  transform: rotate(-5deg);
}

.center-icon::after {
  transform: rotate(5deg);
}

.center-icon i {
  font-size: 2.5rem;
}

.center-icon span {
  font-size: 0.9rem;
  font-weight: 700;
  margin-top: 5px;
}

/* 2. ORBITING PATHS & ICONS */
.orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  border: 2px dashed #e5e7eb;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.orbit-1 {
  width: 250px;
  height: 250px;
  animation: spin 30s linear infinite;
}

.orbit-2 {
  width: 350px;
  height: 350px;
  animation: spin 45s linear infinite reverse;
}

.orbit-icons-container {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
}

.tool-icon {
  position: absolute;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  font-size: 1.5rem;
  animation: float 4s ease-in-out infinite var(--float-delay, 0s);
  transform: translate(-50%, -50%);
}

.tool-icon-wrapper {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  transform-origin: center center;
}

.tool-icon-wrapper:nth-child(1) {
  transform: rotate(0deg);
}

.tool-icon-wrapper:nth-child(2) {
  transform: rotate(180deg);
}

.icon-edit {
  background: linear-gradient(145deg, #f9a8d4, #f472b6);
  box-shadow: 0 0 20px #f472b6;
}

.icon-sign {
  background: #34d399;
  box-shadow: 0 0 20px #34d399;
}

.icon-organize {
  background: #a78bfa;
  box-shadow: 0 0 20px #a78bfa;
}

.icon-crop {
  background: #fb7185;
  box-shadow: 0 0 20px #fb7185;
}

/* 3. FLOATING PARTICLES */
.particle {
  position: absolute;
  font-weight: 700;
  animation: twinkle 8s ease-in-out infinite;
  pointer-events: none;
}

.plus-1 {
  top: 25%;
  left: 15%;
  font-size: 1.5rem;
  color: #a78bfa;
  animation-delay: -2s;
}

.plus-2 {
  top: 80%;
  left: 10%;
  font-size: 1.2rem;
  color: #a78bfa;
  animation-delay: -5s;
}

.sparkle-1 {
  top: 75%;
  right: 15%;
  font-size: 1.2rem;
  color: #facc15;
  animation-delay: -1s;
}

.sparkle-2 {
  top: 10%;
  right: 25%;
  font-size: 1rem;
  color: #facc15;
  animation-delay: -6s;
}

.cross-1 {
  bottom: 20%;
  right: 20%;
  color: #9ca3af;
  animation-delay: -4s;
}

.circle-1 {
  width: 15px;
  height: 15px;
  border: 3px solid #fbbf24;
  border-radius: 50%;
  top: 20%;
  left: 45%;
  animation-delay: -3s;
}

/* ADVERTISEMENT PLACEHOLDERS */
.ad-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--background-light);
  border: 2px dashed var(--border-color);
  color: var(--text-light);
  font-size: 1rem;
  font-weight: 500;
}

.ad-banner {
  width: 728px;
  height: 90px;
  margin: 2rem auto;
}

/* TOOLS GRID */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.tool-card {
  display: flex;
  flex-direction: column;
  background-color: var(--background-white);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  position: relative;
  overflow: hidden;
}

.tool-card::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(0, 123, 255, 0.1), transparent);
  transition: opacity 0.5s ease;
  opacity: 0;
  transform: rotate(45deg);
}

body.dark-mode .tool-card::before {
  background: radial-gradient(circle, rgba(0, 132, 255, 0.15), transparent);
}

.tool-card:hover::before {
  opacity: 1;
}

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

body.dark-mode .tool-card:hover {
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.tool-card .icon {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
  transition: color 0.3s ease;
  flex-grow: 0;
  line-height: 1;
}

.tool-card:hover .icon {
  color: var(--primary-color-dark);
}

.tool-card h3 {
  margin-bottom: 0.5rem;
  color: var(--text-dark);
  font-size: 1.1rem;
}

.tool-card p {
  font-size: 0.9rem;
  color: var(--text-light);
  flex-grow: 1;
  /* Allows paragraph to fill space */
}

.new-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: var(--primary-color);
  color: white;
  font-size: 0.75rem;
  font-weight: bold;
  padding: 3px 8px;
  border-radius: 12px;
}

/* ARTICLE SECTION */
.article-section {
  transition: background-color 0.3s;
}

.article-section h2,
.article-section h3 {
  margin-bottom: 1rem;
}

.article-section ul {
  list-style-position: inside;
  padding-left: 1rem;
}

/* --- TOOL PAGE STYLES --- */
.tool-page-section {
  padding: 2rem 0;
}

.tool-header {
  text-align: center;
  margin-bottom: 3rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 2rem;
}

.tool-header h1 {
  color: var(--primary-color);
}

.tool-page-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: flex-start;
}

.tool-container {
  background-color: var(--background-white);
  padding: 2rem;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  /* For loader overlay */
}

.tool-info {
  background-color: var(--background-light);
  padding: 1.5rem 2rem;
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.tool-info h3 {
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 0.5rem;
  display: inline-block;
}

.tool-info ul {
  list-style-position: outside;
  margin-left: 1.2rem;
  color: var(--text-light);
}

.tool-info li {
  margin-bottom: 0.75rem;
}

/* TOOL UI ELEMENTS */
.upload-area {
  border: 3px dashed var(--border-color);
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.3s ease, background-color 0.3s ease;
  background-color: var(--background-light);
}

.upload-area.dragover {
  border-color: var(--primary-color);
  background-color: rgba(0, 123, 255, 0.1);
}

body.dark-mode .upload-area.dragover {
  background-color: rgba(0, 132, 255, 0.2);
}

#file-list {
  margin-top: 1.5rem;
  max-height: 250px;
  overflow-y: auto;
}

.file-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--background-light);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  margin-bottom: 0.5rem;
}

.remove-file {
  background: none;
  border: none;
  color: var(--primary-color);
  cursor: pointer;
  font-weight: bold;
  font-size: 1.2rem;
}

#tool-options {
  margin: 1.5rem 0;
  display: flex;
  flex-direction: column;
}

#tool-options label {
  display: block;
  margin-bottom: 0.25rem;
  font-weight: 600;
}

#tool-options input,
#tool-options select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background-color: var(--background-white);
  color: var(--text-dark);
}

.slider-container {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.slider-container input[type="range"] {
  flex-grow: 1;
}

.process-btn-container {
  text-align: center;
  margin-top: 2rem;
}

#output-area {
  margin-top: 2rem;
  text-align: center;
}

/* LOADER */
.loader-overlay {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.8);
  z-index: 10;
  border-radius: 12px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

body.dark-mode .loader-overlay {
  background: rgba(30, 30, 34, 0.8);
}

.loader {
  border: 8px solid #f3f3f3;
  border-top: 8px solid var(--primary-color);
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 1s linear infinite;
}

#loader-text {
  margin-top: 1rem;
  font-weight: 600;
  color: var(--text-dark);
}

/* --- FAQ SECTION STYLES (Netflix-like) --- */
.faq-section {
  padding: 4rem 0;
  background-color: var(--background-white);
  /* Use background-white for a slightly darker base in dark mode */
  text-align: center;
  border-top: 1px solid var(--border-color);
  /* Add a subtle separator */
}

body.dark-mode .faq-section {
  background-color: #1a1a1d;
  /* Even darker for true Netflix feel in dark mode */
}

.faq-section h2 {
  font-size: 2.8rem;
  /* Slightly larger heading */
  color: var(--text-dark);
  /* Will be light in dark mode */
  margin-bottom: 3rem;
  position: relative;
  display: inline-block;
  letter-spacing: -0.02em;
  /* Tighter letter spacing */
}

.faq-section h2::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -15px;
  /* Adjust position */
  transform: translateX(-50%);
  width: 100px;
  /* Wider underline */
  height: 5px;
  /* Thicker underline */
  background-color: var(--primary-color);
  border-radius: 3px;
}

.faq-container {
  max-width: 900px;
  /* Constrain width for better readability */
  margin: 0 auto;
}

.faq-item {
  background-color: var(--background-light);
  /* Slightly lighter than section background */
  margin-bottom: 0.5rem;
  border-radius: 6px;
  /* Slightly less rounded */
  text-align: left;
  cursor: pointer;
  transition: background-color 0.3s ease;
  overflow: hidden;
  /* Hide overflow for answer transition */
}

body.dark-mode .faq-item {
  background-color: #2a2a2e;
  /* Darker background for items in dark mode */
}

.faq-item:hover {
  background-color: var(--border-color);
  /* Subtle highlight on hover */
}

body.dark-mode .faq-item:hover {
  background-color: #333338;
}

.faq-question {
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

.faq-question h4 {
  font-size: 1.25rem;
  color: var(--text-dark);
  margin: 0;
}

.faq-icon {
  font-size: 2rem;
  color: var(--text-dark);
  transition: transform 0.3s ease;
  line-height: 1;
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-in-out, opacity 0.4s ease-in-out,
    padding 0.4s ease-in-out;
}

.faq-answer p {
  padding: 0 1.5rem 1rem 1.5rem;
  font-size: 1rem;
  color: var(--text-light);
  line-height: 1.6;
  margin: 0;
}

.faq-item.active .faq-answer {
  max-height: 200px;
  /* Adjust as needed */
  opacity: 1;
  padding-bottom: 1rem;
}

/* FOOTER */
.footer {
  color: #ccc;
  padding: 4rem 0;
  border-top: 5px solid var(--primary-color);
}

body:not(.dark-mode) .footer {
  background-color: #212529;
}

body.dark-mode .footer {
  background-color: #111;
}

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

.footer-col h4 {
  color: var(--background-white);
  margin-bottom: 1rem;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 0.5rem;
}

.footer-col ul a {
  color: #ccc;
}

.footer-col ul a:hover {
  color: var(--background-white);
  text-decoration: underline;
}

.footer-col p {
  color: #ccc;
  font-size: 0.9rem;
}

.copyright {
  text-align: center;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #444;
  font-size: 0.9rem;
}

/* FADE-IN ANIMATION */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* KEYFRAMES */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes spin {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }

  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

@keyframes float {

  0%,
  100% {
    transform: translate(-50%, -50%) translateY(0px);
  }

  50% {
    transform: translate(-50%, -50%) translateY(-15px);
  }
}

@keyframes twinkle {

  0%,
  100% {
    opacity: 0;
    transform: scale(0.5) translateY(0);
  }

  50% {
    opacity: 1;
    transform: scale(1) translateY(-10px);
  }
}

@keyframes gradientAnimation {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

/* RESPONSIVE DESIGN */
@media (max-width: 992px) {
  .hero-layout {
    flex-direction: column;
    text-align: center;
  }

  .hero-text {
    text-align: center;
  }

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

  .tool-info {
    margin-top: 2rem;
  }
}

@media (max-width: 768px) {
  h1 {
    font-size: 2.5rem;
  }

  h2 {
    font-size: 2rem;
  }

  section {
    padding: 3rem 0;
  }

  .nav-menu {
    position: fixed;
    left: -100%;
    top: 70px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: calc(100vh - 70px);
    background-color: var(--background-white);
    transition: 0.3s;
    gap: 2.5rem;
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-menu a {
    font-size: 1.5rem;
  }

  .hamburger {
    display: block;
  }

  .hamburger.active .bar:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .hamburger.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .nav-right {
    gap: 1rem;
  }

  .ad-banner {
    width: 90%;
  }

  .tools-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }

  .tool-container {
    padding: 1.5rem;
  }

  .faq-section h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
  }

  .faq-question h4 {
    font-size: 1.1rem;
  }

  .faq-icon {
    font-size: 1.5rem;
  }

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

@media (max-width: 480px) {
  h1 {
    font-size: 2rem;
  }

  .hero .subtext {
    font-size: 1rem;
  }

  .animation-scene {
    transform: scale(0.8);
  }

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

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

.why-section {
  text-align: center;
  /* padding: 4rem 1rem; */
  margin: 3rem;
  background-color: var(--background-white);
  border-radius: 12px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 2rem;
  text-align: left;
}

.feature-card {
  padding: 1.5rem;
  background-color: var(--background-white);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 20px rgba(0, 123, 255, 0.12);
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.feature-card h3 {
  font-size: 1.5rem;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.feature-card p {
  color: var(--text-light);
  line-height: 1.7;
}

.github {
  margin: 1rem 0 1rem 0;
}

.last_section {
  padding: 0;
}

/*
 * =================================================================
 *  UNIQUE STYLES FOR GITHUB README GENERATOR (GRG)
 *  Append this to the end of your main style.css file.
 * =================================================================
 */

/* --- Main Layout --- */
.grg-main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  padding: 1rem 2rem 2rem 2rem;
  max-width: 1600px;
  margin: 0 auto;
}

.grg-form-container section {
  background-color: var(--background-light);
  padding: 2rem;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  margin-bottom: 1.5rem;
}

.grg-form-container h2 {
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 0.5rem;
  display: inline-block;
}

/* --- Form Grid & Input Styling --- */
.grg-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.grg-form-group {
  display: flex;
  flex-direction: column;
}

.grg-form-group label {
  margin-bottom: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
}

.grg-form-group input[type="text"],
.grg-form-group input[type="url"] {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background-color: var(--input-bg);
  color: var(--text-dark);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.grg-form-group input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

/* --- Skills Section --- */
#grg-skills-tools p {
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--text-light);
}

#grg-skill-search {
  width: 100%;
  padding: 0.75rem;
  margin-bottom: 1rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background-color: var(--input-bg);
  color: var(--text-dark);
}

.grg-skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 1rem;
}

.grg-skill-category {
  grid-column: 1 / -1;
  margin-top: 1rem;
}

.grg-skill-category h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.grg-skill-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  background-color: var(--background-white);
  transition: background-color 0.2s, border-color 0.2s, transform 0.2s;
}

.grg-skill-card:hover {
  border-color: var(--primary-color);
  transform: translateY(-3px);
}

.grg-skill-card.grg-selected {
  border-color: var(--primary-color);
  background-color: rgba(0, 123, 255, 0.1);
}

body.dark-mode .grg-skill-card.grg-selected {
  background-color: rgba(0, 132, 255, 0.2);
}

.grg-skill-card img {
  height: 32px;
  width: 32px;
}

.grg-skill-card span {
  font-size: 0.8rem;
  text-align: center;
}

/* --- Add-ons Section --- */
.grg-form-group-checkbox {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background-color: var(--background-white);
  padding: 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.grg-form-group-checkbox input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary-color);
}

.grg-addons-grid {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* --- Output Panel --- */
.grg-output-container {
  position: sticky;
  top: 90px;
  height: calc(100vh - 110px);
}

.grg-control-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.grg-btn-danger {
  background-color: #ef4444;
  /* danger-color */
}

.grg-btn-danger:hover {
  background-color: #dc2626;
  /* danger-hover */
}

/* --- Tabs --- */
.grg-output-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
}

.grg-tab-link {
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 1rem;
  font-weight: 600;
  border-bottom: 3px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.grg-tab-link.grg-active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}

.grg-tab-content {
  display: none;
  height: calc(100% - 130px);
  overflow-y: auto;
  border: 1px solid var(--border-color);
  border-top: none;
  border-radius: 0 0 8px 8px;
  background-color: var(--background-white);
}

.grg-tab-content.grg-active {
  display: block;
}

#grg-markdown-output {
  background-color: #1e1e22;
  /* Consistent dark background for code */
}

#grg-markdown-output pre,
#grg-markdown-output code {
  height: 100%;
  margin: 0;
  background-color: transparent !important;
}

#grg-preview-output {
  padding: 1.5rem;
}

/* GitHub-like styling for preview */
#grg-preview-output h1,
#grg-preview-output h2,
#grg-preview-output h3 {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.3em;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}

#grg-preview-output p {
  margin-bottom: 1rem;
}

#grg-preview-output a {
  color: var(--primary-color);
}

#grg-preview-output img {
  max-width: 100%;
}

/* --- Responsive Design for Generator --- */
@media (max-width: 1200px) {
  .grg-main {
    grid-template-columns: 1fr;
  }

  .grg-output-container {
    position: static;
    height: auto;
    margin-top: 2rem;
  }
}

@media (max-width: 768px) {
  .grg-main {
    padding: 1rem;
    gap: 1.5rem;
  }

  .grg-form-grid {
    grid-template-columns: 1fr;
  }
}

/* =================================================================
 *  STYLES FOR INTERNAL LINK "NEXT STEP" BOX
 * ================================================================= */

.next-step-box {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  margin: 1.5rem 0;
  text-decoration: none;
  background-color: var(--background-light);
  border: 1px solid var(--border-color);
  border-left: 5px solid var(--primary-color);
  border-radius: 8px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.next-step-box:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.next-step-box .icon {
  font-size: 1.5rem;
  color: var(--primary-color);
  flex-shrink: 0;
}

.next-step-box .text-content p {
  margin: 0;
  font-weight: 600;
  color: var(--text-dark);
}

.next-step-box .text-content span {
  font-size: 0.9rem;
  color: var(--text-light);
}

/* ================================================================
   GLOBAL TOAST NOTIFICATION SYSTEM
   Usage (JS): showToast('Message', 'success'|'error'|'info')
   ================================================================ */
#toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  padding: 0.75rem 1.25rem;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: auto;
  max-width: 340px;
  word-break: break-word;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.toast-success {
  background: #22c55e;
  color: #fff;
}

.toast.toast-error {
  background: #ef4444;
  color: #fff;
}

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

/* Article section enhanced styles */
.article-section h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.article-section ul,
.article-section ol {
  margin: 0.5rem 0 1rem 1.5rem;
}

.article-section li {
  margin-bottom: 0.4rem;
}

.article-section pre {
  background: var(--background-light);
  padding: 1rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1rem 0;
}

.article-section code {
  background: var(--background-light);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 0.88em;
}