/* Custom Font */
@font-face {
  font-family: 'Akt Thin';
  src: url('/fonts/font.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Style Font';
  src: url('/fonts/style-font.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

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

body {
  font-family: 'Akt Thin', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #000;
  color: #fff;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

.auth-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 24px 32px;
  z-index: 10;
  display: flex;
  align-items: center;
}

.auth-logo {
  height: 36px;
  width: auto;
  opacity: 0.9;
  transition: opacity 0.2s ease;
}

.auth-logo:hover {
  opacity: 1;
}

#wave {
  position: fixed;
  width: calc(100% + 30px);
  height: calc(100% + 30px);
  left: -15px;
  top: -15px;
  display: block;
  filter: blur(3px);
  opacity: 0.85;
  transform: translateZ(0);
  will-change: transform;
  z-index: 0;
}

.auth-layout {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 80px;
  width: 100%;
  padding: 40px;
  margin-left: -200px;
}

.auth-hero {
  flex: 0 0 auto;
  text-align: right;
}

.hero-title {
  display: flex;
  flex-direction: column;
  gap: 8px;
  line-height: 1;
  text-align: right;
}

.hero-flow {
  font-size: 80px;
  font-family: 'Style Font', 'Akt Thin', sans-serif !important;
  font-weight: 800;
  letter-spacing: 6px;
  color: #fff;
}

.hero-subtitle {
  font-size: 80px;
  font-family: 'Style Font', 'Akt Thin', sans-serif !important;
  font-weight: 800;
  letter-spacing: 3px;
}

.hero-subtitle:first-of-type {
  color: #00CABA;
}

.hero-subtitle:last-of-type {
  color: #fff;
}

.auth-container {
  flex: 0 0 auto;
  width: 440px;
  margin-left: -40px;
}

.auth-box {
  background: rgba(128, 128, 128, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 48px 40px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.form-container {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.form-container.hidden {
  display: none;
  opacity: 0;
  transform: translateY(10px);
}

.form-container h2 {
  font-size: 24px;
  font-family: 'Style Font', 'Akt Thin', sans-serif;
  font-weight: 600;
  margin-bottom: 28px;
  text-align: left;
}

.input-group {
  margin-bottom: 16px;
}

.password-group {
  position: relative;
}

.input-group input {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  background: #0a0a0a;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  transition: all 0.2s ease;
}

.password-group input {
  padding-right: 48px;
}

.toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  transition: color 0.2s ease;
}

.toggle-password:hover {
  color: #999;
}

.toggle-password svg {
  width: 20px;
  height: 20px;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.toggle-password .eye-off-icon {
  display: none;
}

.toggle-password.visible .eye-icon {
  display: none;
}

.toggle-password.visible .eye-off-icon {
  display: block;
}

.input-group input:focus {
  outline: none;
  border: 1px solid transparent;
  background: linear-gradient(#0f0f0f, #0f0f0f) padding-box,
              linear-gradient(135deg, #00CABA, #007370) border-box;
}

.input-group input::placeholder {
  color: #666;
}

.btn-primary {
  width: 100%;
  height: 48px;
  background: #2a2a2a;
  color: #666;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: not-allowed;
  margin-top: 8px;
  transition: all 0.2s ease;
  font-family: inherit;
}

.btn-primary.active {
  background: linear-gradient(135deg, #00CABA, #007370);
  color: #fff;
  cursor: pointer;
}

.btn-primary.active:hover {
  background: linear-gradient(135deg, #00E5D0, #008C87);
  transform: translateY(-1px);
}

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

.toggle-text {
  text-align: center;
  margin-top: 24px;
  color: #999;
  font-size: 14px;
}

.link {
  color: #fff;
  cursor: pointer;
  text-decoration: underline;
  transition: color 0.2s ease;
}

.link:hover {
  color: #ccc;
}

/* Footer */
.auth-footer {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
}

.footer-link {
  color: #999;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: #fff;
}

.footer-divider {
  color: #666;
}

/* Mobile */
@media (max-width: 1024px) {
  .auth-header {
    padding: 20px 24px;
  }
  
  .auth-logo {
    height: 32px;
  }
  
  .auth-layout {
    flex-direction: column;
    gap: 48px;
    padding: 40px 20px;
    margin-left: 0;
  }
  
  .auth-hero {
    justify-content: center;
    padding-right: 0;
  }
  
  .hero-flow {
    font-size: 56px;
  }
  
  .hero-subtitle {
    font-size: 36px;
  }
  
  .auth-container {
    width: 100%;
    max-width: 420px;
  }
}

@media (max-width: 600px) {
  body {
    min-height: 100vh;
    min-height: 100dvh;
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .auth-header {
    position: absolute;
    padding: max(16px, env(safe-area-inset-top)) 20px 12px;
  }
  
  .auth-logo {
    height: 28px;
  }
  
  .auth-layout {
    flex: 1 0 auto;
    justify-content: center;
    gap: clamp(20px, 5vh, 36px);
    padding: max(84px, calc(env(safe-area-inset-top) + 72px)) 20px 28px;
  }
  
  .hero-flow {
    font-size: clamp(40px, 12vw, 52px);
    letter-spacing: 4px;
  }
  
  .hero-subtitle {
    font-size: clamp(22px, 6.5vw, 30px);
    letter-spacing: 1.5px;
  }
  
  .hero-title {
    text-align: center;
    align-items: center;
    gap: 5px;
    line-height: 1.08;
  }

  .auth-hero {
    width: 100%;
  }

  .auth-container {
    width: 100%;
    max-width: 440px;
    margin-left: 0;
  }
  
  .auth-box {
    padding: 28px 22px;
    border-radius: 18px;
  }
  
  .form-container h2 {
    font-size: 22px;
    text-align: center;
  }
  
  .auth-footer {
    position: relative;
    left: auto;
    bottom: auto;
    transform: none;
    flex: 0 0 auto;
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 10px;
    padding: 12px 20px max(16px, env(safe-area-inset-bottom));
    font-size: 12px;
    text-align: center;
  }
  
  .footer-divider {
    display: inline;
  }

  .input-group input,
  .btn-primary {
    height: 50px;
  }

  .policy-modal {
    padding: 16px;
  }

  .policy-modal-content {
    width: 100%;
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    padding: 24px 20px;
  }

  .policy-modal-buttons {
    gap: 10px;
  }

  .policy-btn {
    height: 44px;
  }
}

@media (max-width: 600px) and (max-height: 700px) {
  .auth-layout {
    gap: 18px;
    padding-top: max(70px, calc(env(safe-area-inset-top) + 60px));
    padding-bottom: 16px;
  }

  .hero-flow {
    font-size: 38px;
  }

  .hero-subtitle {
    font-size: 21px;
  }

  .auth-box {
    padding: 22px 20px;
  }

  .form-container h2 {
    margin-bottom: 18px;
  }

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

  .toggle-text {
    margin-top: 18px;
  }
}

/* Policy Modal */
.policy-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.policy-modal.show {
  display: flex;
  opacity: 1;
}

.policy-modal-content {
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 16px;
  padding: 32px;
  max-width: 480px;
  width: 90%;
  animation: modalSlideIn 0.3s ease;
}

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

.policy-modal-title {
  font-size: 22px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 16px;
}

.policy-modal-text {
  font-size: 14px;
  color: #999;
  margin-bottom: 24px;
  line-height: 1.5;
}

.policy-checkboxes {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 28px;
}

.policy-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
}

.policy-checkbox input[type="checkbox"] {
  margin-top: 2px;
  width: 20px;
  height: 20px;
  cursor: pointer;
  flex-shrink: 0;
  accent-color: #00CABA;
}

.policy-checkbox span {
  font-size: 14px;
  color: #fff;
  line-height: 1.5;
}

.policy-checkbox a {
  color: #00CABA;
  text-decoration: underline;
}

.policy-checkbox a:hover {
  color: #00E5D0;
}

.policy-modal-buttons {
  display: flex;
  gap: 12px;
}

.policy-btn {
  flex: 1;
  height: 44px;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.policy-btn-cancel {
  background: transparent;
  border: 1px solid #2a2a2a;
  color: #999;
}

.policy-btn-cancel:hover {
  background: #1a1a1a;
  border-color: #3a3a3a;
  color: #fff;
}

.policy-btn-confirm {
  background: #2a2a2a;
  color: #666;
  cursor: not-allowed;
}

.policy-btn-confirm:not(:disabled) {
  background: linear-gradient(135deg, #00CABA, #007370);
  color: #fff;
  cursor: pointer;
}

.policy-btn-confirm:not(:disabled):hover {
  background: linear-gradient(135deg, #00E5D0, #008C87);
  transform: translateY(-1px);
}

.policy-btn-confirm:not(:disabled):active {
  transform: translateY(0);
}

/* Error state for buttons */
.btn-primary.error {
  background: #ff4444 !important;
  color: #fff !important;
  cursor: not-allowed !important;
  animation: shake 0.3s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}
