/* 기본 폰트는 트렌디한 Pretendard (토스 등에서 사용) */
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css');

body {
  margin: 0;
  padding: 0;
  font-family: 'Pretendard', sans-serif;
  background: linear-gradient(135deg, #e0c3fc 0%, #8ec5fc 100%);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.auth-screen,
.app-screen {
  width: 100%;
  display: none;
  justify-content: center;
  align-items: center;
}

.auth-screen.active,
.app-screen.active {
  display: flex;
}

.auth-screen {
  min-height: 100vh;
  padding: 24px;
  box-sizing: border-box;
}

.auth-shell {
  width: min(420px, 100%);
  padding: 28px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.38);
  box-shadow: 0 24px 50px rgba(67, 56, 202, 0.16);
}

.auth-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: #4338ca;
  background: rgba(255, 255, 255, 0.72);
  margin-bottom: 16px;
}

.auth-shell h1 {
  margin: 0 0 8px;
  font-size: 30px;
  color: #111827;
}

.auth-shell p {
  margin: 0 0 24px;
  color: #4b5563;
  line-height: 1.6;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.remember-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #374151;
  font-size: 14px;
  font-weight: 600;
}

.remember-row input {
  width: 18px;
  height: 18px;
  margin: 0;
}

.login-error {
  min-height: 20px;
  margin: 0;
  color: #dc2626;
  font-size: 14px;
}

.auth-button {
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: 16px;
  font-size: 16px;
  font-weight: 700;
  color: white;
  background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
  box-shadow: 0 16px 30px rgba(79, 70, 229, 0.24);
}

.auth-button:disabled {
  opacity: 0.75;
}

.glass-container {
  width: 100%;
  max-width: 420px;
  height: 90vh;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 32px;
  box-shadow: 0 8px 32px rgba(31, 38, 135, 0.15);
  padding: 24px;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
}

.header h1 {
  font-size: 28px;
  font-weight: 700;
  color: #1f2937;
  margin: 0;
}

.header p {
  color: #4b5563;
  font-size: 14px;
  margin-top: 4px;
  margin-bottom: 24px;
}

.otp-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: calc(100% - 100px);
  overflow-y: auto;
  padding-bottom: 80px;
  -webkit-overflow-scrolling: touch;
}

.otp-list::-webkit-scrollbar { display: none; }

.glass-card {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.glass-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.otp-card {
  border: 1px solid rgba(255, 255, 255, 0.8);
  text-align: left;
  width: 100%;
  cursor: pointer;
}

.otp-card:active {
  transform: scale(0.99);
}

.otp-issuer {
  font-size: 14px;
  color: #6b7280;
  font-weight: 600;
  margin-bottom: 8px;
}

.otp-code {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: 4px;
  color: #111827;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.progress-ring {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: conic-gradient(#3b82f6 var(--p, 100%), #e5e7eb 0);
  transition: --p 1s linear;
}

.fab {
  position: absolute;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 32px;
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4);
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
}

.fab:hover {
  transform: scale(1.05) rotate(90deg);
  background: #2563eb;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.4);
  display: flex;
  justify-content: center;
  align-items: flex-end;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  width: 100%;
  max-width: 420px;
  margin-bottom: -100%;
  border-radius: 32px 32px 0 0;
  transition: margin-bottom 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 32px 24px;
}

.modal.active .modal-content {
  margin-bottom: 0;
}

input {
  width: 100%;
  padding: 16px;
  margin-bottom: 12px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 12px;
  background: rgba(255,255,255,0.5);
  font-size: 16px;
  box-sizing: border-box;
  outline: none;
}

input:focus { border-color: #3b82f6; background: white; }

.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

button {
  padding: 16px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  border: none;
}

.modal-actions button {
  flex: 1;
}

.btn-cancel { background: #e5e7eb; color: #4b5563; }
.btn-save { background: #3b82f6; color: white; }

.otp-issuer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.otp-status {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;
  padding: 6px 10px;
}

.otp-status-pending {
  color: #92400e;
  background: rgba(251, 191, 36, 0.18);
}

.btn-save:disabled {
  opacity: 0.7;
  cursor: wait;
}

.otp-detail-modal {
  z-index: 20;
}

.otp-detail-sheet {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sheet-handle {
  width: 44px;
  height: 5px;
  margin: 0 auto;
  border-radius: 999px;
  background: rgba(107, 114, 128, 0.35);
}

.otp-detail-caption {
  margin: 0;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.5;
}

.otp-detail-code-box,
.otp-secret-box {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 18px;
  padding: 18px;
}

.otp-detail-code-box {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: 4px;
  color: #111827;
  text-align: center;
}

.otp-secret-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  color: #4b5563;
  font-size: 14px;
  font-weight: 700;
}

.text-button {
  flex: 0;
  padding: 0;
  background: transparent;
  color: #2563eb;
  font-size: 14px;
}

.otp-secret-value {
  word-break: break-all;
  color: #111827;
  font-size: 15px;
  line-height: 1.6;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.otp-detail-actions {
  margin-top: 0;
}

.btn-secondary {
  background: #dbeafe;
  color: #1d4ed8;
}

.btn-delete {
  width: 100%;
  background: #ef4444;
  color: white;
}

.btn-delete:disabled {
  opacity: 0.7;
  cursor: wait;
}
