/* styles.css - Shared styles for FindMyUni */
/* Global Resets and Variables */
html {
  overflow-y: scroll;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
:root {
  --black: rgb(0, 0, 0);
  --gray: rgb(153, 153, 153);
  --light-gray: rgb(245, 245, 245);
  --white: rgb(255, 255, 255);
  --border-gray: rgb(230, 230, 230);
  --yellow: rgb(255, 220, 120);
  --yellow-hover: rgb(255, 210, 90);
  --green: rgb(200, 240, 200);
  --green-hover: rgb(180, 230, 180);
  --blue: rgb(200, 230, 255);
  --blue-hover: rgb(180, 220, 245);
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.6;
  color: var(--black);
  background: var(--white);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
  height: 101%;
}

/* Auth Pages */
.auth-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  position: relative;
  z-index: 1;
}
.auth-box {
  width: 100%;
  max-width: 420px;
}
.auth-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
  text-align: center;
}
.auth-subtitle {
  font-size: 0.9375rem;
  color: var(--gray);
  margin-bottom: 2.5rem;
  text-align: center;
}
.auth-container::after {
  content: "";
  display: block;
  height: 120px;
}
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.form-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--black);
  letter-spacing: -0.01em;
}
.form-input {
  padding: 0.875rem 1rem;
  border: 1.5px solid var(--border-gray);
  border-radius: 10px;
  font-size: 0.9375rem;
  font-family: "Inter", sans-serif;
  color: var(--black);
  background: var(--white);
  transition: all 0.3s;
  outline: none;
}
.form-input:focus {
  border-color: var(--black);
}
.form-input::placeholder {
  color: var(--gray);
}
.btn-submit {
  padding: 0.875rem 2rem;
  background: var(--black);
  color: var(--white);
  border: none;
  border-radius: 10px;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: -0.01em;
  transition: all 0.3s ease;
  margin-top: 0.5rem;
}
.btn-submit:active {
  transform: scale(0.98);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.auth-link {
  text-align: center;
  font-size: 0.9375rem;
  color: var(--gray);
  margin-top: 2rem;
}
.auth-link a {
  color: var(--black);
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.3s;
}
.auth-link a:hover {
  opacity: 0.7;
}

/* Navbar and Header */
.navbar {
  background: var(--white);
  padding: 1.25rem 2rem;
  border-bottom: 1px solid var(--border-gray);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 900px;
  margin: 0 auto;
}
.logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--black);
  text-decoration: none;
  letter-spacing: -0.02em;
  margin-top: 0.2rem;
}
.user-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--light-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.3s;
}
.user-icon:hover {
  background: var(--border-gray);
}

/* Custom Alert Styles */
#notification-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 400px;
}

.custom-alert {
  background: var(--white);
  border: 1px solid var(--border-gray);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  max-width: 380px;
  font-family: "Inter", sans-serif;
  font-size: 0.875rem;
  color: var(--black);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  position: relative;
  pointer-events: none;
}

.custom-alert.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.alert-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border-radius: 50%;
}

.alert-content {
  flex: 1;
  min-width: 0;
}

.alert-title {
  font-weight: 600;
  color: var(--black);
  margin-bottom: 0.25rem;
  letter-spacing: -0.01em;
}

.alert-message {
  color: var(--gray);
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.alert-close {
  background: none;
  border: none;
  font-size: 1rem;
  color: var(--gray);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: background 0.2s ease;
  flex-shrink: 0;
}

.alert-close:hover {
  background: var(--light-gray);
}

/* Shooting Stars Animation */
.shooting-star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: var(--gray);
  border-radius: 50%;
  box-shadow: 0 0 10px 2px rgba(153, 153, 153, 0.3);
  animation: shoot 3s linear infinite;
  opacity: 0;
}

@keyframes shoot {
  0% {
    transform: translateX(0) translateY(0) rotate(-45deg);
    opacity: 1;
  }
  70% {
    opacity: 1;
  }
  100% {
    transform: translateX(-300px) translateY(300px) rotate(-45deg);
    opacity: 0;
  }
}

.shooting-star::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 50px;
  height: 1px;
  background: linear-gradient(90deg, rgba(153, 153, 153, 0.8), transparent);
}

/* Typewriter Cursor Animation */
.cursor {
  font-weight: 400;
  font-size: 40px;
  color: var(--gray);
  margin-left: 2px;
  opacity: 1;
  animation: none;
}

.blink {
  animation: blink-caret 1s step-end infinite;
}

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

/* Scroll Indicator Animation */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  transition: opacity 0.5s ease;
  opacity: 0;
  pointer-events: none;
}

.scroll-indicator.visible {
  animation: pulse 3s infinite;
  opacity: 1;
  pointer-events: auto;
}

.scroll-arrow {
  width: 24px;
  height: 24px;
  border-left: 2px solid var(--black);
  border-bottom: 2px solid var(--black);
  transform: rotate(-45deg);
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.3;
    transform: translateX(-50%) translateY(0);
  }
  50% {
    opacity: 1;
    transform: translateX(-50%) translateY(10px);
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  #notification-container {
    right: 10px;
    left: 10px;
    max-width: none;
  }

  .custom-alert {
    max-width: none;
  }

  .cursor {
    font-size: 30px;
  }
}
