:root {
  --text-color: #202124;
  --secondary-text: #5f6368;
  --link-color: #1a73e8;
  --button-bg: #1a73e8;
  --button-hover: #1b66c9;
  --input-border: #dadce0;
  --input-focus: #1a73e8;
  --bg-color: white;
  --error-color: #d93025;
  --loading-bar: #1a73e8;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text-color: #e8eaed;
    --secondary-text: #9aa0a6;
    --link-color: #8ab4f8;
    --button-bg: #8ab4f8;
    --button-hover: #a6c4f8;
    --input-border: #5f6368;
    --input-focus: #8ab4f8;
    --bg-color: black;
    --error-color: #f28b82;
    --loading-bar: #8ab4f8;
    --button-text-color: black;
  }
}

body {
  font-family: 'Google Sans', 'Roboto', Arial, sans-serif;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  margin: 0;
  background-color: var(--bg-color);
  color: var(--text-color);
  transition: background-color 0.3s, color 0.3s;
  overflow-x: hidden;
}

.login-container {
  width: 100%;
  max-width: 448px;
  padding: 48px 40px 36px;
  background-color: var(--bg-color);
  text-align: center;
  box-sizing: border-box;
  margin-top: 70px;
  border: 1px solid var(--input-border);
  border-radius: 8px;
  position: relative;
}

/* Mobile-specific styles */
@media (max-width: 600px) {
  body {
    padding-bottom: 80px; /* Space for fixed footer */
  }
  
  .login-container {
    padding: 24px;
    max-width: 100%;
    border: none;
    margin-top: 20px;
    min-height: calc(100vh - 80px);
  }
  
  .login-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px 24px;
    background-color: var(--bg-color);
    z-index: 100;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
  }
  
  /* Adjust layout when keyboard is visible */
  @media (max-height: 500px) {
    .login-container {
      padding-top: 10px;
      margin-top: 0;
    }
    .logo {
      margin-top: 0;
      margin-bottom: 10px;
    }
  }
}

/* Desktop styles */
@media (min-width: 601px) {
  body {
    background-color: #f1f1f1;
    align-items: center;
  }
  
  .login-container {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    margin-top: 0;
  }
  
  @media (prefers-color-scheme: dark) {
    body {
      background-color: #202124;
    }
  }
}

/* Rest of your existing CSS remains the same */
.logo {
  display: block;
  margin: 0 auto 16px;
  width: 75px;
  margin-top: 10px;
}

h1 {
  font-size: 24px;
  font-weight: 400;
  margin: 0 0 16px;
  color: var(--text-color);
}

.description {
  font-size: 18px;
  color: var(--text-color);
  margin-bottom: 24px;
}

.input-box {
  width: 100%;
  margin-bottom: 20px;
  position: relative;
}

.input-box input {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid var(--input-border);
  border-radius: 4px;
  background-color: var(--bg-color);
  color: var(--text-color);
  font-size: 16px;
  outline: none;
  height: 54px;
  box-sizing: border-box;
  transition: border 0.2s, box-shadow 0.2s;
}

.input-box input:focus {
  border-color: var(--input-focus);
  border-width: 0.8px;
  box-shadow: 0 0 0 1px var(--input-focus);
}

.input-box input.active-shadow {
  box-shadow: 0 0 0 2px var(--input-focus);
}

.input-box input:focus + .floating-label,
.input-box input:not(:placeholder-shown) + .floating-label {
  top: -8px;
  left: 10px;
  font-size: 12px;
  background-color: var(--bg-color);
  padding: 0 5px;
  color: var(--input-focus);
}

.floating-label {
  position: absolute;
  pointer-events: none;
  left: 15px;
  top: 17px;
  color: var(--secondary-text);
  font-size: 16px;
  transition: 0.2s ease all;
}

.error-message {
  color: var(--error-color);
  font-size: 12px;
  text-align: left;
  margin-top: 4px;
  line-height: 16px;
}

.forgot-email {
  font-size: 14px;
  color: var(--link-color);
  text-decoration: none;
  display: block;
  margin: 8px 0 40px;
  text-align: left;
  font-weight: 500;
}

.login-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 25px;
  color: none;
  font-size: 14px;
  position: relative;
  padding: 0;
  background-color: none;
  box-shadow: none;
}

.login-footer.up {
  position: relative !important;
  bottom: auto !important;
  margin-top: 20px !important;
  padding: 0 !important;
}

.create-account {
  color: var(--link-color);
  text-decoration: none;
  font-weight: 500;
}

.next-button {
  background-color: var(--button-bg);
  color: white;
  border: none;
  padding: 10px 24px;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  font-weight: 500;
  min-width: 88px;
  height: 36px;
}
@media (prefers-color-scheme: dark) {
  .next-button {
    color: black;
  }
}

.next-button:hover {
  background-color: var(--button-hover);
  box-shadow: 0 1px 2px 0 rgba(66,133,244,0.3), 0 1px 3px 1px rgba(66,133,244,0.15);
}

.guest-mode {
  font-size: 14px;
  color: var(--secondary-text);
  text-align: left;
  margin: 32px 0 0;
  display: inline-block;
  margin-top: 10px;
}

.guest-mode a {
  color: var(--link-color);
  text-decoration: none;
  font-weight: 500;
}

.language-selector {
            position: fixed;
            bottom: 20px;
            left: 0;
            right: 0;
            text-align: center;
            font-size: 12px;
            color: #5f6368;
        }

        .language-selector a {
            color: #1a73e8;
            text-decoration: none;
            padding: 0 3px;
        }

/* Google-style loading bar */
.loading-bar-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: transparent;
  z-index: 1000;
  display: none;
}

.loading-bar {
  height: 100%;
  width: 0;
  background-color: var(--loading-bar);
  transition: width 0.3s ease;
}

.loading-bar.animate {
  animation: loadingAnimation 2s ease-in-out infinite;
}

@keyframes loadingAnimation {
  0% { width: 0; left: 0; }
  50% { width: 70%; left: 0; }
  100% { width: 0; left: 100%; }
}