/* Dark mode login page styles */
:root {
  --bg-primary: #0f0f0f;
  --bg-secondary: #1a1a1a;
  --bg-card: #242424;
  --text-primary: #ffffff;
  --text-secondary: #a0a0a0;
  --accent: #2481cc;
  --accent-hover: #1c6ba8;
  --border: #333333;
  --shadow: rgba(0, 0, 0, 0.5);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-container {
  width: 100%;
  max-width: 480px;
  animation: fadeIn 0.5s ease-in;
}

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

.login-card {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 48px 40px;
  box-shadow: 0 8px 32px var(--shadow);
  border: 1px solid var(--border);
}

.logo {
  text-align: center;
  margin-bottom: 32px;
}

.logo-icon {
  font-size: 64px;
  margin-bottom: 16px;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.logo h1 {
  font-size: 28px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.welcome-text {
  text-align: center;
  margin-bottom: 40px;
}

.welcome-text h2 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.welcome-text p {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.login-section {
  margin-bottom: 32px;
}

#telegram-login-container {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
  min-height: 48px;
}

#telegram-login-container iframe {
  border-radius: 8px !important;
}

.login-info {
  text-align: center;
}

.login-info p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.features {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
  padding: 24px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.feature {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--text-secondary);
}

.feature-icon {
  font-size: 20px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  border-radius: 8px;
  flex-shrink: 0;
}

.footer {
  text-align: center;
}

.footer p {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.footer a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}

.footer a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* Loading state */
.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 32px;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.loading-text {
  font-size: 14px;
  color: var(--text-secondary);
}

img.avatar {
    max-width: 100%;
    width: 100px;
    height: 100px;
}

/* Error state */
.error {
  background: rgba(220, 38, 38, 0.1);
  border: 1px solid rgba(220, 38, 38, 0.3);
  border-radius: 8px;
  padding: 16px;
  margin-top: 16px;
  text-align: center;
}

.error-title {
  font-size: 16px;
  font-weight: 600;
  color: #ef4444;
  margin-bottom: 8px;
}

.error-message {
  font-size: 14px;
  color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 640px) {
  .login-card {
    padding: 32px 24px;
  }

  .logo-icon {
    font-size: 48px;
  }

  .logo h1 {
    font-size: 24px;
  }

  .welcome-text h2 {
    font-size: 20px;
  }

  .welcome-text p {
    font-size: 14px;
  }
}
