@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --header-height: 60px;
  --header-h: var(--header-height);
  --footer-h: 56px;

  --c-bg-body: #F3F4F6;
  --c-bg-card: rgba(255, 255, 255, 0.65);
  --c-bg-glass: rgba(255, 255, 255, 0.4);
  --c-bg-input: rgba(255, 255, 255, 0.5);
  --c-bg-input-focus: #FFFFFF;

  --c-text-main: #111827;
  --c-text-sub: #4B5563;
  --c-text-mute: #9CA3AF;
  --c-text-on-accent: #FFFFFF;

  --c-accent-primary: #0D9488;
  --c-accent-hover: #115E59;
  --c-accent-glow: rgba(13, 148, 136, 0.3);

  --c-border: rgba(0, 0, 0, 0.06);
  --c-border-highlight: rgba(255, 255, 255, 0.8);
  --c-border-focus: #0D9488;

  --c-error: #EF4444;
  --c-error-bg: rgba(254, 242, 242, 0.8);

  --f-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --color-primary: #2a9d8f;
  --color-brand-dark: #10302d;
  --color-text-head: #10302d;
  --color-border: #e2e8f0;
  --container-width: 1200px;

  --radius-2xl: 24px;
  --radius-xl: 16px;
  --radius-l: 12px;
  --radius-m: 8px;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.02), 0 12px 32px -4px rgba(0, 0, 0, 0.04), inset 0 0 0 1px rgba(255, 255, 255, 0.6);
  --shadow-input-focus: 0 0 0 4px var(--c-accent-glow);
  --shadow-btn: 0 4px 12px rgba(13, 148, 136, 0.25), inset 0 1px 0 rgba(255,255,255,0.2);

  --ease-spring: cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

body {
  font-family: var(--f-family);
  background-color: var(--c-bg-body);
  color: var(--c-text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 15% 50%, rgba(45, 212, 191, 0.08), transparent 25%),
    radial-gradient(circle at 85% 30%, rgba(99, 102, 241, 0.08), transparent 25%),
    #F8FAFC;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: -1;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  z-index: 1100;
  backdrop-filter: blur(8px);
}

.header-container {
  width: 100%;
  max-width: 1840px;
  margin: 0 auto;
  padding: 0 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
  position: relative;
}

.logo img {
  width: 120px;
  height: 24px;
  display: block;
}

.header-buttons {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.login-button,
.cta-button,
.mobile-login-text {
  font-size: 0.87rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.5rem 1.3rem;
  border: 1px solid transparent;
  text-decoration: none;
}

.login-button {
  border-color: transparent;
  color: var(--color-brand-dark);
}

.cta-button {
  background: var(--color-primary);
  color: #FFFFFF;
  box-shadow: 0 8px 20px rgba(42, 157, 143, 0.25);
}

.cta-button:hover { opacity: 0.9; }

.mobile-login-text {
  display: none;
  color: var(--color-primary);
  padding: 0;
}

.main-container {
  flex: 1;
  display: flex;
  padding-top: var(--header-h);
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: calc(100vh - var(--header-h) - var(--footer-h));
  min-height: calc(100dvh - var(--header-h) - var(--footer-h));
}

.login-wrapper {
  width: 100%;
  max-width: 460px;
  padding: 0 1.8rem;
  margin: 0 auto;
  padding-block: 24px;
}

.form-card {
  background: var(--c-bg-card);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-radius: var(--radius-2xl);
  padding: clamp(20px, 2.6vh, 32px);
  width: 100%;
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(255, 255, 255, 0.4);
  position: relative;
  overflow: hidden;
}

.form-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(180deg, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.form-head {
  text-align: center;
  margin-bottom: clamp(12px, 1.8vh, 18px);
}

.form-head h1 {
  font-size: 24px;
  font-weight: 700;
  color: var(--c-text-main);
  margin-bottom: 2px;
  letter-spacing: -0.02em;
}

.form-head p {
  font-size: 14px;
  color: var(--c-text-sub);
  line-height: 1.45;
}

.btn-google {
  width: 100%;
  height: 48px;
  background: #FFFFFF;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-l);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s var(--ease-spring);
  color: var(--c-text-main);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}

.btn-google:hover {
  border-color: #CBD5E1;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(0,0,0,0.04);
}

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

.divider {
  display: flex;
  align-items: center;
  margin: 14px 0;
  color: var(--c-text-mute);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.divider::before, .divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(0,0,0,0.08);
}

.divider span { padding: 0 16px; }

.field-group { margin-bottom: 12px; }

.label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--c-text-main);
}

.input-container { position: relative; }

.input {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: var(--radius-l);
  font-size: 15px;
  color: var(--c-text-main);
  background: var(--c-bg-input);
  transition: all 0.2s var(--ease-spring);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.01);
}

.input::placeholder { color: var(--c-text-mute); }

.input:hover {
  background: rgba(255,255,255,0.8);
  border-color: rgba(0,0,0,0.12);
}

.input:focus {
  outline: none;
  background: var(--c-bg-input-focus);
  border-color: var(--c-border-focus);
  box-shadow: var(--shadow-input-focus);
}

.input.error {
  border-color: var(--c-error);
  background: var(--c-error-bg);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15);
}

.toggle-pw {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 12px;
  color: var(--c-text-sub);
  cursor: pointer;
  font-weight: 600;
  padding: 6px;
  border-radius: 6px;
  opacity: 0.7;
  transition: 0.2s;
}

.toggle-pw:hover {
  opacity: 1;
  background: rgba(0,0,0,0.05);
}

.btn-submit {
  width: 100%;
  height: 48px;
  background: var(--color-primary);
  color: var(--c-text-on-accent);
  border: none;
  border-radius: var(--radius-l);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s var(--ease-spring);
  box-shadow: var(--shadow-btn);
  margin-top: 4px;
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -4px rgba(42, 157, 143, 0.4), inset 0 1px 0 rgba(255,255,255,0.3);
}

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

.btn-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.error-msg {
  color: var(--c-error);
  font-size: 12px;
  font-weight: 500;
  margin-top: 6px;
  display: none;
  animation: slideDown 0.2s ease-out;
}

.alert-container.login-alert {
  position: fixed;
  top: calc(var(--header-h) + 16px);
  left: 50%;
  transform: translateX(-50%);
  width: min(560px, calc(100% - 32px));
  z-index: 1200;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.alert {
  border-radius: 12px;
  padding: 12px 16px;
  border: 1px solid transparent;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.alert.is-fading {
  opacity: 0;
  transform: translateY(-6px);
}

.alert-success {
  border-color: rgba(22, 163, 74, 0.2);
  background: rgba(240, 253, 244, 0.85);
  color: #15803d;
}

.alert-danger {
  border-color: rgba(239, 68, 68, 0.25);
  background: var(--c-error-bg);
  color: #b91c1c;
}

.alert-message {
  flex: 1;
}

.alert .close {
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  color: currentColor;
}

.login-footer-links {
  margin-top: 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.link-sub {
  font-size: 13px;
  color: var(--c-text-sub);
  text-decoration: none;
  transition: color 0.2s;
}

.link-sub:hover { color: var(--color-primary); }

.link-register {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-primary);
  text-decoration: none;
}

.link-register:hover { text-decoration: underline; }

.register-note {
  font-size: 13px;
  color: var(--c-text-sub);
  margin-right: 6px;
}

.site-footer {
  background: #FFFFFF;
  border-top: 1px solid var(--color-border);
  padding: 80px 0 0;
  margin-top: 0;
  width: 100%;
  flex-shrink: 0;
}

.footer-container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  flex-direction: column;
  gap: 60px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 3rem;
}

.footer-logo a {
  display: inline-flex;
  align-items: center;
  transition: opacity 0.3s ease;
}

.footer-logo a:hover { opacity: 0.8; }

.footer-logo img {
  height: 32px;
  width: auto;
}

.footer-message {
  font-size: 13px;
  color: #6b7280;
  line-height: 1.8;
  font-weight: 500;
  max-width: 260px;
}

.footer-section-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-text-head);
  margin-bottom: 1.5rem;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-link {
  font-size: 13px;
  color: #6b7280;
  font-weight: 500;
  text-decoration: none;
}

.footer-link:hover { color: var(--color-primary); }

.footer-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.footer-info-item {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}

.footer-icon svg {
  width: 16px;
  height: 16px;
  color: var(--color-primary);
  flex-shrink: 0;
  vertical-align: middle;
}

.footer-info-text {
  font-size: 13px;
  color: #6b7280;
  line-height: 1.6;
  font-weight: 500;
  text-decoration: none;
}

a.footer-info-text:hover {
  color: var(--color-primary);
}

.footer-bottom {
  border-top: 1px solid var(--color-border);
  padding: 32px 0;
  text-align: center;
}

.footer-copyright {
  font-size: 11px;
  color: #94a3b8;
  letter-spacing: 0.05em;
  text-align: center;
  margin: 0;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1024px) {
  .header-buttons .login-button,
  .header-buttons .cta-button {
    display: none;
  }

  .mobile-login-text {
    display: inline-flex;
    font-size: 14px;
    font-weight: 700;
  }
}

@media (max-width: 900px) {
  .header-container { padding: 0 2rem; justify-content: space-between; }
  .form-card { padding: 32px 24px; }
}

@media (max-width: 768px) {
  .header-container { padding: 0 1.5rem; }
  .footer-container {
    padding: 0 1.5rem;
    gap: 40px;
  }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .logo img { width: 130px; }
  .footer-container { padding: 0 1.25rem; }
}
