/* DomainSoft — Neumorphic Design System */

/* --- Variables -------------------------------------------- */
:root {
  --surface:       #E0E5EC;
  --highlight:     #FFFFFF;
  --shadow-clr:    #A3B1C6;
  --primary:       #38693f;
  --primary-glow:  rgba(56,105,63,0.25);
  --secondary:     #526073;
  --error:         #9f403d;
  --on-surface:    #233442;
  --on-dim:        #526073;
  --r-lg:          24px;
  --r-md:          16px;
  --r-pill:        999px;
  --raised: -6px -6px 12px #FFFFFF, 6px 6px 12px #A3B1C6;
  --inset:  inset 6px 6px 12px #A3B1C6, inset -6px -6px 12px #FFFFFF;
  --deep:   inset 8px 8px 16px #A3B1C6, inset -8px -8px 16px #FFFFFF;
  --t: 0.18s ease;
}

/* --- Reset & Base ----------------------------------------- */
*,*::before,*::after{margin:0;padding:0;box-sizing:border-box}
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--surface);
  color: var(--on-surface);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.hidden { display: none !important; }
.neumorphic-raised { background: var(--surface); box-shadow: var(--raised); }
.neumorphic-inset  { background: var(--surface); box-shadow: var(--inset); }

/* --- Layout ----------------------------------------------- */
.main-content {
  flex: 1;
  max-width: 860px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
  width: 100%;
}

/* --- Header ----------------------------------------------- */
.site-header {
  display: flex;
  justify-content: center;
  padding: 2rem 1.5rem 1rem;
}
.logo { display: flex; align-items: center; gap: 0.5rem; text-decoration: none; color: var(--on-surface); }
.logo-icon { font-size: 2rem; color: var(--primary); }
.logo-text { font-family: 'Be Vietnam Pro', sans-serif; font-weight: 800; font-size: 1.6rem; letter-spacing: -0.5px; }

/* --- Hero ------------------------------------------------- */
.hero { text-align: center; padding: 2.5rem 0 2rem; }
.hero-headline {
  font-family: 'Be Vietnam Pro', sans-serif;
  font-weight: 900;
  font-size: clamp(2.4rem, 6vw, 4rem);
  line-height: 1.1;
  margin-bottom: 1rem;
}
.hero-subtitle { font-size: 1rem; color: var(--on-dim); margin-bottom: 2rem; max-width: 480px; margin-inline: auto; }

/* --- Search Bar ------------------------------------------- */
.search-form { max-width: 620px; margin: 0 auto 1.5rem; }
.search-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: var(--r-lg);
  padding: 0.5rem 0.5rem 0.5rem 1.2rem;
}
.search-bar:focus-within { box-shadow: var(--deep), 0 0 0 3px var(--primary-glow); }
.search-icon { color: var(--on-dim); font-size: 1.3rem; flex-shrink: 0; }
.search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: 'Inter', sans-serif;
  font-size: 1.05rem;
  color: var(--on-surface);
  padding: 0.6rem 0.4rem;
}
.search-input::placeholder { color: var(--on-dim); opacity: 0.7; }
.search-btn {
  flex-shrink: 0;
  border: none;
  cursor: pointer;
  font-family: 'Be Vietnam Pro', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  padding: 0.75rem 1.4rem;
  border-radius: var(--r-md);
  transition: box-shadow var(--t), transform var(--t), color var(--t);
}
.search-btn:hover { color: var(--on-surface); }
.search-btn:active, .search-btn:disabled { box-shadow: var(--inset); transform: scale(0.98); opacity: 0.7; }
.search-btn:disabled { cursor: not-allowed; }

/* --- TLD Chips -------------------------------------------- */
.tld-chips { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 0.6rem; margin-top: 1rem; }
.tld-label { font-size: 0.85rem; color: var(--on-dim); font-weight: 500; }
.tld-chip {
  border: none;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--secondary);
  padding: 0.35rem 0.9rem;
  border-radius: var(--r-pill);
  transition: box-shadow var(--t), transform var(--t), color var(--t);
}
.tld-chip:hover { color: var(--primary); }
.tld-chip:active { box-shadow: var(--inset); transform: scale(0.97); }

/* --- Loading ---------------------------------------------- */
.loading-state { display: flex; flex-direction: column; align-items: center; gap: 1.2rem; padding: 3rem 0; }
.spinner-wrap { width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--shadow-clr);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { font-size: 0.95rem; color: var(--on-dim); font-weight: 500; }

/* --- Error Box -------------------------------------------- */
.error-box {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  background: rgba(159,64,61,0.08);
  border-radius: var(--r-md);
  padding: 1rem 1.4rem;
  margin: 1rem 0;
  color: var(--error);
  font-weight: 500;
  box-shadow: inset 3px 3px 8px rgba(159,64,61,0.12), inset -3px -3px 8px #FFFFFF;
}
.error-icon { font-size: 1.3rem; }

/* --- Availability Card ------------------------------------ */
.availability-card {
  border-radius: var(--r-lg);
  padding: 2rem 1.5rem;
  text-align: center;
  margin: 1.5rem 0;
}
.avail-domain {
  font-family: 'Be Vietnam Pro', sans-serif;
  font-weight: 800;
  font-size: 1.7rem;
  margin-bottom: 0.8rem;
  word-break: break-all;
}
.avail-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 1.2rem;
  border-radius: var(--r-pill);
  font-weight: 600;
  font-size: 0.9rem;
  color: #fff;
}
.avail-badge.available { background: var(--primary); }
.avail-badge.taken     { background: var(--error); }
.avail-msg { margin-top: 0.6rem; font-size: 0.88rem; color: var(--on-dim); }

/* --- Panel shared ----------------------------------------- */
.details-panel, .suggestions-section {
  border-radius: var(--r-lg);
  padding: 1.8rem;
  margin: 1rem 0;
  box-shadow: var(--raised);
}
.panel-title {
  font-family: 'Be Vietnam Pro', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.2rem;
}
.panel-title .material-symbols-outlined { font-size: 1.3rem; color: var(--secondary); }

/* --- Details Grid ----------------------------------------- */
.details-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px,1fr)); gap: 0.9rem; }
.detail-item { box-shadow: var(--inset); border-radius: var(--r-md); padding: 0.9rem 1.1rem; }
.detail-label { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--on-dim); margin-bottom: 0.3rem; }
.detail-value { font-size: 0.92rem; font-weight: 500; word-break: break-word; }

/* --- Suggestions ------------------------------------------ */
.suggestions-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.col-heading { font-family: 'Be Vietnam Pro', sans-serif; font-weight: 700; font-size: 0.88rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--secondary); margin-bottom: 0.8rem; }
.suggestions-list { display: flex; flex-direction: column; gap: 0.6rem; }
.suggestion-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--raised);
  border-radius: var(--r-md);
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: box-shadow var(--t), transform var(--t);
}
.suggestion-card:hover  { box-shadow: var(--inset); transform: scale(0.99); }
.suggestion-card:active { box-shadow: var(--deep);  transform: scale(0.98); }
.suggestion-name { font-weight: 600; font-size: 0.9rem; }
.mini-badge { font-size: 0.72rem; font-weight: 600; padding: 0.2rem 0.65rem; border-radius: var(--r-pill); color: #fff; white-space: nowrap; }
.mini-badge.available { background: var(--primary); }
.mini-badge.taken     { background: var(--error); }
.mini-badge.unknown   { background: var(--secondary); }
.suggestions-placeholder { color: var(--on-dim); font-size: 0.9rem; padding: 0.5rem 0; }

/* --- Pricing Reference Card ------------------------------- */
.pricing-card {
  border-radius: var(--r-lg);
  padding: 1.8rem;
  margin: 1rem 0;
  box-shadow: var(--raised);
  background: var(--surface);
}

.pricing-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  margin-top: 0.6rem;
}
.pricing-table th {
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--on-dim);
  padding: 0.5rem 0.75rem 0.6rem;
}
.pricing-table td {
  padding: 0.55rem 0.75rem;
  font-weight: 500;
  color: var(--on-surface);
}
.pricing-table .pricing-tld {
  font-family: 'Be Vietnam Pro', sans-serif;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
}
/* Alternating inset rows */
.pricing-table tbody tr:nth-child(odd) td {
  background: rgba(163,177,198,0.13);
  border-radius: var(--r-md);
}
.pricing-table tbody tr:first-child td:first-child { border-radius: var(--r-md) 0 0 var(--r-md); }
.pricing-table tbody tr:first-child td:last-child  { border-radius: 0 var(--r-md) var(--r-md) 0; }

.pricing-disclaimer {
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--on-dim);
  opacity: 0.75;
  line-height: 1.55;
}

/* --- Footer ----------------------------------------------- */
.site-footer { text-align: center; padding: 2rem 1.5rem; color: var(--on-dim); font-size: 0.82rem; display: flex; flex-direction: column; gap: 0.5rem; }
.footer-brand { font-family: 'Be Vietnam Pro', sans-serif; font-weight: 700; font-size: 0.9rem; color: var(--on-surface); }
.footer-links { display: flex; justify-content: center; gap: 1.2rem; flex-wrap: wrap; }
.footer-link { color: var(--secondary); text-decoration: none; font-weight: 500; transition: color var(--t); }
.footer-link:hover { color: var(--primary); }
.footer-note { opacity: 0.6; }

/* --- Responsive ------------------------------------------- */
@media (max-width: 768px) {
  .hero-headline { font-size: 2.4rem; }
  .details-grid, .suggestions-columns { grid-template-columns: 1fr; }
  .avail-domain { font-size: 1.3rem; }
}
@media (max-width: 480px) {
  .search-bar { flex-wrap: wrap; padding: 0.8rem; }
  .search-icon { order: 1; }
  .search-input { width: 100%; order: 2; }
  .search-btn { width: 100%; order: 3; text-align: center; }
}

/* --- Static Pages (privacy, terms, support) --------------- */
.page-hero {
  text-align: center;
  padding: 2.5rem 0 2rem;
}
.page-hero h1 {
  font-family: 'Be Vietnam Pro', sans-serif;
  font-weight: 900;
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  line-height: 1.15;
  margin-bottom: 0.75rem;
}
.page-hero .page-subtitle {
  font-size: 1rem;
  color: var(--on-dim);
  max-width: 480px;
  margin-inline: auto;
}

.page-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding-bottom: 2rem;
}
.page-content .content-section {
  border-radius: var(--r-lg);
  padding: 1.8rem 2rem;
  box-shadow: var(--raised);
  background: var(--surface);
}
.page-content h2 {
  font-family: 'Be Vietnam Pro', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--primary);
  margin-bottom: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.page-content h2 .material-symbols-outlined {
  font-size: 1.2rem;
  color: var(--secondary);
}
.page-content p {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--on-surface);
  margin-bottom: 0.6rem;
}
.page-content p:last-child { margin-bottom: 0; }
.page-content ul {
  list-style: none;
  padding: 0;
  margin: 0.4rem 0 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.page-content ul li {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--on-surface);
  padding-left: 1.2rem;
  position: relative;
}
.page-content ul li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
}
.page-content .effective-date {
  font-size: 0.82rem;
  color: var(--on-dim);
  font-style: italic;
  margin-top: 0.3rem;
}

/* FAQ items */
.faq-item {
  box-shadow: var(--inset);
  border-radius: var(--r-md);
  padding: 1rem 1.2rem;
  margin-bottom: 0.75rem;
}
.faq-item:last-child { margin-bottom: 0; }
.faq-question {
  font-family: 'Be Vietnam Pro', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--on-surface);
  margin-bottom: 0.45rem;
}
.faq-answer {
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--on-dim);
  margin: 0 !important;
}

/* Contact card */
.contact-card {
  border-radius: var(--r-lg);
  padding: 1.8rem 2rem;
  box-shadow: var(--raised);
  background: var(--surface);
  text-align: center;
}
.contact-card .contact-icon {
  font-size: 2.5rem;
  color: var(--primary);
  display: block;
  margin-bottom: 0.75rem;
}
.contact-card h2 {
  font-family: 'Be Vietnam Pro', sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
  color: var(--on-surface);
}
.contact-card p {
  font-size: 0.95rem;
  color: var(--on-dim);
  line-height: 1.65;
  margin-bottom: 0.4rem;
}
.contact-card p:last-child { margin-bottom: 0; }
.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  font-size: 1rem;
  transition: color var(--t);
}
.contact-email:hover { color: var(--on-surface); }
.contact-email .material-symbols-outlined { font-size: 1.1rem; }

.back-link-wrap { text-align: center; padding: 1.5rem 0 2rem; }
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 24px;
  box-shadow: var(--raised);
  background: var(--surface);
  color: var(--secondary);
  font-weight: 500;
  font-size: 0.9rem;
  text-decoration: none;
  transition: color var(--t);
}
.back-link:hover {
  color: var(--primary);
  box-shadow: var(--inset);
  transform: scale(0.98);
}
.back-link .material-symbols-outlined { font-size: 1.1rem; }

/* --- Search History --- */
.history-section { max-width: 640px; margin: 1.5rem auto; }
.history-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 0.75rem; padding: 0 0.25rem;
}
.history-header h3 { font-family: var(--font-headline); font-size: 1rem; font-weight: 700; }
.clear-history-btn {
  background: none; border: none; color: var(--error); cursor: pointer;
  font-size: 0.8rem; font-weight: 600; padding: 0.3rem 0.7rem;
  border-radius: 12px; transition: all var(--t);
}
.clear-history-btn:hover { box-shadow: var(--inset); }
.history-list { display: flex; flex-direction: column; gap: 0.5rem; }
.history-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.7rem 1rem; border-radius: 16px;
  box-shadow: var(--raised); cursor: pointer;
  transition: all var(--t);
}
.history-item:hover { box-shadow: var(--inset); transform: scale(0.99); }
.history-info { display: flex; flex-direction: column; gap: 0.15rem; }
.history-domain { font-weight: 600; font-size: 0.9rem; }
.history-time { font-size: 0.75rem; color: var(--on-dim); }

/* --- Auth (Google SSO) ------------------------------------- */
.site-header { justify-content: space-between; align-items: center; }
.auth-area { display: flex; align-items: center; gap: 0.75rem; }

/* Login button — neumorphic raised, white bg, Google branding */
.auth-btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: #fff;
  box-shadow: -4px -4px 8px #FFFFFF, 4px 4px 8px #A3B1C6;
  border-radius: var(--r-pill);
  padding: 0.45rem 1rem 0.45rem 0.7rem;
  font-family: 'Inter', sans-serif; font-weight: 600; font-size: 0.82rem;
  color: #3c4043; text-decoration: none;
  transition: box-shadow var(--t), transform var(--t);
  white-space: nowrap;
}
.auth-btn:hover { box-shadow: var(--inset); transform: scale(0.98); }
.google-icon { width: 18px; height: 18px; flex-shrink: 0; }

/* Logged-in state */
.user-info { display: flex; align-items: center; gap: 0.45rem; }
.user-avatar { width: 28px; height: 28px; border-radius: 50%; box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--shadow-clr); }
.user-name { font-size: 0.85rem; font-weight: 600; color: var(--on-surface); max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auth-logout-link { font-size: 0.8rem; color: var(--secondary); font-weight: 500; text-decoration: none; transition: color var(--t); }
.auth-logout-link:hover { color: var(--error); }

@media (max-width: 480px) {
  .user-name { display: none; }
  .auth-btn { font-size: 0; padding: 0.5rem; border-radius: 50%; }
  .auth-btn .google-icon { margin: 0; }
}
