@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');
@import url('https://cdn.fontcdn.ir/Font/Persian/Vazir/Vazir.css');

* {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* CSS Reset */
*,
*::after,
*::before {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

*,
button,
input,
select,
textarea {
  font-family: 'Vazir', 'Roboto', sans-serif;
}

/* Vars - Modern Glass Theme */
:root {
  --gray: #94a3b8;
  --dark-gray: #cbd5e1;
  --white: #e2e8f0;
  --black: #0f1419;
  --border: rgba(255, 255, 255, 0.08);
  --button: rgba(79, 70, 229, 0.85);
  --footer: rgba(23, 25, 37, 0.6);
  --blue: #4f46e5;
  --transparent-blue: rgba(79, 70, 229, 0.15);
  --dark-blue: #4f46e5;
  --bg-primary: linear-gradient(135deg, #0f1419 0%, #1a1f2e 50%, #0f1419 100%);
  --bg-card: rgba(32, 36, 49, 0.5);
  --bg-input: rgba(15, 20, 25, 0.6);
}

/* AI Overview */
.ai-overview {
  width: 100%;
  max-width: 624px;
  margin: 16px auto;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  box-shadow: 0 12px 48px 0 rgba(0, 0, 0, 0.25), inset 1px 1px 0 0 rgba(255, 255, 255, 0.05);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.ai-overview:hover {
  background: rgba(32, 36, 49, 0.7);
  border-color: rgba(100, 150, 255, 0.3);
  box-shadow: 0 16px 64px 0 rgba(79, 70, 229, 0.15), inset 1px 1px 0 0 rgba(255, 255, 255, 0.1);
  transform: translateY(-4px);
}

.ai-overview__header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ai-overview__logo {
  width: 32px;
  height: 32px;
}

.ai-overview__title {
  font-size: 18px;
  font-weight: 700;
  color: var(--white);
}

.ai-overview__content {
  margin-top: 8px;
  font-size: 14px;
  color: var(--dark-gray);
}

.ai-overview__show-more {
  display: none;
  margin-top: 8px;
  padding: 8px 16px;
  background: var(--button);
  border: 1px solid rgba(79, 70, 229, 0.3);
  border-radius: 16px;
  color: var(--white);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ai-overview__show-more:hover {
  background: rgba(79, 70, 229, 1);
  box-shadow: 0 12px 48px rgba(79, 70, 229, 0.35);
  transform: translateY(-2px);
}

.ai-overview__show-more::after {
  content: 'Show more ↓';
}

.ai-overview__divider {
  width: 100%;
  height: 1px;
  background: rgba(79, 70, 229, 0.2);
  margin-top: 16px;
}

.ai-overview__thinking {
  font-size: 14px;
  color: rgba(100, 150, 255, 0.8);
  display: inline-block;
  animation: shimmer 2s infinite;
}

/* Existing styles (unchanged) */
html,
body {
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  background: var(--bg-primary);
  background-attachment: fixed;
  color: var(--white);
  min-height: 100vh;
  transition: background-color 0.3s ease;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(15, 20, 25, 0.3);
}

::-webkit-scrollbar-thumb {
  background: rgba(100, 150, 255, 0.4);
  border-radius: 10px;
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.08);
  transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 150, 255, 0.6);
}

svg {
  display: block;
}

/* Header */
.header {
  width: 100%;
  height: 48px;
  display: flex;
  padding-right: 4px;
  background: rgba(23, 25, 37, 0.7);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
  border-radius: 0 0 24px 0;
  transition: all 0.3s ease;
}


.header__section {
  display: flex;
  align-items: center;
}
.header__section--left {
  overflow: hidden;
}
.header__section--right {
  margin-left: auto;
}

.header__menu-button,
.header__apps-button {
  background: transparent;
  border: none;
  cursor: pointer;
  outline: none;
  transition: all 0.3s ease;
}
.header__menu-button:focus,
.header__apps-button:hover,
.header__apps-button:focus {
  background: rgba(79, 70, 229, 0.2);
  border-radius: 16px;
}

.header__menu-button {
  padding: 12px 16px;
  border: none;
}
.header__menu-button > svg {
  width: 24px;
  height: 24px;
  fill: var(--gray);
  transition: all 0.3s ease;
}

.header__link {
  height: 100%;
  display: flex;
  align-items: center;
  margin-right: 8px;
  padding: 0 8px;
  border: none;
  font-size: 12px;
  font-weight: 700;
  color: var(--gray);
  cursor: pointer;
  position: relative;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.header__link:hover {
  color: var(--dark-gray);
}
.header__link--active {
  color: var(--blue);
}
.header__link--active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--blue), transparent);
  border-radius: 2px;
  box-shadow: 0 0 12px rgba(79, 70, 229, 0.5);
}

.header__desktop-link {
  display: none;
  margin-right: 14px;
  font-size: 14px;
  color: var(--dark-gray);
  text-decoration: none;
  transition: all 0.3s ease;
}
.header__desktop-link:hover {
  color: var(--white);
  text-decoration: underline;
}

.header__apps-button {
  margin-right: 6px;
  padding: 8px;
  border-radius: 50%;
}
.header__apps-button > svg {
  width: 20px;
  height: 20px;
  fill: var(--dark-gray);
  transition: all 0.3s ease;
}

.header__login-button {
  min-width: 80px;
  background: var(--button);
  backdrop-filter: blur(15px);
  color: var(--white);
  margin: 0 8px;
  padding: 9px 15px;
  border: 1px solid rgba(79, 70, 229, 0.3);
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 32px rgba(79, 70, 229, 0.25), inset 1px 1px 0 0 rgba(255, 255, 255, 0.1);
}
.header__login-button:hover {
  background: rgba(79, 70, 229, 1);
  box-shadow: 0 12px 48px rgba(79, 70, 229, 0.35), inset 1px 1px 0 0 rgba(255, 255, 255, 0.15);
  transform: translateY(-3px);
  border-color: rgba(79, 70, 229, 0.5);
}

/* Main Content */
.content {
  display: flex;
  flex-direction: column;
  flex: 1 0 auto;
  align-items: center;
  padding-top: 30px;
}

.content__logo {
  max-width: 200px;
  width: 100%;
  margin: 36px auto 18px;
  transition: all 0.3s ease;
  filter: drop-shadow(0 8px 24px rgba(79, 70, 229, 0.2));
}

.content__logo:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 12px 32px rgba(79, 70, 229, 0.3));
}

.content__search {
  width: 100%;
  max-width: 624px;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 8px auto 0;
}

.search-bar {
  width: 100%;
  display: flex;
  align-items: center;
  position: relative;
}

.search-bar__input {
  width: 100%;
  margin: 0 8px;
  padding: 12px 36px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 14px;
  font-weight: 400;
  border-radius: 20px;
  outline: none;
  background: var(--bg-input);
  backdrop-filter: blur(15px);
  color: var(--white);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.08);
}

.search-bar__input::placeholder {
  color: rgba(148, 163, 184, 0.6);
}

.search-bar__input:hover,
.search-bar__input:focus {
  border-color: rgba(79, 70, 229, 0.6);
  background: rgba(15, 20, 25, 0.85);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.15), inset 0 0 0 1px rgba(79, 70, 229, 0.3);
}

.search-bar__search-icon {
  position: absolute;
  left: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
}
.search-bar__search-icon > svg {
  fill: rgba(148, 163, 184, 0.6);
}
.search-bar__search-icon:hover > svg {
  fill: var(--blue);
}

.search-bar__mic-icon {
  position: absolute;
  right: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
}
.search-bar__mic-icon > svg {
  fill: var(--dark-gray);
}
.search-bar__mic-icon:hover > svg {
  fill: var(--blue);
  filter: drop-shadow(0 0 8px rgba(79, 70, 229, 0.5));
}

.desktop__buttons {
  width: 100%;
  display: none;
  align-items: center;
  justify-content: center;
  margin: 16px 0 0;
  gap: 12px;
}

.desktop__button {
  background: var(--button);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(79, 70, 229, 0.3);
  border-radius: 16px;
  color: var(--white);
  font-size: 14px;
  text-align: center;
  margin: 8px 4px;
  padding: 8px 16px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 32px rgba(79, 70, 229, 0.25), inset 1px 1px 0 0 rgba(255, 255, 255, 0.1);
}
.desktop__button:hover {
  background: rgba(79, 70, 229, 1);
  box-shadow: 0 12px 48px rgba(79, 70, 229, 0.35), inset 1px 1px 0 0 rgba(255, 255, 255, 0.15);
  transform: translateY(-3px);
  border-color: rgba(79, 70, 229, 0.5);
}

.content__text {
  width: 95%;
  margin: 20px auto 0;
  color: var(--white);
  font-size: 16px;
  text-align: center;
}
.content__text a {
  color: var(--white);
  transition: all 0.3s ease;
}
.content__text a:hover {
  color: var(--blue);
  text-decoration: underline;
}

/* Footer */
.footer {
  display: flex;
  flex-direction: column;
}

.footer__section {
  display: flex;
  align-items: center;
  background: rgba(23, 25, 37, 0.6);
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--dark-gray);
  font-size: 16px;
  transition: all 0.3s ease;
}
.footer__section--top {
  padding: 15px 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.footer__section--bottom {
  flex-wrap: wrap;
  justify-content: space-between;
  padding: 0 20px;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.footer__link {
  padding: 15px;
  font-size: 14px;
  color: var(--gray);
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.footer__link:hover {
  color: var(--white);
  text-decoration: underline;
  text-shadow: 0 0 12px rgba(79, 70, 229, 0.3);
}

/* Other Components */
/* Apps Menus */
.apps-menu {
  width: calc(100vw - 24px);
  max-width: 320px;
  height: 0;
  max-height: 440px;
  position: absolute;
  top: 56px;
  right: 12px;
  background: rgba(23, 25, 37, 0.7);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  box-shadow: 0 12px 48px 0 rgba(0, 0, 0, 0.3), inset 1px 1px 0 0 rgba(255, 255, 255, 0.08);
  display: flex;
  padding: 6px 0 6px 6px;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.apps-menu__content {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  display: flex;
  flex-flow: row wrap;
  align-items: flex-start;
  justify-content: flex-start;
  align-content: flex-start;
}

.apps-menu__content::-webkit-scrollbar {
  width: 16px;
}
.apps-menu__content::-webkit-scrollbar-thumb {
  background: rgba(100, 150, 255, 0.3);
  background-clip: padding-box;
  border: 6px solid transparent;
  border-radius: 8px;
  box-shadow: none;
  min-height: 50px;
  transition: all 0.3s ease;
}
.apps-menu__content::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 150, 255, 0.6);
  background-clip: padding-box;
  border: 6px solid transparent;
}
.apps-menu__content::-webkit-scrollbar-track {
  background: none;
  border: none;
}

.apps-menu__item {
  width: calc(33.3% - 12px);
  margin: 6px;
  padding: 12px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-decoration: none;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: rgba(32, 36, 49, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.apps-menu__item:hover {
  background: rgba(79, 70, 229, 0.2);
  border-color: rgba(79, 70, 229, 0.4);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(79, 70, 229, 0.2);
}

.apps-menu__item img {
  width: 42px;
  height: 42px;
  transition: all 0.3s ease;
}

.apps-menu__item:hover img {
  filter: drop-shadow(0 0 8px rgba(79, 70, 229, 0.5));
}

.apps-menu__title {
  color: var(--dark-gray);
  max-width: calc(100% + (9px * 2));
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  font-size: 12px;
  transition: all 0.3s ease;
}

.apps-menu__item:hover .apps-menu__title {
  color: var(--white);
}

/* Left Menu */
.left-menu {
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  position: absolute;
  z-index: 1;
  animation: fadeIn 0.3s ease;
}

.left-menu__content {
  max-width: 250px;
  width: 85%;
  height: 100%;
  padding-top: 16px;
  background: rgba(23, 25, 37, 0.9);
  backdrop-filter: blur(20px);
  font-size: 16px;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 2;
  transform: translateX(-250px);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.left-menu__img {
  display: block;
  width: fit-content;
  height: fit-content;
  margin: 0 0 8px 16px;
  transition: all 0.3s ease;
}
.left-menu__img img {
  max-width: 84px;
  width: 100%;
  filter: drop-shadow(0 4px 12px rgba(79, 70, 229, 0.2));
}

.left-menu__list {
  display: flex;
  flex-direction: column;
}

.left-menu__item {
  display: flex;
  align-items: center;
}

.left-menu__item > a {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  padding: 10px 16px;
  color: var(--gray);
  text-decoration: none;
  margin: 2px 0;
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.left-menu__item > a:hover {
  background: rgba(79, 70, 229, 0.2);
  color: var(--white);
  padding-right: 20px;
  border-color: rgba(79, 70, 229, 0.3);
}

.left-menu__item > a > i {
  margin-right: 14px;
  transition: all 0.3s ease;
}

.left-menu__item > a:hover > i {
  color: var(--blue);
  filter: drop-shadow(0 0 6px rgba(79, 70, 229, 0.5));
}

.left-menu__divider {
  width: 100%;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 5px 0;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes shimmer {
  0% {
    opacity: 0.6;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0.6;
  }
}

/* Media Queries */
@media (max-width: 170px) {
  .apps-menu__item {
    width: calc(100% - 12px);
  }
}

@media (min-width: 171px) and (max-width: 255px) {
  .apps-menu__item {
    width: calc(50% - 12px);
  }
}

@media (max-width: 768px) {
  .footer__section--bottom {
    justify-content: center;
  }
  .footer__links--right {
    display: none;
  }
}

@media (min-width: 768px) {
  .content {
    padding-top: 56px;
  }
  .content__logo {
    max-width: 320px;
  }
}

@media (min-width: 1024px) {
  .header {
    padding: 6px;
  }
  .header__menu-button {
    display: none;
  }
  .header__section--left {
    display: none;
  }
  .header__desktop-link {
    display: flex;
  }
  .content {
    padding-top: 80px;
  }
  .desktop__buttons {
    display: flex;
  }
}

/* LTR Support for Form Inputs */
.dir-ltr {
  direction: ltr !important;
  text-align: left !important;
}