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

:root {
  --primary-color: #2563eb;
  --primary-hover: #1d4ed8;
  --secondary-color: #3b82f6;
  --danger-color: #ef4444;
  --danger-hover: #dc2626;
  --background-color: #f0f9ff;
  --card-background: #ffffff;
  --text-primary: #1e3a5f;
  --text-secondary: #64748b;
  --border-color: #bfdbfe;
  --shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.1), 0 2px 4px -1px rgba(37, 99, 235, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(37, 99, 235, 0.1), 0 4px 6px -2px rgba(37, 99, 235, 0.05);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(135deg, var(--background-color) 0%, #e0f2fe 100%);
  min-height: 100vh;
  color: var(--text-primary);
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.header {
  text-align: center;
  padding: 30px 0;
}

.header h1 {
  color: var(--primary-color);
  font-size: 2rem;
  font-weight: 600;
}

.main-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-section {
  width: 100%;
}

.not-authenticated {
  text-align: center;
  background: var(--card-background);
  padding: 50px 40px;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
}

.welcome-text {
  font-size: 1.5rem;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.description {
  color: var(--text-secondary);
  margin-bottom: 30px;
}

.button-group {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  padding: 12px 32px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 120px;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.btn-secondary {
  background: white;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
  background: var(--background-color);
  transform: translateY(-1px);
}

.btn-danger {
  background: var(--danger-color);
  color: white;
}

.btn-danger:hover {
  background: var(--danger-hover);
  transform: translateY(-1px);
}

.authenticated {
  background: var(--card-background);
  padding: 40px;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
}

.user-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 20px;
}

.user-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--primary-color);
  background: var(--background-color);
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-info h2 {
  color: var(--text-primary);
  font-size: 1.5rem;
  margin-bottom: 5px;
}

.user-email {
  color: var(--text-secondary);
}

.account-settings {
  margin-bottom: 25px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.account-settings h3 {
  color: var(--text-primary);
  margin-bottom: 15px;
  font-size: 1.1rem;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.settings-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 15px;
  background: var(--background-color);
  border-radius: 10px;
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.settings-item:hover {
  background: white;
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.settings-icon {
  font-size: 1.2rem;
  color: var(--primary-color);
}

.settings-text {
  font-size: 0.9rem;
  font-weight: 500;
}

.user-details {
  margin-bottom: 30px;
}

.user-details h3 {
  color: var(--text-primary);
  margin-bottom: 15px;
  font-size: 1.1rem;
}

.info-table {
  width: 100%;
  border-collapse: collapse;
}

.info-table tr {
  border-bottom: 1px solid var(--border-color);
}

.info-table tr:last-child {
  border-bottom: none;
}

.info-table td {
  padding: 12px 0;
}

.info-table td:first-child {
  color: var(--text-secondary);
  width: 40%;
}

.info-table td:last-child {
  color: var(--text-primary);
  word-break: break-all;
}

.loading {
  text-align: center;
  padding: 50px;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--border-color);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

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

.callback-container {
  width: 100%;
  background: var(--card-background);
  padding: 60px 40px;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
}

.footer {
  text-align: center;
  padding: 20px 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.hidden {
  display: none !important;
}

@media (max-width: 600px) {
  .container {
    padding: 15px;
  }
  
  .header h1 {
    font-size: 1.5rem;
  }
  
  .not-authenticated,
  .authenticated {
    padding: 30px 20px;
  }
  
  .welcome-text {
    font-size: 1.25rem;
  }
  
  .user-card {
    flex-direction: column;
    text-align: center;
  }
  
  .settings-grid {
    grid-template-columns: 1fr;
  }
  
  .button-group {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
  }
}
