:root {
  /* Dark Mode (Default) */
  --background-color: #0f172a;
  --bg-gradient: radial-gradient(circle at top left, #1e293b, #0f172a);
  --text-color: #f1f5f9;
  --text-muted: #94a3b8;
  --primary-color: #38bdf8;
  --primary-glow: rgba(56, 189, 248, 0.4);
  --error-color: #f43f5e;
  --success-color: #10b981;
  --input-background: #1e293b;
  --input-border: #334155;
  --button-hover: #0ea5e9;
  --card-background: rgba(30, 41, 59, 0.7);
  --ad-background: rgba(255, 255, 255, 0.03);
  --ad-text: #475569;
  --nav-bg: rgba(15, 23, 42, 0.8);
}

body.light-mode {
  --background-color: #f8fafc;
  --bg-gradient: radial-gradient(circle at top left, #ffffff, #f1f5f9);
  --text-color: #1e293b;
  --text-muted: #64748b;
  --primary-color: #0284c7;
  --primary-glow: rgba(2, 132, 199, 0.2);
  --error-color: #e11d48;
  --success-color: #059669;
  --input-background: #ffffff;
  --input-border: #e2e8f0;
  --button-hover: #0369a1;
  --card-background: rgba(255, 255, 255, 0.9);
  --ad-background: rgba(0, 0, 0, 0.03);
  --ad-text: #94a3b8;
  --nav-bg: rgba(255, 255, 255, 0.8);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--background-color);
  color: var(--text-color);
  line-height: 1.6;
  background-image: var(--bg-gradient);
  background-attachment: fixed;
  transition: background-color 0.4s ease, color 0.4s ease;
  overflow-x: hidden;
}

/* Subtle Noise Texture */
body::before {
  content: "";
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: url('https://www.transparenttextures.com/patterns/carbon-fibre.png');
  opacity: 0.03;
  pointer-events: none;
  z-index: 1000;
}

/* Header & Nav */
header {
  position: sticky;
  top: 0;
  width: 100%;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  z-index: 100;
  border-bottom: 1px solid var(--input-border);
  padding: 0.75rem 0;
}

nav {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2rem;
}

.logo {
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.025em;
  color: var(--primary-color);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-color);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--primary-color);
}

/* Main Container */
.container {
  max-width: 1000px;
  margin: 2rem auto;
  padding: 0 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3rem;
}

/* Ad Placeholders */
.ad-placeholder {
  width: 100%;
  max-width: 728px;
  height: 90px;
  background: var(--ad-background);
  border: 1px dashed var(--ad-text);
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--ad-text);
  font-size: 0.7rem;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* Tool Section */
main {
  text-align: center;
  background: var(--card-background);
  padding: 3rem;
  border-radius: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3), 0 0 0 1px var(--input-border);
  width: 100%;
  max-width: 600px;
  backdrop-filter: blur(20px);
}

h1 {
  font-size: 2.5rem;
  font-weight: 900;
  margin-bottom: 1rem;
  letter-spacing: -0.05em;
  background: linear-gradient(to right, var(--primary-color), #818cf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.lead {
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  font-size: 1.1rem;
}

#password-checker-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

#password-input {
  padding: 1rem 1.25rem;
  border: 2px solid var(--input-border);
  border-radius: 12px;
  background: var(--input-background);
  color: var(--text-color);
  font-size: 1.1rem;
  outline: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#password-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px var(--primary-glow);
}

button[type="submit"] {
  padding: 1rem;
  border: none;
  border-radius: 12px;
  background: var(--primary-color);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 10px 15px -3px var(--primary-glow);
}

button[type="submit"]:hover {
  background: var(--button-hover);
  transform: translateY(-2px);
  box-shadow: 0 20px 25px -5px var(--primary-glow);
}

/* Educational Sections */
.info-section {
  width: 100%;
  background: var(--card-background);
  padding: 3rem;
  border-radius: 24px;
  border: 1px solid var(--input-border);
}

.info-section h2 {
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

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

.card h3 {
  margin-bottom: 0.75rem;
  color: var(--primary-color);
}

.card p {
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* Partnership/Contact Form */
.partnership-section {
  width: 100%;
  max-width: 600px;
  background: var(--card-background);
  padding: 2.5rem;
  border-radius: 24px;
  border: 1px solid var(--input-border);
}

#partnership-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  text-align: left;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
}

.form-group input, .form-group textarea {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid var(--input-border);
  border-radius: 8px;
  background: var(--input-background);
  color: var(--text-color);
}

/* Footer */
footer {
  width: 100%;
  padding: 4rem 2rem;
  background: var(--nav-bg);
  border-top: 1px solid var(--input-border);
  margin-top: 4rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 3rem;
}

.footer-section h4 {
  margin-bottom: 1.25rem;
  font-size: 1.1rem;
}

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

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

.footer-section a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
}

.footer-section a:hover {
  color: var(--primary-color);
}

.copyright {
  text-align: center;
  margin-top: 3rem;
  font-size: 0.8rem;
  color: var(--ad-text);
}

/* Comments Section */
.comments-section {
  width: 100%;
  max-width: 800px;
  padding: 2.5rem;
  background: var(--card-background);
  border-radius: 24px;
  border: 1px solid var(--input-border);
}

/* Theme Toggle Button Refinement */
.theme-toggle {
  background: var(--input-background);
  border: 1px solid var(--input-border);
  color: var(--text-color);
  padding: 0.5rem 1rem;
  border-radius: 99px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.theme-toggle:hover {
  border-color: var(--primary-color);
  background: var(--nav-bg);
}
