* {
  box-sizing: border-box;
}

:root {
  --bg: #071225;
  --bg2: #0e1230;
  --panel: rgba(17, 29, 55, 0.9);
  --panel-soft: rgba(17, 29, 55, 0.72);
  --line: rgba(148, 163, 184, 0.16);
  --text: #eef6ff;
  --muted: #97a9c7;
  --soft: #cbd7ee;
  --cyan: #18c6d4;
  --blue: #3b82f6;
  --danger: #fb7185;
  --green: #86efac;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background:
    radial-gradient(circle at 10% 0%, rgba(24, 198, 212, 0.13), transparent 28%),
    radial-gradient(circle at 100% 0%, rgba(59, 130, 246, 0.11), transparent 34%),
    linear-gradient(135deg, #061424 0%, #0b1029 52%, #111033 100%);
  overflow-x: hidden;
}

body,
button,
input,
textarea {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

/* Page shell */

.fn-page {
  width: min(1440px, calc(100% - 32px));
  margin: 0 auto;
  padding: 26px 0 56px;
}

.fn-header {
  width: min(1120px, 100%);
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.fn-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: white;
  text-decoration: none;
  min-width: 0;
}

.fn-logo {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 15px;
  font-size: 14px;
  font-weight: 900;
  background: linear-gradient(135deg, #22d3ee, #3b82f6);
  box-shadow: 0 16px 40px rgba(24, 198, 212, 0.16);
}

.fn-brand strong {
  display: block;
  font-size: 15px;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.fn-brand small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.fn-nav {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.fn-nav a {
  color: #dbe7fb;
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
}

.fn-nav-cta {
  padding: 10px 14px;
  border: 1px solid rgba(24, 198, 212, 0.26);
  border-radius: 999px;
  background: rgba(24, 198, 212, 0.12);
  color: white !important;
}

.fn-menu-btn {
  display: none;
  border: 1px solid var(--line);
  background: rgba(17, 29, 55, 0.72);
  color: white;
  border-radius: 12px;
  padding: 10px 13px;
  font-size: 13px;
  font-weight: 900;
}

/* Ads: hidden if no code because index.php renders only real ad code */

.ad-slot {
  overflow: hidden;
}

.ad-top {
  width: min(1120px, 100%);
  min-height: 90px;
  margin: 0 auto 18px;
}

.fn-layout {
  display: grid;
  grid-template-columns: minmax(0, 1120px);
  justify-content: center;
  gap: 18px;
}

.fn-layout:has(.ad-left):has(.ad-right) {
  grid-template-columns: 160px minmax(0, 1120px) 160px;
}

.fn-layout:has(.ad-left):not(:has(.ad-right)) {
  grid-template-columns: 160px minmax(0, 1120px);
}

.fn-layout:not(:has(.ad-left)):has(.ad-right) {
  grid-template-columns: minmax(0, 1120px) 160px;
}

.ad-side {
  position: sticky;
  top: 18px;
  min-height: 600px;
}

.fn-main {
  min-width: 0;
}

/* Hero */

.fn-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.03fr) minmax(380px, 0.92fr);
  gap: clamp(24px, 4vw, 44px);
  align-items: center;
  padding: 38px 0 16px;
}

.fn-hero-copy {
  min-width: 0;
}

.fn-pill {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 8px 12px;
  border: 1px solid rgba(24, 198, 212, 0.24);
  border-radius: 999px;
  background: rgba(24, 198, 212, 0.1);
  color: #78f4ff;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
}

.fn-hero h1 {
  max-width: 720px;
  margin: 18px 0 16px;
  color: var(--text);
  font-size: clamp(46px, 5vw, 72px);
  line-height: 0.95;
  letter-spacing: -0.005em;
  font-weight: 600;
}

.fn-hero-text {
  max-width: 640px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(16px, 1.45vw, 18px);
  line-height: 1.72;
}

.fn-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.fn-btn {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 18px;
  border-radius: 15px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 900;
}

.fn-btn-primary {
  color: white;
  background: linear-gradient(135deg, #18c6d4, #3b82f6);
  box-shadow: 0 18px 42px rgba(59, 130, 246, 0.2);
}

.fn-btn-secondary {
  color: #e7efff;
  border: 1px solid var(--line);
  background: rgba(17, 29, 55, 0.72);
}

.fn-mini-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.fn-mini-list span {
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: #d9e7ff;
  font-size: 13px;
  font-weight: 800;
}

/* Tool */

.fn-tool-wrap {
  min-width: 0;
}

.fn-tool-card {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 24px;
  padding: 22px;
  background:
    radial-gradient(circle at 100% 0%, rgba(24, 198, 212, 0.16), transparent 32%),
    rgba(17, 29, 55, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.fn-tool-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.fn-tool-head strong,
.fn-tool-head span {
  display: block;
}

.fn-tool-head strong {
  font-size: 15px;
}

.fn-tool-head span {
  color: var(--muted);
  margin-top: 4px;
  font-size: 12px;
}

.fn-tool-head b {
  color: var(--green);
  font-size: 12px;
  white-space: nowrap;
}

label {
  display: block;
  margin-bottom: 8px;
  color: white;
  font-size: 13px;
  font-weight: 900;
}

.fn-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

input {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  background: rgba(5, 12, 28, 0.72);
  color: white;
  padding: 14px 15px;
  outline: none;
  font-size: 14px;
}

input:focus {
  border-color: rgba(24, 198, 212, 0.62);
  box-shadow: 0 0 0 4px rgba(24, 198, 212, 0.08);
}

button {
  border: 0;
  border-radius: 13px;
  padding: 13px 15px;
  color: white;
  background: rgba(55, 68, 105, 0.86);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

button.primary {
  background: linear-gradient(135deg, #18c6d4, #3b82f6);
}

button.danger {
  color: #ffe4e6;
  border: 1px solid rgba(251, 113, 133, 0.18);
  background: rgba(225, 29, 72, 0.22);
}

.fn-tool-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 12px;
}

.status {
  margin-top: 12px;
  color: #7dd3fc;
  font-size: 13px;
  font-weight: 800;
}

/* Info grid */

.fn-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 26px 0;
}

.fn-info-grid article {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  background: rgba(17, 29, 55, 0.72);
}

.fn-info-grid strong {
  display: block;
  font-size: 15px;
}

.fn-info-grid p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.62;
}

/* Inbox */

.fn-inbox-section {
  margin-top: 20px;
}

.mail-card {
  min-height: 430px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(17, 29, 55, 0.82);
  box-shadow: var(--shadow);
}

.mail-card-head {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding: 0 18px;
}

.inbox-title {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.inbox-title b {
  min-width: 24px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #67f3ff;
  background: rgba(24, 198, 212, 0.12);
  letter-spacing: 0;
}

.mail-icon {
  color: #67f3ff;
}

.small-btn,
.back-btn {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  padding: 9px 12px;
  font-size: 12px;
}

.message-list {
  max-height: 520px;
  overflow-y: auto;
  padding: 12px;
}

.message-item {
  width: 100%;
  min-height: 64px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border-radius: 14px;
  padding: 10px 14px 10px 10px;
  text-align: left;
  background: transparent;
}

.message-item:hover {
  background: rgba(255, 255, 255, 0.035);
}

.msg-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #67f3ff;
  background: rgba(24, 198, 212, 0.1);
}

.msg-content {
  min-width: 0;
}

.msg-content strong {
  display: block;
  overflow: hidden;
  color: #eaf3ff;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.msg-content span {
  display: block;
  overflow: hidden;
  margin-top: 4px;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.msg-time {
  color: #75839b;
  font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.waiting {
  padding: 58px 18px;
  text-align: center;
  color: var(--muted);
}

.waiting h3 {
  margin: 16px 0 6px;
  color: white;
  font-size: 18px;
}

.waiting p {
  margin: 0;
  font-size: 14px;
}

.loader {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.loader span {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, #18c6d4, #3b82f6);
  animation: bounce 0.9s infinite ease-in-out;
}

.loader span:nth-child(2) {
  animation-delay: 0.15s;
}

.loader span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes bounce {
  0%, 80%, 100% {
    transform: translateY(0);
    opacity: 0.45;
  }

  40% {
    transform: translateY(-12px);
    opacity: 1;
  }
}

.hidden {
  display: none !important;
}

/* Detail */

.detail-view {
  min-height: 560px;
}

.detail-top {
  height: 56px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 0 18px;
}

.detail-header {
  padding: 24px 22px 18px;
}

.detail-header h2 {
  margin: 0 0 18px;
  color: white;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.sender-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sender-avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: linear-gradient(135deg, #18c6d4, #3b82f6);
}

.sender-row strong,
.sender-row span {
  display: block;
}

.sender-row span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.message-paper {
  margin: 0 22px 24px;
  border-radius: 14px;
  background: #f8fafc;
  padding: 28px;
  color: #1f2937;
}

.detail-body {
  width: min(700px, 100%);
  margin: 0 auto;
  color: #374151;
  font-size: 15px;
  line-height: 1.75;
  word-break: break-word;
}

.email-brand {
  margin-bottom: 22px;
  color: #0f172a;
  font-size: 26px;
  font-weight: 900;
}

.code-box {
  margin: 18px 0 24px;
  border-radius: 14px;
  padding: 22px 26px;
  background: #eeeeee;
  color: #4b5563;
  font-size: 28px;
  letter-spacing: 0.04em;
}

.muted-line {
  color: #6b7280;
}

.detail-body hr {
  border: 0;
  border-top: 1px solid #e5e7eb;
  margin: 26px 0;
}

/* Sections */

.fn-section,
.fn-steps,
.fn-main-seo,
.fn-account-cta {
  margin-top: 34px;
}

.fn-section-head {
  width: min(760px, 100%);
  margin: 0 auto 24px;
  text-align: center;
}

.fn-section-head span {
  display: inline-flex;
  padding: 8px 12px;
  border: 1px solid rgba(24, 198, 212, 0.22);
  border-radius: 999px;
  background: rgba(24, 198, 212, 0.1);
  color: #78f4ff;
  font-size: 12px;
  font-weight: 900;
}

.fn-section-head h2 {
  margin: 14px 0 0;
  color: white;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.05;
  letter-spacing: -0.052em;
}

.fn-feature-grid,
.fn-seo-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.fn-feature-grid article,
.fn-seo-card,
.fn-steps article,
.fn-main-seo,
.fn-account-cta {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(17, 29, 55, 0.72);
}

.fn-feature-grid article,
.fn-seo-card,
.fn-steps article {
  padding: 20px;
}

.fn-feature-grid i,
.fn-seo-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  margin-bottom: 14px;
  font-style: normal;
  background: linear-gradient(135deg, #18c6d4, #3b82f6);
}

.fn-feature-grid h3,
.fn-seo-card h3,
.fn-steps h3 {
  margin: 0 0 10px;
  color: white;
  font-size: 17px;
  line-height: 1.25;
}

.fn-feature-grid p,
.fn-seo-subtitle,
.fn-steps p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

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

.fn-steps b {
  display: block;
  margin-bottom: 12px;
  color: #78f4ff;
  font-size: 22px;
}

.fn-seo-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rich-content {
  color: var(--soft);
  font-size: 15px;
  line-height: 1.75;
}

.rich-content h1,
.rich-content h2,
.rich-content h3 {
  color: white;
}

.rich-content a {
  color: #67f3ff;
}

.fn-main-seo {
  padding: 24px;
}

.fn-main-seo h2 {
  margin: 0 0 12px;
  color: white;
  font-size: 28px;
  letter-spacing: -0.03em;
}

.fn-account-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 26px;
  background:
    radial-gradient(circle at 100% 0%, rgba(24, 198, 212, 0.18), transparent 34%),
    rgba(17, 29, 55, 0.82);
}

.fn-account-cta span {
  color: #78f4ff;
  font-size: 13px;
  font-weight: 900;
}

.fn-account-cta h2 {
  margin: 10px 0;
  color: white;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.048em;
}

.fn-account-cta p {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.fn-account-cta a {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 14px 18px;
  border-radius: 16px;
  color: white;
  background: linear-gradient(135deg, #18c6d4, #3b82f6);
  text-decoration: none;
  font-weight: 900;
}

.fn-footer {
  width: min(1120px, 100%);
  margin: 34px auto 0;
  padding: 22px 0;
  color: var(--muted);
  text-align: center;
}

.fn-footer p {
  margin: 0 0 10px;
}

.fn-footer nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
}

.fn-footer a {
  color: #67f3ff;
  text-decoration: none;
  font-weight: 800;
}

/* Large desktop with ads */
@media (max-width: 1480px) {
  .fn-layout,
  .fn-layout:has(.ad-left):has(.ad-right),
  .fn-layout:has(.ad-left):not(:has(.ad-right)),
  .fn-layout:not(:has(.ad-left)):has(.ad-right) {
    grid-template-columns: minmax(0, 1120px);
  }

  .ad-side {
    display: none;
  }
}

/* Tablet */
@media (max-width: 1060px) {
  .fn-page {
    width: min(100% - 28px, 1180px);
  }

  .fn-hero {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 24px;
  }

  .fn-hero h1 {
    max-width: 820px;
    font-size: clamp(42px, 7vw, 64px);
  }

  .fn-tool-wrap {
    width: min(720px, 100%);
  }

  .fn-feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Mobile */
@media (max-width: 760px) {
  .fn-page {
    width: min(100% - 22px, 1180px);
    padding-top: 16px;
  }

  .fn-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .fn-menu-btn {
    display: inline-flex;
    position: absolute;
    right: 12px;
    top: 18px;
  }

  .fn-nav {
    display: none;
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 12px;
    background: rgba(17, 29, 55, 0.92);
  }

  body.menu-open .fn-nav {
    display: flex;
  }

  .fn-nav a {
    width: 100%;
    padding: 10px;
  }

  .fn-logo {
    width: 40px;
    height: 40px;
  }

  .fn-hero {
    padding-top: 10px;
  }

  .fn-pill {
    font-size: 12px;
    padding: 7px 10px;
  }

  .fn-hero h1 {
    margin-top: 14px;
    font-size: clamp(34px, 11vw, 48px);
    line-height: 0.98;
    letter-spacing: -0.052em;
  }

  .fn-hero-text {
    font-size: 15px;
    line-height: 1.65;
  }

  .fn-hero-actions {
    flex-direction: column;
    gap: 10px;
  }

  .fn-btn {
    width: 100%;
  }

  .fn-mini-list {
    gap: 7px;
  }

  .fn-mini-list span {
    font-size: 12px;
    padding: 8px 10px;
  }

  .fn-tool-card {
    border-radius: 20px;
    padding: 16px;
  }

  .fn-tool-head {
    flex-direction: column;
    gap: 8px;
  }

  .fn-input-row {
    grid-template-columns: 1fr;
  }

  .fn-tool-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .fn-tool-actions button {
    width: 100%;
  }

  .fn-info-grid,
  .fn-feature-grid,
  .fn-steps,
  .fn-seo-grid {
    grid-template-columns: 1fr;
  }

  .mail-card {
    min-height: 360px;
    border-radius: 18px;
  }

  .message-list {
    max-height: 460px;
  }

  .message-item {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .msg-time {
    grid-column: 2;
  }

  .fn-section-head h2 {
    font-size: clamp(26px, 9vw, 38px);
    letter-spacing: -0.04em;
  }

  .fn-account-cta {
    align-items: flex-start;
    flex-direction: column;
    padding: 20px;
  }

  .fn-account-cta a {
    width: 100%;
  }

  .message-paper {
    margin: 0 12px 18px;
    padding: 18px;
  }

  .detail-header {
    padding: 20px 14px 16px;
  }
}

/* Small mobile */
@media (max-width: 430px) {
  .fn-page {
    width: min(100% - 18px, 1180px);
  }

  .fn-hero h1 {
    font-size: 32px;
  }

  .fn-hero-text,
  .rich-content,
  .fn-feature-grid p,
  .fn-seo-subtitle,
  .fn-steps p {
    font-size: 14px;
  }

  button,
  input {
    font-size: 13px;
  }

  .fn-tool-actions {
    grid-template-columns: 1fr;
  }

  .fn-info-grid article,
  .fn-feature-grid article,
  .fn-seo-card,
  .fn-steps article,
  .fn-main-seo {
    padding: 16px;
    border-radius: 18px;
  }

  .mail-card-head {
    padding: 0 12px;
  }
}

/* Final hero alignment fix */
.fn-hero {
  align-items: start;
  padding-top: 34px;
}

.fn-tool-wrap {
  padding-top: 86px;
}

.fn-tool-card {
  margin-top: 0;
}

.fn-tool-bottom-actions {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(17, 29, 55, 0.46);
}

.fn-tool-bottom-actions .fn-hero-actions {
  margin-top: 0;
}

.fn-tool-bottom-actions .fn-mini-list {
  margin-top: 14px;
}

.fn-hero-copy .fn-hero-actions,
.fn-hero-copy .fn-mini-list {
  display: none;
}

@media (min-width: 1061px) {
  .fn-tool-wrap {
    transform: translateY(-22px);
  }

  .fn-tool-card {
    max-width: 560px;
    margin-left: auto;
  }

  .fn-tool-bottom-actions {
    max-width: 560px;
    margin-left: auto;
  }
}

@media (max-width: 1060px) {
  .fn-tool-wrap {
    padding-top: 0;
    transform: none;
  }

  .fn-tool-bottom-actions {
    width: min(720px, 100%);
  }
}

@media (max-width: 760px) {
  .fn-tool-bottom-actions {
    padding: 14px;
    border-radius: 18px;
  }

  .fn-tool-bottom-actions .fn-hero-actions {
    flex-direction: column;
  }

  .fn-tool-bottom-actions .fn-mini-list {
    display: grid;
    grid-template-columns: 1fr;
  }
}

/* KeyoMail notification UI */
.fn-notify-toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 99999;
  width: min(380px, calc(100% - 36px));
  display: grid;
  grid-template-columns: 46px 1fr 32px;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(24, 198, 212, 0.24);
  border-radius: 18px;
  background: rgba(10, 20, 40, 0.96);
  color: white;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  transform: translateY(130%);
  opacity: 0;
  transition: 0.24s ease;
  backdrop-filter: blur(16px);
}

.fn-notify-toast.show {
  transform: translateY(0);
  opacity: 1;
}

.fn-notify-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #18c6d4, #3b82f6);
}

.fn-notify-toast strong,
.fn-notify-toast span {
  display: block;
}

.fn-notify-toast strong {
  font-size: 14px;
}

.fn-notify-toast span {
  margin-top: 4px;
  color: #97a9c7;
  font-size: 13px;
  line-height: 1.4;
}

.fn-notify-toast button {
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
}

.fn-enable-notify {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 99998;
  padding: 12px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, #18c6d4, #3b82f6);
  box-shadow: 0 16px 44px rgba(59, 130, 246, 0.22);
}

.fn-notify-toast.show + .fn-enable-notify {
  bottom: 100px;
}

@media (max-width: 640px) {
  .fn-notify-toast {
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
  }

  .fn-enable-notify {
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
  }
}

/* Hide browser notification permission button */
#fnEnableNotify,
.fn-enable-notify {
  display: none !important;
}

/* Final clean hero/tool redesign */
.fn-hero h1 {
  font-size: clamp(38px, 4vw, 58px) !important;
  line-height: 1.02 !important;
  letter-spacing: -0.055em !important;
  max-width: 650px !important;
}

.fn-hero {
  align-items: center !important;
}

.fn-tool-wrap {
  padding-top: 0 !important;
  transform: none !important;
}

.fn-tool-card {
  max-width: 560px;
  margin-left: auto;
  border-radius: 28px;
  padding: 24px;
  background:
    radial-gradient(circle at 100% 0%, rgba(24, 198, 212, 0.18), transparent 34%),
    linear-gradient(180deg, rgba(18, 32, 62, 0.94), rgba(15, 27, 52, 0.94));
}

.fn-input-row {
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: stretch;
}

.fn-email-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 46px;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 15px;
  background: rgba(5, 12, 28, 0.72);
  overflow: hidden;
}

.fn-email-field input {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

.fn-copy-icon {
  width: 46px;
  height: 100%;
  min-height: 48px;
  padding: 0;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.055);
  color: #dbeafe;
  border-left: 1px solid rgba(148, 163, 184, 0.12);
}

.fn-copy-icon:hover {
  background: rgba(24, 198, 212, 0.16);
}

.fn-tool-actions {
  display: grid !important;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
}

.fn-tool-actions button {
  min-height: 46px;
}

.fn-save-forever-card {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid rgba(24, 198, 212, 0.18);
  border-radius: 18px;
  background: rgba(24, 198, 212, 0.07);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.fn-save-forever-card strong,
.fn-save-forever-card span {
  display: block;
}

.fn-save-forever-card strong {
  font-size: 14px;
  color: #eaf3ff;
}

.fn-save-forever-card span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.fn-save-forever-card a {
  flex: 0 0 auto;
  padding: 10px 13px;
  border-radius: 13px;
  color: white;
  text-decoration: none;
  font-size: 13px;
  font-weight: 900;
  background: linear-gradient(135deg, #18c6d4, #3b82f6);
}

.fn-hero-actions,
.fn-mini-list,
.fn-tool-bottom-actions {
  display: none !important;
}

/* Header bell */
.fn-sound-bell {
  position: relative;
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(24, 198, 212, 0.22);
  background: rgba(24, 198, 212, 0.10);
  color: white;
  font-size: 17px;
}

.fn-sound-bell.sound-ready {
  background: rgba(34, 197, 94, 0.14);
  border-color: rgba(34, 197, 94, 0.3);
}

.fn-sound-bell.new-mail {
  animation: fnBellPulse 0.8s ease-in-out 4;
}

.bell-dot {
  position: absolute;
  right: 8px;
  top: 8px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #64748b;
}

.fn-sound-bell.sound-ready .bell-dot {
  background: #22c55e;
}

.fn-sound-bell.new-mail .bell-dot {
  background: #fb7185;
}

@keyframes fnBellPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.16); }
}

@media (max-width: 1060px) {
  .fn-tool-card {
    margin-left: 0;
  }
}

@media (max-width: 760px) {
  .fn-hero h1 {
    font-size: clamp(30px, 9vw, 42px) !important;
    line-height: 1.05 !important;
  }

  .fn-input-row {
    grid-template-columns: 1fr !important;
  }

  .fn-tool-actions {
    grid-template-columns: 1fr 1fr !important;
  }

  .fn-tool-actions .danger {
    grid-column: 1 / -1;
  }

  .fn-save-forever-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .fn-save-forever-card a {
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 430px) {
  .fn-hero h1 {
    font-size: 30px !important;
  }

  .fn-tool-actions {
    grid-template-columns: 1fr !important;
  }
}

/* Bell inbox dropdown - final behavior */
.fn-sound-bell {
  position: relative;
}

.fn-bell-count {
  position: absolute;
  right: -6px;
  top: -7px;
  min-width: 20px;
  height: 20px;
  display: none;
  place-items: center;
  padding: 0 5px;
  border: 2px solid #071225;
  border-radius: 999px;
  background: #fb7185;
  color: white;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.fn-sound-bell.new-mail .fn-bell-count {
  background: #f97316;
}

.fn-sound-bell.sound-ready .bell-dot,
.fn-sound-bell .bell-dot {
  display: none !important;
}

.fn-bell-panel {
  position: absolute;
  z-index: 100000;
  display: none;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 20px;
  background: rgba(10, 20, 40, 0.98);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.44);
  backdrop-filter: blur(18px);
}

.fn-bell-panel.show {
  display: block;
}

.fn-bell-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 15px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.fn-bell-panel-head strong {
  color: #eaf3ff;
  font-size: 14px;
}

.fn-bell-panel-head span {
  color: #78f4ff;
  font-size: 12px;
  font-weight: 900;
}

.fn-bell-mail-list {
  max-height: 360px;
  overflow-y: auto;
  padding: 8px;
}

.fn-bell-empty {
  padding: 28px 14px;
  color: #97a9c7;
  text-align: center;
  font-size: 13px;
}

.fn-bell-mail-item {
  width: 100%;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: white;
  text-align: left;
}

.fn-bell-mail-item:hover {
  background: rgba(24, 198, 212, 0.10);
}

.fn-bell-mail-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #67f3ff;
  background: rgba(24, 198, 212, 0.12);
}

.fn-bell-mail-text {
  min-width: 0;
}

.fn-bell-mail-text strong {
  display: block;
  overflow: hidden;
  color: #eaf3ff;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.fn-bell-mail-text small {
  display: block;
  overflow: hidden;
  margin-top: 3px;
  color: #97a9c7;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.fn-bell-mail-item em {
  color: #75839b;
  font-size: 11px;
  font-style: normal;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .fn-bell-panel {
    left: 12px !important;
    right: 12px !important;
    width: auto !important;
  }

  .fn-bell-mail-item {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .fn-bell-mail-item em {
    grid-column: 2;
  }
}

/* Bell unread/read final state */
.fn-bell-count {
  display: grid !important;
}

.fn-bell-count.zero {
  background: #334155 !important;
  color: #cbd5e1 !important;
}

.fn-bell-mail-item.unread {
  background: rgba(24, 198, 212, 0.10);
}

.fn-bell-mail-item.unread .fn-bell-mail-text strong::after {
  content: " New";
  margin-left: 6px;
  color: #78f4ff;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}
