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

:root {
  --bg-primary: #1a0f08;
  --bg-panel: rgba(245, 235, 220, 0.92);
  --border-gold: #c9a84c;
  --border-gold-light: #e8d5a3;
  --border-brown: #8b6914;
  --text-primary: #2c1810;
  --text-light: #f5ebdc;
  --text-muted: #8b7355;
  --accent-green: #4a7c3f;
  --accent-green-hover: #5a9450;
  --accent-gold: #d4a843;
}

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

html, body.kimi-auth {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  font-family: Lato, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
}

.kimi-page {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

.kimi-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.kimi-bg-parallax {
  position: absolute;
  inset: -30px;
  transition: transform 0.3s ease-out;
  transform: scale(1.05);
}

.kimi-bg-parallax img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.kimi-bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(26,15,8,0.25) 0%, rgba(26,15,8,0.5) 60%, rgba(26,15,8,0.7) 100%);
}

.kimi-particles { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 1; }
.particle {
  position: absolute;
  background: rgba(201, 168, 76, 0.4);
  border-radius: 50%;
  pointer-events: none;
  animation: particleFloat linear infinite;
}

.logo-container {
  position: fixed;
  top: 20px;
  left: 40px;
  z-index: 30;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.5));
  animation: fadeIn 0.8s ease forwards;
}
.logo-container img { width: 220px; max-width: 42vw; height: auto; display: block; }

.side-menu-container {
  position: fixed;
  top: 140px;
  left: 40px;
  z-index: 30;
  width: 200px;
  border-radius: 4px;
  background: linear-gradient(180deg, rgba(70,55,35,0.92) 0%, rgba(50,38,25,0.88) 100%);
  border: 1px solid var(--border-gold);
  backdrop-filter: blur(8px);
  animation: fadeInLeft 0.5s ease 0.5s forwards;
  opacity: 0;
}
.side-menu-container nav { padding: 8px 0; }
.menu-item {
  display: block;
  padding: 12px 20px;
  font-family: Cinzel, serif;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text-light);
  transition: all 0.2s ease;
}
.menu-item:hover { background: rgba(201,168,76,0.15); color: var(--border-gold-light); }
.menu-item-active {
  background: rgba(201,168,76,0.25);
  border-left: 3px solid var(--border-gold);
  color: var(--border-gold-light);
}
.menu-divider { margin: 0 16px; height: 1px; background: rgba(139,105,20,0.3); }

.kimi-main {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  padding: 16px;
}

.login-panel {
  position: relative;
  width: 100%;
  max-width: 420px;
  border-radius: 8px;
  padding: 32px 40px;
  background: linear-gradient(180deg, #faf3e8 0%, #f5ebdc 50%, #ede0cc 100%);
  border: 2px solid var(--border-gold);
  box-shadow: 0 0 15px rgba(201,168,76,0.3), inset 0 0 15px rgba(201,168,76,0.05);
  animation: fadeInUp 0.6s ease 0.3s forwards, borderGlow 4s ease-in-out infinite;
  opacity: 0;
}

.panel-corner { position: absolute; width: 28px; height: 28px; opacity: 0.6; }
.panel-corner::before, .panel-corner::after { content: ""; position: absolute; background: var(--border-gold); }
.panel-corner-tl { top: -2px; left: -2px; }
.panel-corner-tl::before { top: 0; left: 0; width: 28px; height: 2px; }
.panel-corner-tl::after { top: 0; left: 0; width: 2px; height: 28px; }
.panel-corner-tr { top: -2px; right: -2px; }
.panel-corner-tr::before { top: 0; right: 0; width: 28px; height: 2px; }
.panel-corner-tr::after { top: 0; right: 0; width: 2px; height: 28px; }
.panel-corner-bl { bottom: -2px; left: -2px; }
.panel-corner-bl::before { bottom: 0; left: 0; width: 28px; height: 2px; }
.panel-corner-bl::after { bottom: 0; left: 0; width: 2px; height: 28px; }
.panel-corner-br { bottom: -2px; right: -2px; }
.panel-corner-br::before { bottom: 0; right: 0; width: 28px; height: 2px; }
.panel-corner-br::after { bottom: 0; right: 0; width: 2px; height: 28px; }

.login-panel-header { text-align: center; margin-bottom: 24px; animation: fadeIn 0.8s ease 0.4s forwards; opacity: 0; }
.login-panel-header h1 {
  margin: 0 0 8px;
  font-family: Cinzel, serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-gold);
  text-shadow: 0 2px 4px rgba(0,0,0,0.15);
}
.login-panel-header p {
  margin: 0;
  font-family: Cinzel, serif;
  font-size: 1rem;
  color: var(--text-muted);
}
.login-panel-header .divider {
  margin-top: 16px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-gold), transparent);
}

.kimi-field { margin-bottom: 18px; animation: fadeInUp 0.6s ease forwards; opacity: 0; }
.kimi-field:nth-child(1) { animation-delay: 0.45s; }
.kimi-field:nth-child(2) { animation-delay: 0.55s; }
.kimi-field label {
  display: block;
  margin-bottom: 8px;
  font-family: Cinzel, serif;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-primary);
}
.kimi-input-wrap { position: relative; }
.kimi-input-wrap .icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 14px;
  pointer-events: none;
}
.kimi-input-wrap input {
  width: 100%;
  height: 42px;
  padding: 0 16px 0 40px;
  border-radius: 4px;
  border: 1px solid var(--border-brown);
  background: linear-gradient(180deg, #ffffff 0%, #f8f4ec 100%);
  font-family: Lato, sans-serif;
  font-size: 14px;
  color: var(--text-primary);
  outline: none;
  transition: all 0.2s ease;
}
.kimi-input-wrap input:focus {
  border-color: var(--border-gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.2);
}
.kimi-input-wrap input:focus + .icon,
.kimi-input-wrap:focus-within .icon { color: var(--border-gold); }

.kimi-options {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  animation: fadeInUp 0.6s ease 0.65s forwards;
  opacity: 0;
}
.custom-checkbox {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-brown);
  border-radius: 3px;
  background: linear-gradient(180deg, #fff, #f8f4ec);
  cursor: pointer;
  position: relative;
}
.custom-checkbox:checked { background: var(--accent-green); border-color: var(--accent-green); }
.custom-checkbox:checked::after {
  content: "";
  position: absolute;
  left: 5px; top: 2px;
  width: 5px; height: 9px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.kimi-options label { font-size: 13px; cursor: pointer; color: var(--text-primary); }

.kimi-btn-wrap { animation: fadeInUp 0.6s ease 0.75s forwards; opacity: 0; }
.kimi-btn {
  width: 100%;
  height: 44px;
  border-radius: 4px;
  border: 1px solid #3d6b35;
  font-family: Cinzel, serif;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
  background: linear-gradient(180deg, #5a9450 0%, #4a7c3f 100%);
  box-shadow: 0 2px 6px rgba(74,124,63,0.2);
  cursor: pointer;
  transition: all 0.2s ease;
}
.kimi-btn:hover {
  background: linear-gradient(180deg, #6aa85f 0%, #5a9450 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(74,124,63,0.3);
}

.kimi-forgot {
  margin-top: 20px;
  text-align: center;
  animation: fadeInUp 0.6s ease 0.85s forwards;
  opacity: 0;
}
.kimi-forgot > a {
  font-family: Cinzel, serif;
  font-size: 13px;
  color: var(--accent-red, #8b2500);
  text-decoration: none;
}
.kimi-forgot > a:hover { text-decoration: underline; }
.kimi-forgot-panel {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(139,105,20,0.2);
  text-align: left;
}
.kimi-forgot-panel.hide { display: none; }
.kimi-forgot-panel p { font-size: 13px; color: var(--text-muted); line-height: 1.45; margin: 0 0 12px; }
.kimi-forgot-panel input { padding-left: 14px !important; }
.kimi-forgot-panel .kimi-btn { margin-top: 12px; height: 40px; font-size: 13px; }

.kimi-error { color: #b91c1c; font-size: 12px; margin-top: 4px; display: block; }
.kimi-countdown {
  margin-bottom: 16px;
  padding: 14px;
  border-radius: 6px;
  background: rgba(201,168,76,0.12);
  border: 1px solid rgba(201,168,76,0.35);
  text-align: center;
  font-family: Cinzel, serif;
  color: var(--text-primary);
}
.kimi-countdown .countdownContent { font-size: 1.1rem; color: var(--accent-gold); font-weight: 600; }

.kimi-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 20;
  padding: 12px 16px;
  text-align: center;
  background: rgba(26,15,8,0.85);
  border-top: 1px solid var(--border-gold);
  backdrop-filter: blur(4px);
  animation: fadeIn 0.8s ease 0.7s forwards;
  opacity: 0;
}
.kimi-footer-links { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 16px; margin-bottom: 6px; }
.kimi-footer-links a { font-size: 11px; color: var(--text-muted); text-decoration: none; transition: color 0.2s; }
.kimi-footer-links a:hover { color: var(--text-light); }
.kimi-footer-copy { font-size: 11px; color: var(--text-muted); }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInLeft { from { opacity: 0; transform: translateX(-20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes borderGlow {
  0%, 100% { box-shadow: 0 0 15px rgba(201,168,76,0.3), inset 0 0 15px rgba(201,168,76,0.05); }
  50% { box-shadow: 0 0 25px rgba(201,168,76,0.5), inset 0 0 25px rgba(201,168,76,0.1); }
}
@keyframes particleFloat {
  0% { transform: translateY(100vh) translate(0); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 0.5; }
  100% { transform: translateY(-10vh) translate(100px); opacity: 0; }
}

@media (max-width: 768px) {
  .side-menu-container { display: none; }
  .logo-container { left: 50%; transform: translateX(-50%); top: 16px; }
  .login-panel { padding: 24px 20px; max-width: none; margin: 0 5%; }
}
.hide { display: none !important; }

.kimi-register-terms {
  margin: 4px 0 18px;
  padding: 14px 0 0;
  border-top: 1px solid rgba(139,105,20,0.22);
}
.kimi-register-terms h2 {
  margin: 0 0 10px;
  font-family: Cinzel, serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-gold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.kimi-register-terms .kimi-options {
  align-items: flex-start;
  margin-bottom: 6px;
  animation: none;
  opacity: 1;
}
.kimi-register-terms label {
  line-height: 1.45;
}
.kimi-register-terms a {
  color: #8b2500;
  font-weight: 700;
  text-decoration: none;
}
.kimi-register-terms a:hover {
  text-decoration: underline;
}
.kimi-success {
  margin: 0 0 16px;
  padding: 10px 12px;
  border: 1px solid rgba(74,124,63,0.35);
  border-radius: 4px;
  background: rgba(74,124,63,0.12);
  color: #2f6d2b;
  font-size: 13px;
  line-height: 1.4;
}
.kimi-register-closed {
  margin: 0;
  padding: 14px;
  border: 1px solid rgba(139,37,0,0.3);
  border-radius: 4px;
  background: rgba(139,37,0,0.08);
  color: #8b2500;
  font-size: 14px;
  line-height: 1.45;
}

.kimi-support-panel {
  max-width: 520px;
}
.kimi-support-intro {
  margin: 0 0 18px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
}
.kimi-input-wrap select,
.kimi-input-wrap textarea {
  width: 100%;
  border-radius: 4px;
  border: 1px solid var(--border-brown);
  background: linear-gradient(180deg, #ffffff 0%, #f8f4ec 100%);
  font-family: Lato, sans-serif;
  font-size: 14px;
  color: var(--text-primary);
  outline: none;
  transition: all 0.2s ease;
}
.kimi-input-wrap select {
  height: 42px;
  padding: 0 36px 0 40px;
  appearance: auto;
}
.kimi-input-wrap textarea {
  min-height: 118px;
  padding: 12px 14px;
  resize: vertical;
  line-height: 1.45;
}
.kimi-input-wrap select:focus,
.kimi-input-wrap textarea:focus {
  border-color: var(--border-gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.2);
}
.kimi-textarea-wrap .icon {
  display: none;
}

body.kimi-support-page {
  overflow: auto;
}
body.kimi-support-page .kimi-page {
  min-height: 100vh;
  height: auto;
  overflow: visible;
  padding-bottom: 64px;
}
body.kimi-support-page .kimi-main {
  min-height: 100vh;
  height: auto;
  align-items: flex-start;
  padding-top: 72px;
  padding-bottom: 32px;
}
body.kimi-support-page .kimi-support-panel {
  margin-top: 0;
}
body.kimi-support-page .logo-container {
  top: 12px;
}
@media (max-width: 768px) {
  body.kimi-support-page .logo-container img {
    width: 170px;
  }
  body.kimi-support-page .kimi-main {
    padding-top: 140px;
  }
  body.kimi-support-page .login-panel {
    margin-bottom: 24px;
  }
}

body.kimi-activation-page {
  overflow: auto;
}
body.kimi-activation-page .kimi-page {
  min-height: 100vh;
  height: auto;
  overflow: visible;
  padding-bottom: 68px;
}
body.kimi-activation-page .kimi-main {
  min-height: 100vh;
  height: auto;
  align-items: flex-start;
  padding-top: 56px;
  padding-bottom: 36px;
}
body.kimi-activation-page #contentOuterContainer.size1 {
  width: min(720px, 94vw) !important;
  min-width: 0 !important;
  margin: 0 auto !important;
  float: none !important;
  position: relative;
  border-radius: 8px;
  background: linear-gradient(180deg, #faf3e8 0%, #f5ebdc 50%, #ede0cc 100%) !important;
  border: 2px solid var(--border-gold);
  box-shadow: 0 0 15px rgba(201,168,76,0.3), inset 0 0 15px rgba(201,168,76,0.05);
}
body.kimi-activation-page #contentOuterContainer .contentTitle,
body.kimi-activation-page #contentOuterContainer .contentFooter {
  display: none !important;
}
body.kimi-activation-page #contentOuterContainer .contentContainer {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 28px 32px 26px !important;
}
body.kimi-activation-page #content.activate {
  width: auto !important;
  min-height: 0 !important;
  color: var(--text-primary);
}
body.kimi-activation-page #content.activate .titleInHeader {
  margin: 0 0 12px !important;
  padding: 0 !important;
  height: auto !important;
  line-height: 1.2 !important;
  background: none !important;
  font-family: Cinzel, serif;
  font-size: 1.6rem;
  font-weight: 700;
  text-align: center;
  color: var(--accent-gold);
  text-shadow: 0 2px 4px rgba(0,0,0,0.15);
}
body.kimi-activation-page .activationScreen {
  font-family: Lato, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted);
}
body.kimi-activation-page .activationScreen > form,
body.kimi-activation-page .activationScreen #presentation {
  max-width: 100%;
}
body.kimi-activation-page #presentation svg {
  max-width: 100%;
}
body.kimi-activation-page .tribeDescription h2,
body.kimi-activation-page #selectedTribe .tribeName {
  font-family: Cinzel, serif;
  color: var(--text-primary);
}
body.kimi-activation-page .tribeDescription li {
  color: var(--text-primary);
}
body.kimi-activation-page .buttonContainer {
  text-align: center;
  margin-top: 18px;
}
body.kimi-activation-page .buttonContainer button.orange,
body.kimi-activation-page .buttonContainer button.green {
  min-width: 220px;
  min-height: 44px;
  border-radius: 4px !important;
  border: 1px solid #3d6b35 !important;
  background: linear-gradient(180deg, #5a9450 0%, #4a7c3f 100%) !important;
  box-shadow: 0 2px 6px rgba(74,124,63,0.2);
}
body.kimi-activation-page .buttonContainer button .button-background,
body.kimi-activation-page .buttonContainer button .buttonStart,
body.kimi-activation-page .buttonContainer button .buttonEnd,
body.kimi-activation-page .buttonContainer button .buttonMiddle {
  display: none !important;
}
body.kimi-activation-page .buttonContainer button .button-content {
  display: block !important;
  padding: 12px 22px !important;
  background: transparent !important;
  color: #fff !important;
  font-family: Cinzel, serif;
  font-size: 14px !important;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
body.kimi-activation-page #backButton.contentTitleButton {
  top: 24px;
  right: 24px;
}
@media (max-width: 768px) {
  body.kimi-activation-page .kimi-main {
    padding-top: 28px;
  }
  body.kimi-activation-page #contentOuterContainer .contentContainer {
    padding: 22px 16px !important;
  }
}

