/* Authentication Styles */

/* Hide content when authentication is required */
body.auth-required .container {
  display: none;
}

/* Login Overlay */
.login-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.3s ease-in;
}

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

/* Login Container */
.login-container {
  background: white;
  border-radius: 16px;
  padding: 48px;
  max-width: 450px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Login Header */
.login-header {
  text-align: center;
  margin-bottom: 32px;
}

.login-logo {
  height: 48px;
  margin-bottom: 16px;
}

.login-header h2 {
  color: #2d3748;
  font-size: 28px;
  font-weight: 700;
  margin: 0;
}

/* Login Content */
.login-content {
  text-align: center;
}

.login-content > p {
  color: #4a5568;
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 24px;
}

#googleSignInButton {
  display: flex;
  justify-content: center;
  margin: 32px 0;
}

.login-note {
  color: #718096;
  font-size: 14px;
  margin-top: 24px;
  padding: 12px;
  background: #f7fafc;
  border-radius: 8px;
  border-left: 4px solid #667eea;
}

/* Authentication Error */
.auth-error {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: #fff5f5;
  border: 1px solid #fc8181;
  border-radius: 8px;
  color: #c53030;
  font-size: 14px;
  margin-bottom: 20px;
  animation: shake 0.4s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-10px); }
  75% { transform: translateX(10px); }
}

.auth-error svg {
  flex-shrink: 0;
}

/* User Info in Header */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 30px;
  background: white;
  border-bottom: 2px solid #e2e8f0;
  margin-bottom: 30px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.user-details {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid #667eea;
}

.user-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.user-name {
  font-weight: 600;
  color: #2d3748;
  font-size: 14px;
}

.user-email {
  font-size: 12px;
  color: #718096;
}

.logout-button {
  padding: 8px 16px;
  background: #fff;
  border: 1px solid #cbd5e0;
  border-radius: 6px;
  color: #4a5568;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.logout-button:hover {
  background: #f7fafc;
  border-color: #a0aec0;
  color: #2d3748;
}

.logout-button:active {
  transform: scale(0.98);
}

/* Responsive Design */
@media (max-width: 768px) {
  .login-container {
    padding: 32px 24px;
    width: 95%;
  }

  .login-header h2 {
    font-size: 24px;
  }

  .login-content > p {
    font-size: 14px;
  }

  .header {
    flex-direction: column;
    gap: 16px;
  }

  .user-info {
    width: 100%;
    justify-content: space-between;
  }
}

/* Loading state for authenticated content */
body.auth-required .container {
  opacity: 0;
  pointer-events: none;
}

body:not(.auth-required) .container {
  animation: fadeInContent 0.4s ease-in;
}

@keyframes fadeInContent {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
