html {
  /* Force dark mode by default for login page */
  --haven-green: #2a3431;
  --primary-purple: #6366f1;
  --background-color: #121212;
  --card-background: #121212;
  --text-primary: #EAEAEA;
  --text-secondary: #888888;
  --border-color: #2C2C2C;
  --error-red: #f43f5e;
  --font-family: 'Work Sans', sans-serif;
}
html { height: 100%; }
body { min-height: 100%; margin: 0; font-family: var(--font-family); background-color: var(--background-color); color: var(--text-primary); display: flex; justify-content: center; align-items: center; overflow: hidden; }
.login-card { background-color: var(--card-background); width: 100%; max-width: 520px; max-height: 95vh; border-radius: 24px; border: 1px solid var(--border-color); padding: 72px 60px; box-sizing: border-box; }
.card-content { width: 100%; max-width: 400px; text-align: center; display: flex; flex-direction: column; justify-content: center; align-items: center; }
.card-header { margin-bottom: 64px; width: 100%; }
.title { font-size: 2.75rem; font-weight: 700; line-height: 1.2; margin: 0 0 16px 0; white-space: nowrap; }
.haven-text {
  background: linear-gradient(45deg, #f8ad00, #e13333, #3992ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}
@keyframes blink-cursor { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
.subtitle { font-size: 1.125rem; color: var(--primary-purple); font-weight: 500; margin: 0; min-height: 27px; display: flex; justify-content: center; align-items: center; }
.cursor { width: 2px; height: 1.25rem; background-color: var(--primary-purple); margin-left: 4px; animation: blink-cursor 1s infinite; }
.login-form { width: 100%; display: flex; flex-direction: column; align-items: center; }
.input-container { width: 100%; margin-bottom: 24px; position: relative; }
.input-field, .soultag-field { width: 100%; height: 56px; border: 1px solid var(--border-color); border-radius: 12px; padding: 0 20px; font-size: 1rem; font-family: var(--font-family); box-sizing: border-box; background-color: var(--background-color); color: var(--text-primary); }
.input-field::placeholder { color: var(--text-secondary); }
.input-field:focus, .input-field:focus-visible { outline: none; border-color: var(--primary-purple); box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2); }
.soultag-field { display: flex; justify-content: space-between; align-items: center; letter-spacing: 0.1em; }
.soultag-placeholder { color: var(--text-secondary); letter-spacing: normal; }
.shuffle-icon { cursor: pointer; user-select: none; transition: transform 0.2s ease; }
.shuffle-icon:hover { transform: scale(1.1) rotate(6deg); }
.error-message { color: var(--error-red); font-size: 0.875rem; text-align: left; margin: 4px 0 0 4px; min-height: 20px; }
.info-link-container { margin-block: 32px; }
.info-link { color: var(--text-primary); text-decoration: none; font-weight: 500; background: none; border: none; font-size: 1rem; font-family: var(--font-family); cursor: pointer; }
.submit-button { width: 64px; height: 64px; border-radius: 50%; background-color: var(--primary-purple); color: white; border: none; cursor: pointer; display: flex; justify-content: center; align-items: center; transition: all 0.2s ease; }
.submit-button:hover { transform: scale(1.05); box-shadow: 0 10px 20px rgba(99, 102, 241, 0.25); }
.popup-backdrop { position: fixed; inset: 0; background-color: rgba(0, 0, 0, 0.5); display: flex; justify-content: center; align-items: center; z-index: 1000; backdrop-filter: blur(4px); opacity: 1; transition: opacity 0.3s ease-in-out; }
.popup-backdrop.hidden { opacity: 0; pointer-events: none; }
.popup-content { background-color: var(--card-background); padding: 32px 40px 40px 40px; border-radius: 16px; width: 100%; max-width: 500px; position: relative; box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1); transform: scale(1); transition: transform 0.3s ease-in-out; }
.popup-backdrop.hidden .popup-content { transform: scale(0.95); }
.popup-close-button { position: absolute; top: 16px; right: 16px; background: none; border: none; cursor: pointer; color: var(--text-secondary); padding: 4px; display: flex; }
.popup-title { font-size: 1.5rem; font-weight: 600; margin: 0 0 32px 0; text-align: center; }
.feature-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 24px; }
.feature-item { display: flex; align-items: flex-start; gap: 16px; text-align: left; }
.feature-icon { color: var(--primary-purple); font-size: 28px; margin-top: 2px; }
.feature-text h3 { margin: 0 0 4px 0; font-size: 1rem; font-weight: 600; color: var(--text-primary); }
.feature-text p { margin: 0; font-size: 0.9rem; color: var(--text-secondary); line-height: 1.5; }
@media (max-width: 820px) { .login-card { height: 100vh; max-height: 100vh; width: 100vw; max-width: 100vw; border-radius: 0; border: none; padding: 20px; overflow-y: auto; display: flex; align-items: center; justify-content: center; } .title { font-size: 2rem; } .subtitle { font-size: 1rem; } .popup-content { margin: 20px; max-width: calc(100% - 40px); } }