:root {
  --bg: #0f0f10;
  --surface: #18181b;
  --text: #e4e4e7;
  --accent: #00d5ff;
  --bubble-you: #00d5ff;
  --bubble-other: #2d2d30;
  --pattern: "#ffffff10";
  transition: background 0.35s ease-out, color 0.35s ease-out;
}


html.light-theme {
  --bg: #f9f9f9;
  --surface: #ffffff;
  --text: #0f0f10;
  --accent: #0077ff;
  --bubble-you: #0077ff;
  --bubble-other: #d1d1d1;
  --pattern: "#00000008";
}


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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  background-color: var(--bg);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'><circle cx='24' cy='24' r='1' fill='%23ffffff10'/></svg>");
  background-repeat: repeat;

  color: var(--text);
  height: 100dvh;
  overflow: hidden;
  padding-bottom: env(safe-area-inset-bottom);
  display: flex;
  justify-content: center;
}




.screen {
  position: absolute;
  inset: 0;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}

.screen.active {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

.header {
  padding: 24px 20px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header h1 {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.2px;
  opacity: 0.9;
}


#theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

#theme-toggle .sun path {
  fill: none !important;
  stroke: var(--text) !important;
  stroke-width: 2;
}

#theme-toggle .moon path {
  fill: var(--text) !important;
}

#theme-toggle:active {
  background: rgba(255, 255, 255, 0.08);
}

html.light-theme #theme-toggle:active {
  background: rgba(0, 0, 0, 0.07);
}

#theme-toggle svg {
  width: 30px;
  height: 30px;
  fill: var(--text);
  transition: 0.3s;
}


.sun { display: none; }
.moon { display: block; }

html.light-theme .sun { display: block; }
html.light-theme .moon { display: none; }

.brand {
  font-weight: 700;
  color: var(--accent);
}

.center-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding-bottom: 14vh;
}

.big-btn {
  width: 86%;
  max-width: 380px;
  padding: 26px;
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: 30px;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.2px;
  box-shadow:
    0 8px 20px rgba(0, 212, 255, 0.28),
    0 2px 6px rgba(0, 0, 0, 0.15);
  transition: transform 0.15s ease-out, box-shadow 0.15s ease-out;
}

.big-btn:active {
  transform: scale(0.94);
  box-shadow: 0 4px 10px rgba(0, 212, 255, 0.20);
}

.seo-line {
  margin-top: 16px;
  font-size: 14px;
  opacity: 0.6;
  text-align: center;
  line-height: 1.3;
  padding-left: 20px;
  padding-right: 20px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  clip: rect(0 0 0 0);
  overflow: hidden;
}


@media (min-width: 700px) {

  body {
    justify-content: center;
    align-items: center;
    padding: 0;
    overflow: hidden;
    background-color: #050505;
  }

  .screen {
    position: relative;
    height: 90vh;
    margin: auto;
    border-radius: 24px;
    background: var(--surface);
    box-shadow: 0 8px 30px rgba(0,0,0,0.25);
    overflow: hidden;
    width: 600px;
  }

  .header {
    padding: 28px 26px 0;
  }

  .center-content {
    padding-bottom: 8vh;
  }

  .seo-line {
    font-size: 13px;
    width: 85%;
  }

}


*,
*::before,
*::after {
  transition: 
    background-color 0.38s cubic-bezier(0.28, 0.72, 0.36, 1),
    color              0.38s cubic-bezier(0.28, 0.72, 0.36, 1),
    border-color       0.38s cubic-bezier(0.28, 0.72, 0.36, 1),
    box-shadow         0.38s cubic-bezier(0.28, 0.72, 0.36, 1),
    fill               0.38s ease,
    stroke             0.38s ease,
    opacity            0.38s ease;
}


@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}


#theme-toggle svg {
  transition: fill 0.38s ease, opacity 0.38s ease;
}


body {
  transition: 
    background-color 0.38s cubic-bezier(0.28, 0.72, 0.36, 1),
    background-image 0.38s cubic-bezier(0.28, 0.72, 0.36, 1);
}







#searching-indicator {
    animation: pulse 1s infinite;
    color: #555;
}
@keyframes pulse {
    0% { opacity: 0.4; }
    50% { opacity: 1; }
    100% { opacity: 0.4; }
}



.online-indicator {
    margin-top: 12px;
    font-size: 14px;
    opacity: 0.75;
    transform-origin: center;
    transition: opacity 0.25s ease-out;
}


@keyframes onlineBump {
    0%   { transform: scale(1);   opacity: 0.75; }
    30%  { transform: scale(1.22); opacity: 1; }
    55%  { transform: scale(0.96); opacity: 0.9; }
    100% { transform: scale(1);   opacity: 0.75; }
}

.online-indicator.bump {
    animation: onlineBump 0.38s cubic-bezier(0.22, 1.4, 0.36, 1);
}



@keyframes numFade {
    0%   { opacity: 0; transform: translateY(2px); }
    100% { opacity: 1; transform: translateY(0); }
}

#online-num.animate {
    animation: numFade 0.28s ease-out;
}



.search-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-top: 24px;
  opacity: 1;
  transition: opacity .25s ease;
}

.search-box.hidden {
  opacity: 0;
  pointer-events: none;
}

.search-spinner {
  width: 46px;
  height: 46px;
  border: 4px solid rgba(255,255,255,0.15);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0); }
  to   { transform: rotate(360deg); }
}

.search-text {
  font-size: 15px;
  opacity: 0.85;
}

.cancel-btn {
  padding: 9px 22px;
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--text);
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
  transition: .2s;
}

.cancel-btn:active {
  transform: scale(0.92);
  opacity: 0.75;
}



