:root {
  --bg-start: #032d80;
  --bg-end: #001e63;
  --surface: rgba(255, 255, 255, 0.08);
  --text: #f8fbff;
  --btn-text: #0f1b4e;
  --ms-color: #1a4bb3;
  --google-color: #ffffff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 20% 20%, #0b49b5 0%, var(--bg-start) 45%, var(--bg-end) 100%);
}

.top-bar {
  width: 100%;
  display: flex;
  justify-content: flex-end;
  padding: 1rem 1rem 0;
}

.support-btn {
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.12);
  color: #f8fbff;
  border-radius: 10px;
  padding: 0.5rem 0.85rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 140ms ease, transform 140ms ease;
}

.support-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.splash {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  padding: 2rem;
}

.ms-connect-status {
  text-align: center;
  color: rgba(248, 251, 255, 0.85);
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  padding: 0 1rem 0.35rem;
}

.copyright {
  text-align: center;
  color: rgba(248, 251, 255, 0.75);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  padding: 0.6rem 1rem 1rem;
}

.logo {
  width: min(360px, 60vw);
  height: auto;
  display: block;
}

.login-options {
  width: min(420px, 92vw);
  display: grid;
  gap: 0.9rem;
}

.login-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: 0;
  border-radius: 12px;
  padding: 0.95rem 1rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, filter 140ms ease;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.22);
}

.login-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
}

.login-btn:active {
  transform: translateY(0);
}

.login-btn:disabled {
  cursor: not-allowed;
  transform: none;
  filter: none;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
}

.microsoft {
  background: linear-gradient(135deg, #2d63cf, var(--ms-color));
  color: #ffffff;
}

.google {
  background: linear-gradient(135deg, #e3e6eb, #c7cdd6);
  color: #5b6473;
  border: 1px solid #b8bfca;
}

.google:disabled .icon {
  opacity: 0.6;
}

.icon {
  width: 1.07rem;
  height: 1.07rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.result-wrapper {
  min-height: calc(100vh - 60px);
  display: grid;
  place-items: center;
  padding: 1.4rem;
}

.result-card {
  width: min(560px, 94vw);
  display: grid;
  gap: 0.75rem;
  padding: 1.2rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
}

.result-card h1,
.result-card p {
  margin: 0;
}

.result-details {
  color: rgba(248, 251, 255, 0.9);
  font-size: 0.92rem;
}

.result-link {
  justify-self: start;
  margin-top: 0.4rem;
  color: #f8fbff;
  text-decoration: underline;
  text-underline-offset: 0.2rem;
}

.support-dialog {
  width: min(520px, 92vw);
  border: 1px solid rgba(2, 22, 78, 0.25);
  border-radius: 14px;
  padding: 0;
  background: #f8fbff;
  color: #102054;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
}

.support-dialog::backdrop {
  background: rgba(0, 10, 40, 0.58);
}

.support-form {
  display: grid;
  gap: 0.5rem;
  padding: 1.2rem;
}

.support-form h2 {
  margin: 0;
}

.support-form p {
  margin: 0 0 0.4rem;
  color: #36487b;
  font-size: 0.9rem;
}

.support-form label {
  margin-top: 0.15rem;
  font-size: 0.88rem;
  font-weight: 600;
}

.support-form input,
.support-form textarea {
  width: 100%;
  border: 1px solid #ccd4e1;
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  font-size: 0.95rem;
  font-family: inherit;
}

.support-form textarea {
  resize: vertical;
}

.support-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  margin-top: 0.55rem;
}

.primary-btn,
.secondary-btn {
  border-radius: 10px;
  border: 0;
  padding: 0.58rem 0.9rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.primary-btn {
  background: #1a4bb3;
  color: #ffffff;
}

.secondary-btn {
  background: #e6ebf5;
  color: #253768;
}

@media (max-width: 520px) {
  .top-bar {
    justify-content: center;
    padding-top: 0.8rem;
  }

  .splash {
    gap: 1.6rem;
    padding-top: 1.2rem;
  }

  .logo {
    width: min(280px, 84vw);
  }

  .support-actions {
    flex-direction: column-reverse;
  }
}
