@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;700&family=Roboto:wght@400;700&display=swap');

body {
    font-family: 'Roboto', 'Open Sans', Arial, sans-serif;
    margin: 0;
    background: #f4f4f4;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    line-height: 1.6;
    color: #333;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Roboto', sans-serif;
    color: #000;
    margin-top: 1em;
    margin-bottom: 0.5em;
}

h1 {
    font-size: 2.5em;
}

h2 {
    font-size: 2em;
}

h3 {
    font-size: 1.75em;
}

p {
    margin-bottom: 1em;
}

ul, ol {
    margin-bottom: 1em;
    padding-left: 20px;
}

dt {
    font-weight: bold;
    margin-top: 1em;
}

dd {
    margin-left: 20px;
    margin-bottom: 0.5em;
}
header {
    background: #f8f8f8; /* Lighter background */
    color: #000; /* Even darker text for better contrast */
    padding: 10px 0;
    text-align: center;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    z-index: 1000;
}
.header-container .logo {
    display: flex;
    align-items: center;
}
.header-container .logo img {
    height: 40px; /* Adjust logo size as needed */
    margin-right: 10px;
}
.header-container .logo span {
    font-size: 24px;
    font-weight: bold;
    color: #000;
}
nav ul li a {
    color: #000; /* Ensure visibility in light mode */
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}
nav ul li a:hover {
    color: #007bff; /* Change color on hover */
}
.header-container {
    max-width: 1000px;
    margin: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}
.logo {
    font-size: 24px;
    font-weight: bold;
}
nav {
    display: flex;
    align-items: center; /* Align items vertically */
}
nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}
nav ul li {
    margin-left: 20px;
}

main {
    flex: 1;
    padding: 20px;
}
.container {
    max-width: 700px;
    margin: auto;
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    text-align: left; /* Align text to left for better readability */
}

.container h1, .container h2, .container h3 {
    text-align: center; /* Keep headings centered if desired, or change to left */
}
input[type="text"] {
    width: 80%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
}
button, a.download-btn {
    background: #ff0000;
    color: white;
    padding: 10px 15px;
    margin: 8px;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
button:hover, a.download-btn:hover {
    background: #cc0000;
}
.thumbnail-section {
    margin-top: 30px;
}
.hd-thumbnail {
    margin-bottom: 30px;
}
.hd-thumbnail img {
    max-width: 100%;
    border: 1px solid #ddd;
    border-radius: 5px;
    width: auto; /* Allow image to scale naturally */
    height: auto; /* Allow image to scale naturally */
}
.other-thumbnails-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* Adjust minmax as needed */
    gap: 20px;
    justify-content: center;
    align-items: start;
}
.thumbnail {
    margin: 0;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 8px;
    background: #f9f9f9;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    height: 100%; /* Ensure equal height for grid items */
    box-sizing: border-box; /* Include padding and border in the element's total width and height */
}
.thumbnail h3 {
    margin-top: 0;
    font-size: 1em;
    color: #555;
}
.thumbnail img {
    max-width: 100%;
    height: auto;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 10px;
    object-fit: contain; /* Ensure the entire image is visible within its bounds */
}
.thumbnail .download-btn {
    width: calc(100% - 16px); /* Adjust for margin */
    box-sizing: border-box;
    margin-top: auto; /* Push button to the bottom */
}

/* Dark theme styles */
body.dark-theme {
    background: #333;
    color: #f4f4f4;
}

body.dark-theme h1, body.dark-theme h2, body.dark-theme h3, body.dark-theme h4, body.dark-theme h5, body.dark-theme h6 {
    color: #f4f4f4;
}

body.dark-theme dt {
    color: #f4f4f4;
}
body.dark-theme header {
    background: #222;
    color: #f4f4f4;
    border-bottom: 1px solid #444;
}
body.dark-theme .header-container .logo span,
body.dark-theme nav ul li a {
    color: #f4f4f4;
}
body.dark-theme .container {
    background: #444;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
}
body.dark-theme input[type="text"] {
    background: #555;
    color: #f4f4f4;
    border: 1px solid #666;
}
body.dark-theme button,
body.dark-theme a.download-btn {
    background: #ff4444;
}
body.dark-theme button:hover,
body.dark-theme a.download-btn:hover {
    background: #cc3333;
}
body.dark-theme .thumbnail {
    background: #555;
    border: 1px solid #666;
}
body.dark-theme .thumbnail h3 {
    color: #f4f4f4;
}
body.dark-theme .thumbnail img {
    border: 1px solid #666;
}
body.dark-theme footer {
    background: #222;
    color: #f4f4f4;
    border-top: 1px solid #444;
}
#theme-toggle {
    font-size: 24px; /* Adjust as needed */
    margin-left: 20px;
    /* Remove default button styles that might interfere with alignment */
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}
body.dark-theme #theme-toggle {
    color: #f4f4f4;
}
footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 10px 0;
    margin-top: 20px;
}
.footer-container {
    max-width: 1000px;
    margin: auto;
    padding: 0 20px;
}
/* New UI styles for hero, steps, tools, faq, and footer */
/* UI polish: variables and theme-aware colors */
:root { --bg: #f5f7fb; --text: #111; --muted: #666; --card-bg: #fff; --border: #e6eaf2; --brand: #e82424; --brand-dark: #cc1c1c; }
.hero {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  margin: 20px auto;
  padding: 30px 20px;
}
.hero-content {
  max-width: 1000px;
  margin: 0 auto;
  text-align: center;
}
.hero .sub {
  color: #666;
  margin: 8px 0 16px;
}
.hero-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  max-width: 800px;
  margin: 0 auto;
}
.hero-form input[type="text"] {
  width: 100%;
}
.cta-btn,#getThumbnailBtn {
  background: #ff0000;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 12px 18px;
  font-weight: 700;
  cursor: pointer;
}
.cta-btn:hover,#getThumbnailBtn:hover { background: #cc0000; }

.trust-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 12px;
}
.trust-badges span { background: #f6f6f6; border: 1px solid #eee; padding: 6px 10px; border-radius: 20px; font-size: 0.95em; }

/* Steps */
.steps { max-width: 1000px; margin: 40px auto; }
.steps h2 { text-align: center; margin-bottom: 16px; }
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}
.step-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  padding: 20px 18px 18px 18px;
  position: relative;
}
.step-card h3 { margin-top: 6px; }
.step-card p { color: #555; }
.step-number {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: #ff0000;
  color: #fff;
  display: inline-flex;
  align-items: center; justify-content: center;
  font-weight: 700;
}

/* Tools */
.tools { max-width: 1000px; margin: 40px auto; }
.tools h2 { text-align: center; }
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}
.tool-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  padding: 20px;
}
.tool-card.disabled { opacity: 0.6; }
.tool-icon svg { width: 48px; height: 48px; }
.tool-link { display: inline-block; margin-top: 10px; text-decoration: none; }

/* FAQ */
.faq { max-width: 1000px; margin: 40px auto; }
.faq h2 { text-align: center; }
.faq-list details {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  padding: 12px 16px;
  margin-bottom: 12px;
}
.faq-list summary { cursor: pointer; font-weight: 700; }
.faq-list details[open] summary { margin-bottom: 8px; }

/* Footer */
footer { background: #f8f8f8; border-top: 1px solid #eee; }
.footer-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}
.footer-links { list-style: none; display: flex; gap: 16px; padding: 0; margin: 8px 0 0 0; }
.footer-links a { color: #000; text-decoration: none; }
.footer-links a:hover { color: #007bff; }

/* Responsive */
@media (max-width: 600px) {
  .hero-form { grid-template-columns: 1fr; }
}

/* Dark theme additions */
body.dark-theme .hero,
body.dark-theme .step-card,
body.dark-theme .tool-card,
body.dark-theme .faq-list details { background: #444; box-shadow: none; }
body.dark-theme .hero .sub, body.dark-theme .step-card p { color: #ddd; }
body.dark-theme .step-number { background: #ff4444; }
body.dark-theme .trust-badges span { background: #333; border-color: #555; color: #eee; }
body.dark-theme footer { background: #222; border-top-color: #444; }
body.dark-theme .footer-links a { color: #f4f4f4; }
body.dark-theme .thumbnail {
    background: #555;
    border: 1px solid #666;
}
body.dark-theme .thumbnail h3 {
    color: #f4f4f4;
}
body.dark-theme .thumbnail img {
    border: 1px solid #666;
}
body.dark-theme footer {
    background: #222;
    color: #f4f4f4;
    border-top: 1px solid #444;
}
#theme-toggle {
    font-size: 24px; /* Adjust as needed */
    margin-left: 20px;
    /* Remove default button styles that might interfere with alignment */
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}
body.dark-theme #theme-toggle {
    color: #f4f4f4;
}
footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 10px 0;
    margin-top: 20px;
}
.footer-container {
    max-width: 1000px;
    margin: auto;
    padding: 0 20px;
}
.thumbnail-section {
    margin-top: 30px;
}
.hd-thumbnail {
    margin-bottom: 30px;
}
.hd-thumbnail img {
    max-width: 100%;
    border: 1px solid #ddd;
    border-radius: 5px;
    width: auto; /* Allow image to scale naturally */
    height: auto; /* Allow image to scale naturally */
}
.other-thumbnails-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* Adjust minmax as needed */
    gap: 20px;
    justify-content: center;
    align-items: start;
}
.thumbnail {
    margin: 0;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 8px;
    background: #f9f9f9;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    height: 100%; /* Ensure equal height for grid items */
    box-sizing: border-box; /* Include padding and border in the element's total width and height */
}
.thumbnail h3 {
    margin-top: 0;
    font-size: 1em;
    color: #555;
}
.thumbnail img {
    max-width: 100%;
    height: auto;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 10px;
    object-fit: contain; /* Ensure the entire image is visible within its bounds */
}
.thumbnail .download-btn {
    width: calc(100% - 16px); /* Adjust for margin */
    box-sizing: border-box;
    margin-top: auto; /* Push button to the bottom */
}

/* Dark theme variables */
body.dark-theme { --bg: #0f1115; --text: #eaeef7; --muted: #b7c0d1; --card-bg: #1a1f29; --border: #2a3140; --brand: #ff4444; --brand-dark: #ff3333; }
body.dark-theme header { background: #161a22; box-shadow: none; border-bottom: 1px solid var(--border); }
body.dark-theme .hero { background: linear-gradient(180deg, #1a1f29 0%, #151922 100%); border-color: var(--border); }
body.dark-theme .thumbnail { background: var(--card-bg); border-color: var(--border); box-shadow: none; }
.cta-btn,#getThumbnailBtn { border-radius: 10px; padding: 14px 18px; background: var(--brand); box-shadow: 0 6px 16px rgba(232,36,36,0.25); }
.cta-btn:hover,#getThumbnailBtn:hover { background: var(--brand-dark); }
.trust-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 12px;
}
.trust-badges span { background: #f6f6f6; border: 1px solid #eee; padding: 6px 10px; border-radius: 20px; font-size: 0.95em; }

/* Steps */
.steps { max-width: 1000px; margin: 40px auto; }
.steps h2 { text-align: center; margin-bottom: 16px; }
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}
.step-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  padding: 20px 18px 18px 18px;
  position: relative;
}
.step-card h3 { margin-top: 6px; }
.step-card p { color: #555; }
.step-number {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: #ff0000;
  color: #fff;
  display: inline-flex;
  align-items: center; justify-content: center;
  font-weight: 700;
}

/* Tools */
.tools { max-width: 1000px; margin: 40px auto; }
.tools h2 { text-align: center; }
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}
.tool-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  padding: 20px;
}
.tool-card.disabled { opacity: 0.6; }
.tool-icon svg { width: 48px; height: 48px; }
.tool-link { display: inline-block; margin-top: 10px; text-decoration: none; }

/* FAQ */
.faq { max-width: 1000px; margin: 40px auto; }
.faq h2 { text-align: center; }
.faq-list details {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  padding: 12px 16px;
  margin-bottom: 12px;
}
.faq-list summary { cursor: pointer; font-weight: 700; }
.faq-list details[open] summary { margin-bottom: 8px; }

/* Footer */
footer { background: #f8f8f8; border-top: 1px solid #eee; }
.footer-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}
.footer-links { list-style: none; display: flex; gap: 16px; padding: 0; margin: 8px 0 0 0; }
.footer-links a { color: #000; text-decoration: none; }
.footer-links a:hover { color: #007bff; }

/* Responsive */
@media (max-width: 600px) {
  .hero { padding: 24px 16px; }
  .hero h1 { font-size: clamp(24px, 6vw, 34px); }
  .steps, .tools, .faq, .thumbnail-section { margin: 28px auto; }
}