@font-face {
  font-family: "Google Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/aitrends.now/assets/fonts/GoogleSans-Regular-BAWu7gF0.woff2") format("woff2");
}

@font-face {
  font-family: "Google Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/aitrends.now/assets/fonts/GoogleSans-Medium-BDIf4JKU.woff2") format("woff2");
}

@font-face {
  font-family: "bootstrap-icons";
  font-display: swap;
  src: url("./assets/fonts/bootstrap-icons.woff2") format("woff2"),
    url("./assets/fonts/bootstrap-icons.woff") format("woff");
}

:root {
  --background-color: #ffffff;
  --text-color: #000000;
  --footer-text: #6c757d;
  --button-bg: #e9ecef;
  --button-text: #000000;
  --button-hover-border: #646cff;
  --shadow-color: rgba(0, 0, 0, 0.1);
  color-scheme: light dark;
}

html[data-theme="dark"] {
  --background-color: #242424;
  --text-color: rgba(255, 255, 255, 0.87);
  --footer-text: rgba(255, 255, 255, 0.5);
  --button-bg: #3a3a4c;
  --button-text: rgba(255, 255, 255, 0.87);
  --button-hover-border: #535bf2;
  --shadow-color: rgba(255, 255, 255, 0.1);
}

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: "Google Sans", system-ui, Arial, sans-serif !important;
  background-color: var(--background-color) !important;
  color: var(--text-color) !important;
  transition: background-color 0.3s ease, color 0.3s ease;
}

#root {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  text-align: center;
}

footer {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 1.25rem;
  height: 3.125rem;
  font-size: 0.75rem;
  color: var(--footer-text);
  background-color: var(--background-color);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

h1 {
  font-size: 2rem;
  font-weight: 700;
}

h2 {
  font-size: 1.75rem;
}

h3 {
  font-size: 1.5rem;
}

p {
  font-size: 0.9375rem;
  line-height: 1.6;
}

a {
  color: var(--button-hover-border);
  text-decoration: none;
}

a:hover {
  color: #535bf2;
}

button {
  border-radius: 0.5rem;
  border: none;
  padding: 0.6rem 1.2rem;
  font-size: 1rem;
  font-weight: 500;
  background-color: var(--button-bg);
  color: var(--button-text);
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.theme-switcher-btn {
  position: absolute;
  top: 0;
  right: 0;
  margin: 1rem;
  padding: 0;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
}

.theme-switcher-btn i.bi {
  width: 1.5rem;
  height: 1.5rem;
  line-height: 1.5rem;
  display: block;
  font-size: 1.5rem;
}

.theme-switcher-btn:hover i.bi {
  color: var(--text-color);
}

.profile-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 2rem;
}

.profile-section picture {
  display: block;
  width: 6.25rem;
  height: 6.25rem;
  margin: 0 auto 0.5rem;
  overflow: hidden;
}

.profile-image {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--text-color);
  box-shadow: 0 0 0.5rem 0.1rem var(--shadow-color);
}

.profile-username {
  font-family: "Google Sans", sans-serif;
  font-size: 3.125rem;
  font-weight: 600;
  letter-spacing: -0.09rem;
  line-height: 1.2;
  margin: 0.25rem 0 0; /* Reduced from 0.625rem to 0.25rem (4px) */
}

.profile-description {
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: -0.015rem;
  line-height: 1.2;
}

@media (min-width: 1024px) {
  .profile-section picture {
    width: 7.5rem;
    height: 7.5rem;
  }
}

.links-section {
  min-height: 350px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 25rem;
  align-items: center;
  overflow: hidden;
}

.link-card {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 3.125rem;
  max-height: 4.375rem;
  padding: 1rem;
  margin-bottom: 0.3rem;
  background-color: var(--button-bg);
  color: var(--text-color);
  border-radius: 0.5rem;
  font-size: 1rem;
  position: relative;
  gap: 0.8rem;
  transition: background-color 0.3s ease, color 0.3s ease;
  opacity: 0; /* Hidden until animated */
}

/* Alternating animations triggered by .animate */
.links-section.animate .link-card:nth-child(odd) {
  animation: slideInFromLeft 0.4s ease-out forwards;
}

.links-section.animate .link-card:nth-child(even) {
  animation: slideInFromRight 0.4s ease-out forwards;
}

/* Stagger delays */
.links-section.animate .link-card:nth-child(1) {
  animation-delay: 0.05s;
}
.links-section.animate .link-card:nth-child(2) {
  animation-delay: 0.1s;
}
.links-section.animate .link-card:nth-child(3) {
  animation-delay: 0.15s;
}
.links-section.animate .link-card:nth-child(4) {
  animation-delay: 0.2s;
}
.links-section.animate .link-card:nth-child(5) {
  animation-delay: 0.25s;
}
.links-section.animate .link-card:nth-child(6) {
  animation-delay: 0.3s;
}

/* Slide-in animations */
@keyframes slideInFromLeft {
  0% {
    opacity: 0;
    transform: translateX(-50%); /* Reduced from -100% for faster slide */
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInFromRight {
  0% {
    opacity: 0;
    transform: translateX(50%); /* Reduced from 100% */
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

/* First card: Combine slide-in with pulse */
.links-section.animate .link-card:first-child {
  animation: slideInFromLeft 0.4s ease-out forwards,
    quickScalePulse 0.8s infinite ease-in-out 0.4s;
}

/* Existing styles unchanged */
.link-card a {
  display: flex;
  align-items: center;
  flex: 1;
  color: inherit;
  text-decoration: none;
}

.link-card i.bi {
  width: 1.5rem;
  height: 1.5rem;
  margin-right: 0.8rem;
}

.link-options {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
  color: var(--footer-text);
  cursor: pointer;
}

.link-card:hover .link-options {
  color: var(--text-color);
}

@keyframes quickScalePulse {
  0% {
    transform: scale(1);
    opacity: 0.9;
  }
  30% {
    transform: scale(1.05);
    opacity: 1;
  }
  60% {
    transform: scale(1);
    opacity: 0.95;
  }
  100% {
    transform: scale(1);
    opacity: 0.9;
  }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .link-card {
    animation: none;
    opacity: 1;
  }
}

@media (max-width: 768px) {
  footer {
    font-size: 0.625rem;
  }
  h1 {
    font-size: 2rem;
  }
  h2 {
    font-size: 1.75rem;
  }
  p {
    font-size: 0.9375rem;
  }
  .profile-section picture {
    width: 5rem;
    height: 5rem;
  }
}

@media (max-width: 480px) {
  footer {
    font-size: 0.5rem;
  }
}

/* Modal Styles */
.simple-modal {
  position: relative;
  padding: 2px;
  background: none;
  color: inherit;
  border-radius: 0.75rem;
  z-index: 1050;
}

.modal-dialog {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  max-width: 100%;
}

.modal-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  background-color: var(--modal-bg) !important;
  color: var(--text-color) !important;
  box-shadow: 0 0.25rem 0.75rem var(--shadow-color);
  border-radius: 0.75rem;
}

html:not([data-theme="dark"]) .modal-content {
  background-color: #ffffff !important;
  color: #000000 !important;
}

html[data-theme="dark"] .modal-content {
  background-color: #2c2c3a !important;
  color: rgba(255, 255, 255, 0.87) !important;
}

.simple-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  width: 100%;
  border-bottom: none;
  background: none;
  color: var(--text-color);
}

.simple-modal-header .d-flex.align-items-center {
  gap: 1rem;
}

.modal-logo {
  border-radius: 50%;
  object-fit: cover;
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-color);
}

.modal-close-btn {
  padding: 0;
  font-size: 1rem;
  color: var(--footer-text);
  background: none;
  border: none;
}

.modal-close-btn:hover {
  color: var(--text-color);
}

.position-absolute.top-0.end-0.p-3 .modal-close-btn {
  top: 0.75rem;
  right: 0.75rem;
}

.simple-modal-header .small.text-muted {
  font-size: 0.875rem;
  color: var(--footer-text);
  margin-top: 0.5rem;
  text-align: center;
  width: 100%;
}

html[data-theme="dark"] .simple-modal-header .small.text-muted {
  color: #ffffff !important;
}

.simple-modal-body {
  padding: 1rem;
  text-align: center;
  width: 100%;
  background: none;
  color: var(--text-color);
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

.modal-input {
  font-size: 1rem;
  padding: 0.5rem 0;
  border: none;
  border-bottom: 1px solid var(--footer-text);
  background: transparent;
  color: var(--text-color);
  outline: none;
  width: 100%;
  transition: border-color 0.3s ease;
}

.modal-input:focus {
  border-bottom: 2px solid var(--button-hover-border);
}

.modal-input::placeholder {
  color: var(--footer-text);
  opacity: 0.8;
}

.modal-submit-btn {
  font-size: 1rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  background: var(--button-hover-border);
  color: var(--button-text);
  border: none;
  border-radius: 0.5rem;
  width: fit-content;
  margin: 0 auto;
  transition: background 0.3s ease;
}

.modal-submit-btn:hover {
  background: #535bf2;
}

.modal-message {
  font-size: 1rem;
  text-align: center;
  color: var(--text-color);
}

.modal-message.text-success {
  color: #28a745;
}

.modal-message.text-danger {
  color: #dc3545;
}

.btn {
  background-color: var(--button-bg) !important;
  color: var(--button-text) !important;
  border: none !important;
}

.btn:hover {
  background-color: var(--button-hover-border) !important;
  color: var(--button-text) !important;
}

.text-muted {
  color: var(--footer-text) !important;
}

@media (min-width: 768px) {
  .simple-modal {
    max-width: 25rem;
  }
  .modal-title {
    font-size: 1.5rem;
  }
  .modal-input {
    padding: 0.75rem 0;
  }
  .modal-submit-btn {
    padding: 0.75rem 1.5rem;
  }
  .simple-modal-header .small.text-muted {
    font-size: 1rem;
  }
  .position-absolute.top-0.end-0.p-3 .modal-close-btn {
    top: 1rem;
    right: 1rem;
  }
}
