/* =============================================
   UniDoc Password Protect — styles-password.css
   Dark theme matching Flutter app (Material 3)
   NO black text anywhere.
   ============================================= */

/* ── Variables ── */
:root {
  --primary: #7C4DFF;
  --primary-light: #B388FF;
  --primary-dark: #5E35B1;
  --secondary: #00E5FF;
  --tertiary: #FF4081;
  --accent-purple: #E040FB;
  --accent-amber: #FFB300;
  --accent-cyan: #00BCD4;
  --protect-green: #00C853;
  --protect-green-dark: #00A844;
  --surface: rgba(26,27,33,0.7);
  --surface-solid: #1A1B21;
  --surface-container: #252731;
  --background: #0D0E12;
  --text: #FFFFFF;
  --text-secondary: rgba(255,255,255,0.60);
  --text-muted: rgba(255,255,255,0.40);
  --border: rgba(255,255,255,0.08);
  --border-light: rgba(255,255,255,0.12);
  --outline: rgba(255,255,255,0.24);
  --outline-var: rgba(255,255,255,0.10);
  --radius: 16px;
  --radius-sm: 12px;
  --radius-xs: 10px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --shadow: 0 8px 32px rgba(0,0,0,0.3);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--background);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; color: var(--text); }
input, select, textarea { font-family: inherit; color: var(--text); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.hidden { display: none !important; }

/* ── Background Animation ── */
.bg-animation { position: fixed; inset: 0; z-index: -1; overflow: hidden; }
.bg-gradient {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(124,77,255,0.15), transparent),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(0,229,255,0.08), transparent),
    radial-gradient(ellipse 50% 30% at 10% 60%, rgba(255,64,129,0.06), transparent);
}
.bg-particles { position: absolute; inset: 0; }
.particle {
  position: absolute; width: 2px; height: 2px; background: rgba(124,77,255,0.4);
  border-radius: 50%; animation: float linear infinite;
}
@keyframes float {
  0% { transform: translateY(100vh) scale(0); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(-10vh) scale(1); opacity: 0; }
}

/* ── Navbar ── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 14px 0;
  background: rgba(13,14,18,0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-container {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo { display: flex; align-items: center; gap: 10px; font-size: 1.2rem; font-weight: 700; }
.nav-logo-img { width: 32px; height: 32px; border-radius: 8px; }
.logo-icon { font-size: 28px; color: var(--primary); }
.logo-text { color: var(--text); }
.logo-accent { color: var(--primary); }
.nav-links { display: flex; gap: 6px; }
.nav-link {
  padding: 8px 16px; border-radius: var(--radius-xs); font-size: 0.88rem;
  font-weight: 500; color: var(--text-secondary); transition: var(--transition);
}
.nav-link:hover, .nav-link.active { color: var(--text); background: rgba(124,77,255,0.1); }
.nav-cta {
  display: flex; align-items: center; gap: 8px; padding: 10px 20px;
  background: var(--primary); border-radius: var(--radius-sm); font-size: 0.85rem;
  font-weight: 600; color: #fff; transition: var(--transition);
}
.nav-cta:hover { background: var(--primary-dark); transform: translateY(-1px); }
.nav-cta .material-icons-round { font-size: 18px; }
.nav-toggle { display: none; color: var(--text); padding: 8px; }

.mobile-menu {
  display: none; position: fixed; top: 60px; left: 0; right: 0;
  background: rgba(13,14,18,0.95); backdrop-filter: blur(20px);
  padding: 16px 24px; border-bottom: 1px solid var(--border); z-index: 99;
  flex-direction: column; gap: 4px;
}
.mobile-menu.open { display: flex; }
.mobile-link {
  padding: 12px 16px; border-radius: var(--radius-xs); font-weight: 500;
  color: var(--text-secondary); transition: var(--transition);
}
.mobile-link:hover { color: var(--text); background: rgba(124,77,255,0.1); }

/* ── Hero ── */
.hero { padding: 150px 0 80px; text-align: center; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 20px;
  background: rgba(124,77,255,0.12); border: 1px solid rgba(124,77,255,0.25);
  border-radius: 100px; font-size: 0.85rem; font-weight: 600; color: var(--primary-light);
  margin-bottom: 32px;
}
.hero-badge .material-icons-round { font-size: 18px; }
.hero-title {
  font-size: clamp(2.2rem, 5vw, 4rem); font-weight: 800; line-height: 1.12;
  letter-spacing: -0.02em; margin-bottom: 20px; color: var(--text);
}
.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--secondary), var(--tertiary));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-subtitle {
  font-size: 1.1rem; color: var(--text-secondary); max-width: 620px;
  margin: 0 auto 36px; line-height: 1.7;
}

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 12px 24px;
  border-radius: var(--radius-sm); font-size: 0.9rem; font-weight: 600;
  transition: var(--transition); white-space: nowrap;
}
.btn .material-icons-round { font-size: 20px; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(124,77,255,0.3); }
.btn-lg { padding: 14px 32px; font-size: 1rem; }
.btn-sm { padding: 10px 20px; font-size: 0.85rem; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none !important; }
.btn-outline {
  background: transparent; color: var(--text); border: 1px solid var(--outline);
}
.btn-outline:hover { border-color: var(--primary); background: rgba(124,77,255,0.06); }
.btn-ghost {
  background: transparent; color: var(--text-secondary); padding: 10px 16px; font-size: 0.85rem;
}
.btn-ghost:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.btn-block { width: 100%; justify-content: center; padding: 16px; font-size: 1rem; }

.text-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px;
  border-radius: var(--radius-xs); font-size: 0.85rem; font-weight: 600;
  color: var(--primary-light); transition: var(--transition);
}
.text-btn:hover { background: rgba(124,77,255,0.08); }
.text-btn .material-icons-round { font-size: 18px; }

/* ── Sections ── */
.tool-section { padding: 60px 0 80px; }
.section-header { text-align: center; margin-bottom: 40px; }
.section-icon {
  display: inline-flex; padding: 14px; border-radius: var(--radius);
  margin-bottom: 16px;
}
.section-icon .material-icons-round { font-size: 30px; color: #fff; }
.protect-accent { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); }
.section-title { font-size: 1.8rem; font-weight: 700; margin-bottom: 10px; color: var(--text); }
.section-subtitle { font-size: 1rem; color: var(--text-secondary); max-width: 560px; margin: 0 auto; }
.section-subtitle strong { color: var(--text); font-weight: 600; }

/* ── Tool Card ── */
.tool-card {
  position: relative;
  max-width: 560px; margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  overflow: hidden;
}

/* ── Drop Zone ── */
.drop-zone {
  position: relative;
  border: 2px dashed var(--outline-var);
  border-radius: var(--radius);
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}
.drop-zone:hover, .drop-zone.drag-over {
  border-color: var(--primary);
  background: rgba(124,77,255,0.04);
}
.drop-zone-content { pointer-events: none; }
.drop-icon {
  font-size: 48px; color: var(--primary-light);
  margin-bottom: 12px; display: block;
}
.drop-zone h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 4px; color: var(--text); }
.drop-zone p { font-size: 0.88rem; color: var(--text-secondary); margin-bottom: 8px; }
.drop-hint { font-size: 0.78rem; color: var(--text-muted); }
.file-input {
  position: absolute; inset: 0; opacity: 0; cursor: pointer; z-index: 5;
}

/* ── File Info ── */
.file-info {
  display: flex; align-items: center; gap: 14px;
  padding: 16px; background: var(--surface-container);
  border-radius: var(--radius); margin-bottom: 20px;
}
.file-icon-wrap {
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 12px;
  background: rgba(124,77,255,0.15); flex-shrink: 0;
}
.file-icon-wrap .material-icons-round { font-size: 24px; color: var(--primary); }
.file-details { flex: 1; min-width: 0; }
.file-name {
  display: block; font-size: 0.92rem; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.file-size { display: block; font-size: 0.78rem; color: var(--text-muted); }
.file-remove {
  padding: 8px; border-radius: 50%; color: var(--text-muted); transition: var(--transition);
}
.file-remove:hover { background: rgba(255,255,255,0.05); color: var(--tertiary); }
.file-remove .material-icons-round { font-size: 20px; }

/* ── Password Section ── */
.password-section { margin-top: 8px; }
.password-options { margin-bottom: 16px; }
.toggle-label {
  display: flex; align-items: center; gap: 12px; cursor: pointer;
  font-size: 0.88rem; font-weight: 500; color: var(--text-secondary);
}
.toggle-label input { display: none; }
.toggle-slider {
  position: relative; width: 44px; height: 24px; background: var(--surface-container);
  border-radius: 12px; transition: var(--transition); flex-shrink: 0;
}
.toggle-slider::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px;
  background: #fff; border-radius: 50%; transition: var(--transition);
}
.toggle-label input:checked + .toggle-slider { background: var(--primary); }
.toggle-label input:checked + .toggle-slider::after { transform: translateX(20px); }

.password-field { margin-bottom: 20px; }
.password-field label {
  display: flex; align-items: center; gap: 8px; font-size: 0.85rem;
  font-weight: 600; color: var(--text-secondary); margin-bottom: 8px;
}
.password-field label .material-icons-round { font-size: 18px; color: var(--primary-light); }

.input-group {
  display: flex; align-items: center; background: rgba(26,27,33,0.5);
  border: 1px solid var(--outline-var); border-radius: 14px;
  padding: 0 4px 0 16px; transition: var(--transition);
}
.input-group:focus-within { border-color: var(--primary); }
.input-group input {
  flex: 1; padding: 13px 0; background: none; border: none; outline: none;
  font-size: 0.95rem; font-weight: 600; color: var(--text);
  font-family: 'JetBrains Mono', monospace;
}
.input-group input::placeholder { color: var(--text-muted); font-family: 'Inter', sans-serif; }
.input-btn {
  padding: 8px; border-radius: 50%; color: var(--text-muted); transition: var(--transition);
}
.input-btn:hover { background: rgba(255,255,255,0.05); color: var(--text-secondary); }
.input-btn .material-icons-round { font-size: 20px; }

.password-strength { margin-top: 10px; }
.strength-bar {
  height: 4px; background: var(--surface-container); border-radius: 2px;
  overflow: hidden; margin-bottom: 6px;
}
.strength-fill {
  height: 100%; width: 0; border-radius: 2px; transition: width 0.4s ease, background 0.4s ease;
}
.strength-text { font-size: 0.78rem; font-weight: 600; }

/* ── Progress ── */
.progress-section { padding: 24px 0; }
.progress-info {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px;
}
.progress-status { font-size: 0.88rem; font-weight: 600; color: var(--text); }
.progress-percent {
  font-size: 0.88rem; font-weight: 700; color: var(--primary-light);
  font-family: 'JetBrains Mono', monospace;
}
.progress-bar {
  height: 6px; background: var(--surface-container); border-radius: 3px; overflow: hidden;
}
.progress-fill {
  height: 100%; width: 0; border-radius: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transition: width 0.3s ease;
}

/* ── Success ── */
.success-section { text-align: center; padding: 32px 0 16px; }
.success-icon-wrap { margin-bottom: 16px; }
.success-icon-wrap .material-icons-round { font-size: 56px; color: #4CAF50; }
.success-section h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 6px; color: var(--text); }
.success-section > p { font-size: 0.88rem; color: var(--text-secondary); margin-bottom: 24px; }
.success-actions {
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
}

/* Key share / password display */
.key-share-info {
  background: var(--surface-container); border-radius: var(--radius);
  padding: 20px; margin-bottom: 24px; text-align: left;
  border: 1px solid var(--border-light);
}
.key-share-header {
  display: flex; align-items: center; gap: 8px; font-size: 0.85rem;
  font-weight: 600; color: var(--accent-amber); margin-bottom: 12px;
}
.key-share-header .material-icons-round { font-size: 18px; }
.key-share-data {
  display: block; padding: 12px 16px; background: rgba(0,0,0,0.3);
  border-radius: var(--radius-xs); font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem; color: var(--text); word-break: break-all;
  line-height: 1.6; margin-bottom: 12px;
}
.key-share-hint { font-size: 0.78rem; color: var(--text-muted); line-height: 1.5; }

/* ── Features ── */
.features-section { padding: 80px 0; }
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature-card {
  padding: 24px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); transition: var(--transition);
  backdrop-filter: blur(10px);
}
.feature-card:hover { border-color: var(--primary); transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,0.3); }
.feature-icon {
  display: inline-flex; padding: 12px; border-radius: 14px; margin-bottom: 16px;
  background: color-mix(in srgb, var(--accent) 15%, transparent);
}
.feature-icon .material-icons-round { font-size: 24px; color: var(--accent); }
.feature-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 6px; color: var(--text); }
.feature-card p { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.6; }

/* ── How It Works ── */
.how-section { padding: 80px 0; }
.steps-list { max-width: 600px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; }
.step-row { display: flex; align-items: flex-start; gap: 20px; width: 100%; }
.step-num {
  display: flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  font-size: 1.3rem; font-weight: 800; color: #fff;
}
.step-row h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 4px; color: var(--text); }
.step-row p { font-size: 0.88rem; color: var(--text-secondary); }
.step-line { width: 2px; height: 32px; background: linear-gradient(to bottom, var(--primary), transparent); margin-left: 23px; }

/* ── SEO Card ── */
.seo-section { padding: 60px 0; }
.seo-card {
  max-width: 740px; margin: 0 auto; padding: 36px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); backdrop-filter: blur(10px);
}
.seo-card h2 {
  font-size: 1.4rem; font-weight: 700; margin-bottom: 16px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.seo-card p { color: var(--text-secondary); font-size: 0.92rem; line-height: 1.8; margin-bottom: 12px; }
.seo-card p:last-child { margin-bottom: 0; }
.seo-card strong { color: var(--text); font-weight: 600; }

/* ── FAQ ── */
.faq-section { padding: 80px 0; }
.faq-list { max-width: 660px; margin: 0 auto; }
.faq-item {
  margin-bottom: 10px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-xs); overflow: hidden; transition: var(--transition);
}
.faq-item[open] { border-color: rgba(124,77,255,0.3); }
.faq-item summary {
  padding: 16px 22px; font-size: 0.92rem; font-weight: 600; cursor: pointer;
  list-style: none; display: flex; align-items: center; justify-content: space-between;
  color: var(--text); transition: var(--transition);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-size: 1.3rem; color: var(--text-muted); font-weight: 300; }
.faq-item[open] summary::after { content: '\2212'; color: var(--primary); }
.faq-item summary:hover { color: var(--primary-light); }
.faq-item p { padding: 0 22px 16px; color: var(--text-secondary); font-size: 0.88rem; line-height: 1.7; }
.faq-item a { color: var(--primary-light); text-decoration: underline; text-underline-offset: 2px; }
.faq-item a:hover { color: var(--primary); }

/* ── CTA Section ── */
.cta-section { padding: 60px 0 80px; }
.cta-card {
  max-width: 740px; margin: 0 auto; padding: 48px 36px; text-align: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); backdrop-filter: blur(10px);
}
.cta-card h2 { font-size: 1.6rem; font-weight: 700; margin-bottom: 12px; color: var(--text); }
.cta-card p { color: var(--text-secondary); font-size: 0.95rem; margin-bottom: 28px; max-width: 480px; margin-left: auto; margin-right: auto; }
.cta-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ── Footer ── */
.footer { padding: 40px 0 28px; border-top: 1px solid var(--border); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-logo { width: 28px; height: 28px; border-radius: 8px; }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a { font-size: 0.88rem; color: var(--text-secondary); transition: var(--transition); }
.footer-links a:hover { color: var(--primary); }
.footer-bottom { padding-top: 20px; border-top: 1px solid var(--border); }
.footer-bottom p { font-size: 0.78rem; color: var(--text-muted); text-align: center; }

/* ── Toast ── */
.toast {
  position: fixed; bottom: -80px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px; padding: 14px 24px;
  background: var(--surface-solid); border: 1px solid var(--border);
  border-radius: var(--radius-sm); box-shadow: 0 12px 40px rgba(0,0,0,0.4);
  z-index: 200; transition: bottom 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.toast.show { bottom: 28px; }
.toast-icon { font-size: 22px; }
.toast-icon.success { color: #4CAF50; }
.toast-icon.error { color: var(--tertiary); }
#toastMsg { font-size: 0.88rem; font-weight: 500; color: var(--text); }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: flex; }
  .hero { padding: 120px 0 60px; }
  .hero-title { font-size: 2rem; }
  .features-grid { grid-template-columns: 1fr; }
  .tool-card { padding: 20px; }
  .drop-zone { padding: 36px 16px; }
  .footer-inner { flex-direction: column; gap: 20px; text-align: center; }
  .footer-links { flex-wrap: wrap; justify-content: center; }
  .seo-card { padding: 24px; }
  .cta-card { padding: 36px 24px; }
  .success-actions { flex-direction: column; align-items: center; }
}
@media (max-width: 480px) {
  .hero-title { font-size: 1.7rem; }
  .tool-card { padding: 16px; }
}
