:root {
  /* Colors */
  --primary-blue: #036;
  --primary-dark: #024;
  --primary-light: #f0f4ff;
  --text-dark: #2c3e50;
  --text-light: #6c757d;
  --white: #fff;
  --gray-light: #f8f9fa;
  --gray-border: #dadce0;

  /* Gradients */
  --header-gradient: linear-gradient(180deg, #036 0%, #024 100%);
  --background-gradient: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);

  /* Shadows */
  --shadow-light: 0 2px 15px rgb(0 0 0 / 10%);
  --shadow-medium: 0 10px 25px rgb(0 0 0 / 8%);
  --shadow-button: 0 1px 3px rgb(66 133 244 / 20%);

  /* Borders */
  --border-radius-sm: 4px;
  --border-radius-md: 8px;
  --border-radius-lg: 12px;

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
}

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

html,
body {
  height: 100%;
  width: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, sans-serif;
  background: var(--background-gradient);
  color: var(--text-dark);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  line-height: 1.5;
}

header {
  background: var(--header-gradient);
  color: var(--white);
  padding: var(--spacing-lg);
  text-align: center;
  box-shadow: var(--shadow-light);
  position: relative;
  overflow: hidden;
}

header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #4dabf7, #036, #024);
}

header h1 {
  margin: 0;
  font-size: 2.25rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  position: relative;
  z-index: 1;
}

header p {
  margin: var(--spacing-xs) 0 0;
  opacity: 0.9;
  font-size: 1rem;
  font-weight: 300;
  position: relative;
  z-index: 1;
}

main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-lg);
  position: relative;
}

/* Background pattern */
main::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(
      circle at 10% 20%,
      rgb(77 171 247 / 5%) 0%,
      transparent 20%
    ),
    radial-gradient(
      circle at 90% 80%,
      rgb(3 54 73 / 5%) 0%,
      transparent 20%
    );
  pointer-events: none;
}

.login-section {
  background: var(--white);
  padding: var(--spacing-xl);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-medium);
  text-align: center;
  width: 100%;
  max-width: 500px;
  border: 1px solid rgb(0 0 0 / 5%);
  position: relative;
  z-index: 1;
  animation: fade-in-up 0.6s ease-out;
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-section h2 {
  margin: 0 0 var(--spacing-xs);
  font-weight: 600;
  color: var(--text-dark);
  font-size: 1.75rem;
}

.login-section > p {
  margin: 0 0 var(--spacing-lg);
  color: var(--text-light);
  font-size: 1rem;
  line-height: 1.6;
}

.google-login-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--white);
  color: #3c4043;
  border: 1px solid var(--gray-border);
  border-radius: var(--border-radius-sm);
  padding: 0;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-fast);
  width: auto;
  min-width: 240px;
  max-width: 280px;
  height: 47px;
  margin: 0 auto;
  overflow: hidden;
  position: relative;
}

.google-login-button:hover {
  background-color: var(--gray-light);
  box-shadow: var(--shadow-button);
  transform: translateY(-1px);
}

.google-login-button:active {
  background-color: #f1f3f4;
  transform: translateY(0);
  box-shadow: none;
}

.google-login-button:focus {
  outline: 2px solid var(--primary-blue);
  outline-offset: 2px;
}

.google-button-content {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.google-icon-wrapper {
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--white);
  border-right: 1px solid var(--gray-border);
  padding: 8px;
  flex-shrink: 0;
}

.google-icon {
  width: 30px;
  height: 30px;
}

.google-button-text {
  flex: 1;
  font-family: Roboto, sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.25px;
  padding: 0 12px;
  white-space: nowrap;
}

.login-info {
  margin-top: var(--spacing-lg);
  padding-top: var(--spacing-md);
  border-top: 1px solid rgb(0 0 0 / 8%);
}

.login-info small {
  color: var(--text-light);
  font-size: 0.85rem;
  line-height: 1.5;
  display: block;
}

footer a {
  color: var(--text-light);
  text-decoration: none;
  margin: 0 var(--spacing-xs);
  transition: color var(--transition-fast);
}

.login-info a {
  color: var(--primary-blue);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition-fast);
}

footer a:hover {
  color: var(--primary-blue);
  text-decoration: underline;
}

.login-info a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

#status {
  margin-top: var(--spacing-md);
  color: var(--text-light);
  font-size: 0.9rem;
  min-height: 1.5rem;
  transition: all var(--transition-fast);
  opacity: 0;
  transform: translateY(-5px);
}

#status.show {
  opacity: 1;
  transform: translateY(0);
}

footer {
  text-align: center;
  padding: var(--spacing-md);
  font-size: 0.85rem;
  color: var(--text-light);
  background: rgb(255 255 255 / 90%);
  border-top: 1px solid rgb(0 0 0 / 5%);
  backdrop-filter: blur(5px);
}

@media (width <= 768px) {
  :root {
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
  }

  header h1 {
    font-size: 1.75rem;
  }

  .login-section {
    padding: var(--spacing-lg);
    margin: var(--spacing-sm);
  }

  .login-section h2 {
    font-size: 1.5rem;
  }

  .google-login-button {
    max-width: 100%;
  }
}

@media (width <= 480px) {
  header {
    padding: var(--spacing-md);
  }

  header h1 {
    font-size: 1.5rem;
  }

  .login-section {
    padding: var(--spacing-md);
  }

  .login-section h2 {
    font-size: 1.25rem;
  }

  .login-section > p {
    font-size: 0.9rem;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  white-space: nowrap;
  border: 0;
}

.loading-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgb(255 255 255 / 30%);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  vertical-align: middle;
  margin-right: 8px;
}

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