/* applippli-key Hero Animation CSS */

/* ── キーフレーム ── */
@keyframes apk-float-1 {
  0%, 100% { transform: translateY(0px) rotate(-1deg); }
  50%       { transform: translateY(-8px) rotate(1deg); }
}
@keyframes apk-float-2 {
  0%, 100% { transform: translateY(0px) rotate(1deg); }
  50%       { transform: translateY(-10px) rotate(-1deg); }
}
@keyframes apk-blink-cursor {
  0%, 100% { border-color: #3B82F6; }
  50%       { border-color: transparent; }
}
@keyframes apk-success-pop {
  0%   { transform: scale(0.5); opacity: 0; }
  60%  { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes apk-phone-glow {
  0%, 100% { box-shadow: 0 20px 50px -10px rgba(0,0,0,.15), 0 0 0 0 rgba(59,130,246,0); }
  50%       { box-shadow: 0 20px 50px -10px rgba(0,0,0,.15), 0 0 25px 5px rgba(59,130,246,.18); }
}
@keyframes apk-otp-timer {
  from { width: 100%; }
  to   { width: 0%; }
}

.apk-float-1      { animation: apk-float-1   4s ease-in-out infinite; }
.apk-float-2      { animation: apk-float-2   5s ease-in-out infinite; }
.apk-blink-cursor { animation: apk-blink-cursor 1s step-end infinite; }
.apk-otp-timer    { animation: apk-otp-timer 30s linear infinite; }
.apk-phone-glow   { animation: apk-phone-glow 1.5s ease-in-out infinite; }
.apk-success-pop  { animation: apk-success-pop .4s cubic-bezier(.16,1,.3,1) forwards; }

/* ── 全体ラッパー（横並びレイアウト） ── */
.apk-monitor-wrap {
  display: flex;
  align-items: center;
  max-width: 100%;
  margin: 0 auto;
  font-family: 'Inter', sans-serif;
}

/* ── アニメーション右ブロック ── */
.apk-anim-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  /* 横方向のみクリップ（スマホ退場アニメ用）、バッジは縦にはみ出せる */
  clip-path: inset(-9999px 0 -9999px 0);
}

/* ── 左テキストエリア ── */
.apk-side-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-self: flex-start;
  padding-right: 2rem;
}
.apk-side-text p {
  font-size: 15px;
  line-height: 1.8;
  color: #44403C;
  margin: 0;
}

/* ── モニター＋スタンドエリア ── */
.apk-monitor-area {
  flex: 1;
  min-width: 0;
}

/* ── モニターフレーム ── */
.apk-monitor-frame {
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 1rem 1rem 0 0;  /* 下角フラット → スタンドと密着 */
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(0,0,0,.03), 0 0 40px -8px rgba(59,130,246,.1);
}

/* ブラウザバー */
.apk-browser-bar {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem 1rem;
  border-bottom: 1px solid #F1F5F9;
  background: rgba(248,250,252,.5);
}
.apk-browser-dots { display: flex; gap: 6px; }
.apk-dot { width: 10px; height: 10px; border-radius: 50%; }
.apk-dot--red    { background: #F87171; }
.apk-dot--yellow { background: #FBBF24; }
.apk-dot--green  { background: #4ADE80; }
.apk-url-bar {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  padding: .25rem .75rem;
  font-size: 10px;
  color: #94A3B8;
}

/* ── スクリーン（4:3固定） ── */
.apk-screen-area {
  position: relative;
  aspect-ratio: 4 / 3;
}
.apk-screen-layer {
  position: absolute;
  inset: 0;
  transition: opacity .4s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

/* ── ログイン ── */
.apk-login-logo  { display: flex; align-items: center; gap: 10px; margin-bottom: .5rem; }
.apk-logo-icon   { width: 36px; height: 36px; background: #1C1917; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.apk-logo-name   { font-weight: 600; font-size: 14px; color: #1C1917; letter-spacing: -.02em; }
.apk-login-title { font-size: 16px; font-weight: 600; color: #0F172A; margin: 0 0 4px; }
.apk-login-sub   { font-size: 11px; color: #94A3B8; margin: 0 0 1.25rem; }
.apk-otp-label   { font-size: 11px; font-weight: 500; color: #64748B; margin-bottom: 10px; display: block; }

/* OTPボックス */
.apk-otp-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
  margin-bottom: 1rem;
  width: 100%;
}
.apk-otp-box {
  flex: 1;
  max-width: 44px;
  height: 50px;
  border: 2px solid #E2E8F0;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 600; color: #0F172A;
  background: #F8FAFC;
  transition: all .25s ease;
}
.apk-otp-filled { border-color: #3B82F6; background: #EFF6FF; color: #1D4ED8; }
.apk-otp-active { border-color: #3B82F6; box-shadow: 0 0 0 3px rgba(59,130,246,.15); background: #fff; }

/* 成功オーバーレイ */
.apk-otp-success {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: #fff; border-radius: 12px;
  opacity: 0; pointer-events: none; z-index: 10;
  transition: opacity .35s ease;
}
.apk-success-inner { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.apk-success-icon  { width: 52px; height: 52px; border-radius: 50%; background: #F0FDF4; display: flex; align-items: center; justify-content: center; }
.apk-success-text  { font-size: 14px; font-weight: 600; color: #15803D; }

.apk-otp-meta {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: .875rem; font-size: 10px; color: #94A3B8;
}
.apk-login-btn {
  width: 100%;
  border-radius: 12px; padding: 10px 0;
  font-size: 13px; font-weight: 600; text-align: center;
  background: linear-gradient(to right, #3B82F6, #6366F1);
  color: #fff;
  box-shadow: 0 4px 15px rgba(59,130,246,.2);
  transition: all .3s ease;
  opacity: .4; cursor: not-allowed;
}

/* ── Windowsデスクトップ ── */
.apk-win-desktop     { width: 100%; height: 100%; display: flex; flex-direction: column; background: linear-gradient(135deg,#F8FAFC 0%,#EFF6FF 40%,#F5F3FF 70%,#F0F9FF 100%); }
.apk-win-icons-area  { flex: 1; padding: .75rem; display: flex; flex-wrap: wrap; gap: 4px; align-content: flex-start; }
.apk-win-icon-item   { width: 52px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 4px; border-radius: 6px; cursor: default; }
.apk-win-icon        { width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center; }
.apk-win-icon-label  { font-size: 7px; color: #64748B; line-height: 1.2; text-align: center; }
.apk-win-taskbar {
  display: flex; align-items: center; height: 40px; padding: 0 .5rem; gap: 4px;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid #E2E8F0; flex-shrink: 0;
}
.apk-taskbar-search {
  background: #F1F5F9; border: 1px solid #E2E8F0; border-radius: 6px;
  padding: .25rem .75rem; display: flex; align-items: center; gap: 8px;
}

/* ── スタンド（モニターと密着） ── */
.apk-stand-neck {
  display: block;
  width: 96px; height: 22px;
  margin: 0 auto;
  border-radius: 0 0 8px 8px;
  background: linear-gradient(180deg, #E2E8F0, #D1D5DB);
}
.apk-stand-base {
  display: block;
  width: 144px; height: 8px;
  margin: 0 auto;
  border-radius: 0 0 12px 12px;
  background: #CBD5E1;
  box-shadow: 0 4px 6px rgba(0,0,0,.07);
}

/* ── 電話カラム ── */
.apk-phone-col {
  flex-shrink: 0;
  width: 96px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

/* ── スマートフォン ── */
.apk-smartphone {
  width: 88px; height: 170px;
  border-radius: 18px; border: 2px solid #D1D5DB;
  background: #fff; overflow: hidden; z-index: 30;
  opacity: 0;
  transform: translateX(160px);
  transition: transform .9s cubic-bezier(.16,1,.3,1), opacity .5s ease;
  box-shadow: 0 20px 50px -10px rgba(0,0,0,.12);
}
.apk-smartphone.apk-arrived { transform: translateX(0); opacity: 1; }
.apk-smartphone.apk-exited  { transform: translateX(160px); opacity: 0; }
.apk-phone-notch { width: 28px; height: 4px; background: #D1D5DB; border-radius: 3px; margin: 4px auto 0; }
.apk-phone-body  { padding: 0 7px; height: calc(100% - 8px); display: flex; flex-direction: column; }
.apk-phone-digit { display: inline-block; font-size: 13px; font-weight: 600; color: #1E293B; letter-spacing: 1px; font-variant-numeric: tabular-nums; }
.apk-phone-digit.apk-lit { color: #3B82F6; }

/* ── バッジ ── */
.apk-badge-tr,
.apk-badge-br { align-self: flex-end; }

.apk-award-badge {
  background: #fff; border: 1px solid #E2E8F0;
  box-shadow: 0 10px 30px -8px rgba(0,0,0,.08);
  border-radius: 12px; padding: 12px 14px;
}
.apk-rating-badge {
  display: flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid #E2E8F0;
  box-shadow: 0 10px 30px -8px rgba(0,0,0,.08);
  border-radius: 12px; padding: 10px 12px;
}

/* ── スマホ表示：縦並び ── */
@media (max-width: 600px) {
  .apk-monitor-wrap {
    flex-direction: column;
    align-items: stretch;
    overflow: hidden;
  }
  .apk-side-text {
    align-self: auto;
    padding-right: 0;
    padding-bottom: 1rem;
  }
  .apk-anim-right {
    flex-direction: column;
    clip-path: none;
    overflow: hidden;
  }
  .apk-monitor-area {
    width: 100%;
  }
  .apk-phone-col {
    flex-direction: row;
    width: 100%;
    justify-content: center;
  }
  .apk-badge-tr,
  .apk-badge-br {
    align-self: center;
  }
}
