/* ==========================================================================
   Googlz - Pure 100% Authentic Google Interface (One-Pager, No Scroll, No Select)
   ========================================================================== */

:root {
  --google-blue: #4285F4;
  --google-red: #EA4335;
  --google-yellow: #FBBC05;
  --google-green: #34A853;
  --google-dark: #202124;
  --google-gray: #5f6368;
  --google-border: #dfe1e5;
  --google-link: #1a0dab;
  --font-family: 'Google Sans', Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --shadow-hover: 0 1px 6px rgba(32, 33, 36, 0.28);
}

/* Global Selection Prevention (Non-selectable UI) */
*, *::before, *::after {
  box-sizing: border-box;
  user-select: none !important;
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
  -webkit-user-drag: none;
}

/* Allow text input selection specifically for typing in searchbox */
input#query {
  user-select: text !important;
  -webkit-user-select: text !important;
  -moz-user-select: text !important;
}

/* Strict One-Pager (No vertical or horizontal scrolling) */
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  overflow: hidden !important;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-family: var(--font-family);
  color: var(--google-dark);
  background: #ffffff;
  -webkit-font-smoothing: antialiased;
}

button, input {
  font-family: inherit;
}

/* Page content flex container */
.page-content {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  width: 100%;
  position: relative;
  overflow: hidden;
}

/* ==========================================================================
   Header (Google Topbar - Clean Text Links Only)
   ========================================================================== */

.google-topbar {
  flex-shrink: 0;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 18px;
  padding: 16px 28px;
  font-size: 13px;
  color: #3c4043;
}

.google-topbar a {
  color: inherit;
  text-decoration: none;
  font-size: 13.5px;
}

.google-topbar a:hover {
  text-decoration: underline;
}

/* Discreet preview exit button */
.preview-exit-btn {
  position: fixed;
  top: 14px;
  left: 20px;
  z-index: 500;
  background: #ffffff;
  border: 1px solid #dadce0;
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 12px;
  color: #5f6368;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
  transition: background 0.15s, color 0.15s;
}

.preview-exit-btn:hover {
  background: #f1f3f4;
  color: #202124;
}

/* ==========================================================================
   Google Center Canvas (Pure Open Page - No Box Frames)
   ========================================================================== */

.google-center {
  width: 100%;
  max-width: 650px;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: auto 0;
  padding: 0;
}

.brand-hero {
  text-align: center;
  margin-bottom: 24px;
}

.brand-logo-link {
  text-decoration: none;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
}

.google-logo {
  font-size: clamp(54px, 8.5vw, 92px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  display: flex;
  align-items: center;
}

.google-logo .g-b1 { color: var(--google-blue); }
.google-logo .g-r1 { color: var(--google-red); }
.google-logo .g-y  { color: var(--google-yellow); }
.google-logo .g-b2 { color: var(--google-blue); }
.google-logo .g-g  { color: var(--google-green); }
.google-logo .g-z  { color: var(--google-red); }

/* Generator Form */
.generator-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* 100% Authentic Google Search Capsule */
.searchbox {
  width: 100%;
  max-width: 584px;
  height: 46px;
  border: 1px solid var(--google-border);
  border-radius: 24px;
  display: flex;
  align-items: center;
  padding: 0 16px 0 14px;
  gap: 12px;
  background: #fff;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.searchbox:hover,
.searchbox:focus-within,
.searchbox.searchbox-active {
  box-shadow: var(--shadow-hover);
  border-color: transparent;
}

.search-icon-left {
  width: 20px;
  height: 20px;
  fill: #9aa0a6;
  flex-shrink: 0;
}

.searchbox input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 16px;
  color: var(--google-dark);
  background: transparent;
}

.searchbox input::placeholder {
  color: #80868b;
}

/* Animated query wrapper in identical search bar */
.anim-query-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  font-size: 16px;
  color: #202124;
  white-space: nowrap;
  overflow: hidden;
}

.caret {
  display: inline-block;
  width: 2px;
  height: 20px;
  background: var(--google-blue);
  margin-left: 2px;
  animation: blink 0.8s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}



/* Google Action Buttons */
.google-buttons-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.g-btn {
  background-color: #f8f9fa;
  border: 1px solid #f8f9fa;
  color: #3c4043;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background-color 0.15s, border-color 0.15s, box-shadow 0.15s, color 0.15s, transform 0.1s;
}

.g-btn:hover {
  background-color: #f1f3f4;
  border-color: #dadce0;
  color: #202124;
  box-shadow: 0 1px 1px rgba(0,0,0,0.1);
}

.g-btn.button-click {
  background-color: #e8eaed !important;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.15) !important;
  transform: scale(0.96);
}

.g-btn.g-btn-primary {
  background-color: #f8f9fa;
  border-color: #f8f9fa;
  color: #3c4043;
}

/* ==========================================================================
   Result Card (Google Search Snippet Card Style - Compact One-Pager)
   ========================================================================== */

.result-card {
  width: 100%;
  max-width: 584px;
  margin-top: 18px;
  background: #ffffff;
  border: 1px solid var(--google-border);
  border-radius: 12px;
  padding: 14px 18px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: fadeIn 0.25s ease;
}

.result-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.result-g-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f8f9fa;
  border: 1px solid #dadce0;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 16px;
  color: var(--google-blue);
  flex-shrink: 0;
}

.result-breadcrumb {
  display: flex;
  flex-direction: column;
  font-size: 11.5px;
  color: #202124;
}

.result-breadcrumb span {
  color: #5f6368;
}

.result-url-preview {
  font-size: 16px;
  font-weight: 600;
  color: var(--google-link);
  word-break: break-all;
  text-decoration: none;
  line-height: 1.3;
}

.result-url-preview:hover {
  text-decoration: underline;
}

.result-snippet-text {
  font-size: 13px;
  color: #4d5156;
  line-height: 1.4;
  margin: 0;
}

.result-bottom {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid #f1f3f4;
}

.result-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.result-actions .g-btn {
  padding: 6px 14px;
  font-size: 13px;
}

/* ==========================================================================
   Google Toast during animation
   ========================================================================== */

.redirect-toast {
  position: fixed;
  bottom: 70px;
  left: 50%;
  transform: translateX(-50%);
  background: #202124;
  color: #ffffff;
  padding: 10px 22px;
  border-radius: 20px;
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  z-index: 999;
  animation: popIn 0.3s ease;
  white-space: nowrap;
}

/* ==========================================================================
   Fake Cursor (Google Pointer gliding across the entire screen)
   ========================================================================== */

.fake-cursor {
  position: fixed;
  top: 360px;
  left: 75%;
  width: 28px;
  height: 28px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 28'%3E%3Cpath d='M2 2l8 22 4-8 8-4L2 2z' fill='%23202124' stroke='%23ffffff' stroke-width='2'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  filter: drop-shadow(0 2px 5px rgba(0,0,0,0.3));
  pointer-events: none;
  z-index: 1000;
  transition: top 1.1s cubic-bezier(0.25, 1, 0.5, 1), left 1.1s cubic-bezier(0.25, 1, 0.5, 1), transform 0.15s ease;
}

.fake-cursor.cursor-click {
  transform: scale(0.85);
}

/* ==========================================================================
   Session Welcome Modal (Once per session popup)
   ========================================================================== */

.welcome-overlay {
  position: fixed;
  inset: 0;
  background: rgba(32, 33, 36, 0.45);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 16px;
  animation: fadeIn 0.2s ease;
}

.welcome-modal {
  background: #ffffff;
  border-radius: 16px;
  max-width: 440px;
  width: 100%;
  padding: 26px 24px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  animation: popIn 0.25s ease;
}

.welcome-modal h2 {
  font-size: 22px;
  font-weight: 700;
  color: #202124;
  margin: 0;
  letter-spacing: -0.02em;
}

.welcome-kicker {
  font-size: 13px;
  color: var(--google-blue);
  font-weight: 500;
  margin: 4px 0 16px;
}

.welcome-lead {
  font-size: 13.5px;
  color: #5f6368;
  line-height: 1.5;
  margin: 0 0 16px;
}

.welcome-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  text-align: left;
}

.welcome-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  background: #f8f9fa;
  border-radius: 10px;
}

.step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--google-blue);
  color: #ffffff;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.step-text {
  font-size: 13px;
  color: #3c4043;
  line-height: 1.4;
}

.welcome-confirm-btn {
  width: 100%;
  height: 40px;
  margin-top: 20px;
  font-size: 14px;
  font-weight: 600;
  justify-content: center;
  background-color: var(--google-blue);
  border-color: var(--google-blue);
  color: #ffffff;
  border-radius: 6px;
}

.welcome-confirm-btn:hover {
  background-color: #3367d6;
  border-color: #3367d6;
  color: #ffffff;
}

/* ==========================================================================
   Google Footer (Original Google Style - Compact One-Pager)
   ========================================================================== */

.google-footer {
  flex-shrink: 0;
  width: 100%;
  background: #f2f2f2;
  font-size: 13px;
  color: #70757a;
  border-top: 1px solid #e4e4e4;
}

.footer-location {
  font-size: 13.5px;
  color: #70757a;
  display: flex;
  align-items: center;
}

.footer-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-links-left,
.footer-links-right {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-links a {
  color: inherit;
  text-decoration: none;
  font-size: 13px;
}

.footer-links a:hover {
  text-decoration: underline;
}

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

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes popIn {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* Responsive */
@media (max-width: 680px) {
  .google-topbar {
    padding: 12px 18px;
  }
  .footer-links {
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
  }
  .footer-location {
    padding: 8px 16px;
  }
}
