html {
  background: #ffffff;
}

[data-theme="dark"] {
  background: #111111;
}

body {
  opacity: 0;
  animation: fadeIn 0.2s ease forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

/* =========================================================================
   VARIABLES & DESIGN SYSTEM
========================================================================= */
:root {
  /* Colors - Light Mode (Default) */
  --bg-color: #ffffff;
  --text-color: #111111;
  --text-muted: #555555;
  --accent-color: #FF0000;
  --accent-hover: #cc0000;
  --border-color: #e5e5e5;
  --card-bg: #f9f9f9;

  /* Ads */
  --ad-bg: #f5f5f5;
  --ad-border: #cccccc;

  /* Navbar & Footer */
  --nav-bg: rgba(255, 255, 255, 0.95);
  --footer-bg: #f1f1f1;

  /* Layout */
  --max-width: 1200px;
  --border-radius: 8px;
  --transition: all 0.2s ease-in-out;
}

[data-theme="dark"] {
  /* Colors - Dark Mode */
  --bg-color: #1a1a1a;
  --text-color: #ffffff;
  --text-muted: #aaaaaa;
  --border-color: #333333;
  --card-bg: #222222;

  /* Ads */
  --ad-bg: #2a2a2a;
  --ad-border: #444444;

  /* Navbar & Footer */
  --nav-bg: rgba(26, 26, 26, 0.95);
  --footer-bg: #111111;
}

/* =========================================================================
   RESET & TYPOGRAPHY
========================================================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  transition: background-color var(--transition), color var(--transition);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

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

a:hover {
  text-decoration: underline;
  text-decoration-color: var(--accent-color);
}

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

/* =========================================================================
   LAYOUT UTILITIES
========================================================================= */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.main-content {
  flex: 1;
  padding: 40px 0;
}

/* =========================================================================
   COMPONENTS
========================================================================= */

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  background-color: var(--nav-bg);
  border-bottom: 1px solid var(--border-color);
  z-index: 100;
  backdrop-filter: blur(10px);
}

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

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text-color);
}

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

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-links a {
  font-weight: 500;
  font-size: 0.95rem;
}

.nav-links a:hover {
  color: var(--accent-color);
  text-decoration: none;
}

.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-color);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-radius: 50%;
  transition: background-color var(--transition);
}

.theme-toggle:hover {
  background-color: var(--card-bg);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

#sun-icon {
  display: none;
}

[data-theme="dark"] #moon-icon {
  display: none;
}

[data-theme="dark"] #sun-icon {
  display: block;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 24px;
  background-color: var(--accent-color);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color var(--transition), transform 0.1s;
  text-align: center;
}

.btn:hover {
  background-color: var(--accent-hover);
  text-decoration: none;
}

.btn:active {
  transform: scale(0.98);
}

.btn-green {
  background-color: #10b981;
}

.btn-green:hover {
  background-color: #059669;
}

.btn-block {
  display: block;
  width: 100%;
}

/* Forms & Inputs */
.input-group {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  width: 100%;
  max-width: 800px;
  margin: 0 auto 32px;
}

.form-control {
  flex: 1;
  padding: 16px 20px;
  font-size: 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  background-color: var(--bg-color);
  color: var(--text-color);
  transition: border-color var(--transition);
  font-family: inherit;
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-color);
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 60px 0;
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 16px;
  color: var(--text-color);
  line-height: 1.2;
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 40px;
}

/* Ad Spaces */
.ad-space {
  background-color: var(--ad-bg);
  border: 2px dashed var(--ad-border);
  border-radius: var(--border-radius);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  margin: 32px auto;
}

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

.ad-sidebar {
  width: 300px;
  height: 600px;
  margin: 0 auto;
}

/* Thumbnail Results Area */
.results-area {
  margin-top: 40px;
  display: none;
}

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

.error-message {
  color: var(--accent-color);
  text-align: center;
  margin-bottom: 20px;
  font-weight: 600;
  display: none;
}

/* Two column layout for desktop */
.layout-wrapper {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

.content-col {
  flex: 1;
  min-width: 0;
}

.sidebar-col {
  display: none;
}

@media (min-width: 992px) {
  .sidebar-col {
    display: block;
    width: 300px;
    flex-shrink: 0;
    position: sticky;
    top: 90px;
  }
}

/* Thumbnail Cards */
.thumbnail-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 24px;
  margin-bottom: 24px;
}

.thumbnail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.thumbnail-title {
  font-size: 1.25rem;
  font-weight: 700;
}

.thumbnail-badge {
  background-color: var(--accent-color);
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.thumbnail-preview {
  margin-bottom: 20px;
  border-radius: var(--border-radius);
  overflow: hidden;
  position: relative;
  background-color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.thumbnail-preview img {
  width: 100%;
  max-width: 100%;
  max-height: 380px;
  object-fit: contain;
  transition: transform 0.3s ease;
}

/* How It Works Section */
.how-it-works {
  padding: 60px 0;
  text-align: center;
}

.section-title {
  font-size: 2rem;
  margin-bottom: 40px;
  font-weight: 700;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.step-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 32px 24px;
}

.step-number {
  width: 48px;
  height: 48px;
  background-color: var(--accent-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 auto 20px;
}

.step-card h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
}

/* FAQ Section */
.faq-section {
  padding: 60px 0;
}

.faq-item {
  border-bottom: 1px solid var(--border-color);
  padding: 24px 0;
}

.faq-question {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-color);
}

.faq-answer {
  color: var(--text-muted);
}

/* Standard Content Pages (Privacy, Terms, About) */
.page-header {
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.page-header h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.prose {
  max-width: 800px;
  margin: 0 auto;
}

.prose h2 {
  margin: 32px 0 16px;
  font-size: 1.5rem;
}

.prose p {
  margin-bottom: 16px;
  color: var(--text-muted);
}

.prose ul,
.prose ol {
  margin: 0 0 24px 24px;
  color: var(--text-muted);
}

.prose li {
  margin-bottom: 8px;
}

/* Blog Grid */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
}

.blog-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.blog-image {
  height: 180px;
  background-color: var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.blog-content {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-date {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.blog-title {
  font-size: 1.25rem;
  margin-bottom: 12px;
  line-height: 1.3;
}

.blog-excerpt {
  color: var(--text-muted);
  margin-bottom: 20px;
  font-size: 0.95rem;
  flex: 1;
}

.blog-read-more {
  align-self: flex-start;
  color: var(--accent-color);
  font-weight: 600;
  font-size: 0.95rem;
}

/* Contact Form */
.contact-form {
  max-width: 600px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}

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

.contact-info {
  text-align: center;
  margin-bottom: 40px;
}

.contact-info a {
  color: var(--accent-color);
  font-size: 1.2rem;
  font-weight: 600;
}

.map-placeholder {
  width: 100%;
  height: 300px;
  background-color: var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--border-radius);
  margin-top: 40px;
  color: var(--text-muted);
}

/* Footer */
.footer {
  background-color: var(--footer-bg);
  border-top: 1px solid var(--border-color);
  padding: 40px 0 20px;
  margin-top: auto;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-bottom: 24px;
}

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

.footer-links a:hover {
  color: var(--accent-color);
}

.copyright {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* =========================================================================
   RESPONSIVE
========================================================================= */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    /* simple mobile hide for minimal requirement, would need a hamburger menu generally but preserving scope */
  }

  .input-group {
    flex-direction: column;
  }

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

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

  .page-header h1 {
    font-size: 2rem;
  }
}

/* =========================================================================
   SOCIAL SHARE BAR
   ========================================================================= */
.share-bar {
  text-align: center;
  margin: 30px 0;
}
.share-text {
  font-size: 0.9rem;
  color: #888;
  margin-bottom: 12px;
}
.share-buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.share-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, opacity 0.2s;
}
.share-btn:hover {
  transform: scale(1.1);
  opacity: 0.9;
}
.facebook { background: #1877f2; }
.twitter { background: #1da1f2; }
.whatsapp { background: #25d366; }
.telegram { background: #0088cc; }
.copylink { background: #555; }