:root {
  font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  font-weight: 400;

  color: rgba(255, 255, 255, 0.87);
  background-color: #0f172a;
  /* Deep blue/slate */

  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

body {
  margin: 0;
  display: flex;
  place-items: center;
  min-width: 320px;
  min-height: 100vh;
  overflow: hidden;
  /* Prevent scrolling */
  background-color: #0f172a;
}

/* Override for content pages (About, Blog) */
body.content-body {
  display: block !important;
  overflow-y: auto !important;
  place-items: initial !important;
  height: auto !important;
  min-height: 100vh;
}

#app {
  position: relative;
  width: 100%;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

#output_canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Cover the screen */
  z-index: 1;
}

#ui-layer {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  pointer-events: none;
  /* Let clicks pass through except on buttons */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2rem;
  box-sizing: border-box;
}

header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.counter-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 2rem 4rem;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.label {
  font-size: 1rem;
  color: #94a3b8;
  letter-spacing: 0.2em;
}

.count {
  font-size: 6rem;
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(to bottom, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
}

.feedback {
  font-size: 1.5rem;
  font-weight: 600;
  color: #38bdf8;
  /* Cyan-400 */
  text-align: center;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  min-height: 2rem;
  background: rgba(0, 0, 0, 0.3);
  padding: 0.5rem 1rem;
  border-radius: 10px;
}

footer {
  display: flex;
  justify-content: center;
  pointer-events: auto;
}

.glass-btn {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  padding: 12px 36px;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.glass-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.glass-btn:active {
  transform: translateY(0);
}

/* Landscape Mobile Tweaks */
@media (max-height: 500px) and (orientation: landscape) {
  #ui-layer {
    flex-direction: row;
    align-items: center;
    padding: 1rem;
  }

  header h1 {
    font-size: 1rem;
  }

  main {
    flex-direction: row;
  }

  .counter-box {
    padding: 1rem 2rem;
  }

  .count {
    font-size: 4rem;
  }
}

/* Start Screen */
#start-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.95);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10;
  flex-direction: column;
}

#start-screen.active {
  display: flex;
}

#start-screen .content {
  text-align: center;
  animation: fadeIn 0.5s ease-out;
}

#start-screen h1 {
  font-size: 3rem;
  font-weight: 900;
  margin-bottom: 0.5rem;
  background: linear-gradient(to right, #38bdf8, #818cf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

#start-screen p {
  color: #94a3b8;
  margin-bottom: 2rem;
  font-size: 1.2rem;
}

/* Main Start Button */
.primary-btn {
  background: linear-gradient(135deg, #38bdf8 0%, #3b82f6 100%);
  color: white;
  border: none;
  padding: 1.5rem 4rem;
  font-size: 1.5rem;
  font-weight: 800;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.5);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-top: 1rem;
}

.primary-btn:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 20px 35px -10px rgba(59, 130, 246, 0.6);
  filter: brightness(1.1);
}

.primary-btn:active {
  transform: translateY(-2px);
}

.hint {
  font-size: 1rem;
  color: #94a3b8;
  margin-top: 2rem;
  font-weight: 500;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Language Toggle Button */
.lang-toggle {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 100;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.lang-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

/* ===== Content Pages Styles ===== */

/* Scrollable Start Screen */
#start-screen {
  overflow-y: auto;
}

#start-screen.active {
  display: block;
}

.start-content {
  min-height: 100vh;
  padding: 2rem;
  padding-top: 4rem;
  box-sizing: border-box;
}

/* Hero Section */
.hero-section {
  text-align: center;
  padding: 2rem 0 3rem;
  animation: fadeIn 0.5s ease-out;
}

.hero-section h1 {
  font-size: 2.5rem;
  font-weight: 900;
  margin-bottom: 0.5rem;
  background: linear-gradient(to right, #38bdf8, #818cf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-section p {
  color: #94a3b8;
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

/* Content Sections */
.content-section {
  max-width: 800px;
  margin: 0 auto 3rem;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.content-section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #f1f5f9;
  margin-bottom: 1.5rem;
  text-align: center;
  background: linear-gradient(to right, #38bdf8, #818cf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Feature Grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: rgba(255, 255, 255, 0.05);
  padding: 1.5rem;
  border-radius: 15px;
  text-align: center;
  transition: transform 0.3s ease, background 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.08);
}

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

.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #f1f5f9;
  margin-bottom: 0.5rem;
}

.feature-card p {
  font-size: 0.9rem;
  color: #94a3b8;
  line-height: 1.5;
}

/* Steps List */
.steps-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.step-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.05);
  padding: 1.5rem;
  border-radius: 15px;
}

.step-number {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #38bdf8 0%, #3b82f6 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.step-content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #f1f5f9;
  margin-bottom: 0.25rem;
}

.step-content p {
  font-size: 0.9rem;
  color: #94a3b8;
  line-height: 1.5;
}

/* Guide Content */
.guide-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.guide-block {
  background: rgba(255, 255, 255, 0.05);
  padding: 1.5rem;
  border-radius: 15px;
}

.guide-block h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #f1f5f9;
  margin-bottom: 1rem;
}

.guide-block ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.guide-block li {
  font-size: 0.9rem;
  color: #94a3b8;
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
  line-height: 1.5;
}

.guide-block li::before {
  content: "•";
  color: #38bdf8;
  position: absolute;
  left: 0;
  font-weight: bold;
}

/* FAQ List */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  background: rgba(255, 255, 255, 0.05);
  padding: 1.5rem;
  border-radius: 15px;
}

.faq-item h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #f1f5f9;
  margin-bottom: 0.5rem;
}

.faq-item p {
  font-size: 0.9rem;
  color: #94a3b8;
  line-height: 1.5;
}

/* Site Footer */
.site-footer {
  text-align: center;
  padding: 2rem 0;
  margin-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.footer-links a {
  color: #64748b;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: #38bdf8;
}

.footer-copy {
  color: #475569;
  font-size: 0.8rem;
}

/* Mobile Responsive */
@media (max-width: 600px) {
  .start-content {
    padding: 1rem;
    padding-top: 3rem;
  }

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

  .content-section {
    padding: 1.5rem;
    margin-bottom: 2rem;
  }

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

  .guide-content {
    grid-template-columns: 1fr;
  }

  .footer-links {
    gap: 1rem;
  }
}

/* ===== Static Page Styles ===== */
.page-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
  min-height: 100vh;
}

.page-header {
  text-align: center;
  margin-bottom: 3rem;
  padding-top: 2rem;
}

.page-header h1 {
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(to right, #38bdf8, #818cf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
}

.page-header p {
  color: #64748b;
  font-size: 0.9rem;
}

.page-content {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 2rem;
}

.page-content h2 {
  font-size: 1.3rem;
  font-weight: 600;
  color: #f1f5f9;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.page-content h2:first-child {
  margin-top: 0;
}

.page-content p {
  color: #94a3b8;
  line-height: 1.8;
  margin-bottom: 1rem;
}

.page-content ul {
  color: #94a3b8;
  line-height: 1.8;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.page-content a {
  color: #38bdf8;
  text-decoration: none;
}

.page-content a:hover {
  text-decoration: underline;
}

.back-link {
  display: inline-block;
  margin-top: 2rem;
  color: #38bdf8;
  text-decoration: none;
  font-weight: 600;
}


.back-link:hover {
  text-decoration: underline;
}

/* ===== New Additions for AdSense Update ===== */

/* Navigation Bar */
.main-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.nav-links a {
  color: #bdc3c7;
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
  color: #38bdf8;
}

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

.blog-card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  background: rgba(255, 255, 255, 0.08);
}

.blog-card-content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: #f1f5f9;
}

.blog-card p {
  color: #94a3b8;
  font-size: 0.95rem;
  line-height: 1.6;
  flex: 1;
  margin-bottom: 1.5rem;
}

.read-more {
  text-align: right;
  color: #38bdf8;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}

.read-more:hover {
  text-decoration: underline;
}

/* Utility */
.hidden {
  display: none !important;
}

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

.mt-4 {
  margin-top: 1rem;
}

.mb-4 {
  margin-bottom: 1rem;
}