@charset "utf-8";

/* Cascading Style Sheets, css_name: index.css */
/* Copyright (C)  Kazuhide Senda. All Rights Reserved. */

body {
    margin: 0;
    font-family: sans-serif;
    background-color: #778899;
    scrollbar-gutter: stable;
}
a,a:hover,a:visited {
    color: inherit;
}
.container {
    max-width: 750px;
    margin:50px auto;
    background: #f5f5f5;
    padding: 20px;
    border-radius: 8px;
    color: blue;
    border: 4px solid deepskyblue;
}
input[type=text]:focus {
    outline: none;                  /* デフォルト青枠を消す */
    border: 3px solid darkorange;   /* 枠色を維持 */
    box-shadow: 0 0 8px darkorange; /* 発光エフェクト */
}
input[type=text] {
    width: 98%;
    display: block;
    margin: 0 auto;
    /* サイズ調整 */
    height: 50px;          /* 縦を大きく */
    font-size: 26px;       /* 文字を大きく */
    font-weight: bold;     /* 視認性UP */
    padding: 0 5px;        /* 横余白 */
    border-radius: 12px;   /* 少し丸く */
    border: 3px solid darkorange;
    box-sizing: border-box;
    transition: all 0.25s ease;
}
button {
    padding: 10px 20px;
    font-size: 16px;
    margin-top: 10px;
    border-radius: 8px;
    border: 3px solid deepskyblue;
}
#loading {
    display: none;
    text-align: center;
    margin-top: 20px;
}
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #ccc;
    border-top: 4px solid darkorange;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}
.decoButton {
    background-color: gray;
    color: #f0f8ff;
    font-size: 1em;
    border: 2px solid #f5f5f5;
    border-radius: 20px;
    padding: 0.25em 0.75em;
    cursor: pointer;
}
.decoButton:hover {
  background: #187bcd;
}

/* Mobile Font Size Adjust */
@media screen and (max-width: 600px) { /* 600 or 768 */
    input[type=text] {
        font-size: 20px;               /* 18 or 22px */
        height: 45px;
    }
}

/* デフォルト：非表示（PC・タブレット） */
.qr-only-mobile {
    /* display: none; */
    opacity: 0.8;
}
@keyframes spin{
    0% {transform:rotate(0deg);}
    100% {transform: rotate(360deg);}
}
@media screen and (max-width: 1024px) {
    .qr-only-mobile {
        display: inline-block;
    }
}

/* QRモーダル */
.qr-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.75);
}
.qr-modal-content {
    background: #fff;
    margin: 10% auto;
    padding: 20px;
    width: 90%;
    max-width: 360px;
    border-radius: 12px;
    text-align: center;
}
#qr-reader {
  position: relative;
}
.scan-success {
    display: none;
    background: limegreen;
    color: white;
    font-weight: bold;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 10px;
    animation: flash 0.6s ease;
}
@keyframes flash {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1); }
}
.qr-error {
  animation: qrErrorFlash 0.15s linear 2;
}

@keyframes qrErrorFlash {
  0%   { box-shadow: 0 0 0 0 rgba(255,0,0,0); }
  50%  { box-shadow: 0 0 0 6px rgba(255,0,0,0.9); }
  100% { box-shadow: 0 0 0 0 rgba(255,0,0,0); }
}

/* SHARE LINK */
/* 共通 */
.share-area {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 40px;
}

.share-item {
  text-align: center;
}

/* PC用QR */
.share-item.qr img {
  width: 100px;
  height: auto;
}

/* スマホ */
@media screen and (max-width: 600px) {
/* 全体は縦並び */
.share-area {
  flex-direction: column;
  align-items: center;   /* QRは中央 */
  gap: 20px;
}
/* QRを大きく中央 */
.share-item.qr img {
  width: 60vw;
  max-width: 200px;
  height: auto;
}
/* SNS3つを左揃え */
.share-item:not(.qr) {
  width: 80%;            /* 幅を持たせる */
  text-align: left;      /* 左揃え */
  }
}
.share-item:not(.qr) {
  transition: transform 0.2s ease;
}
.share-item:not(.qr):hover {
  transform: translateY(-2px);
}
.share-item a {
  position: relative;
  text-decoration: none;
  color: #333;
}
.share-item a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 0%;
  height: 1px;
  background: #666;
  transition: width 0.3s ease;
}
.share-item a:hover::after {
  width: 100%;
}

/* ===============================
   Opening (Ninja)
================================ */
/* 初期状態 */
body.loading .container {
    opacity: 0;
    transform: translateY(20px);
}

/* 開始後 */
body.loaded .container {
    opacity: 1;
    transform: translateY(0);
    transition: all 1.2s ease;
}

/* ninja 初期 */
#mainNinja {
    opacity: 0;
    transform: scale(0.7);
}

/* ninja 遅延表示 */
#mainNinja.show {
    animation: ninjaLanding 0.9s cubic-bezier(.2,.8,.25,1) forwards;
    opacity: 1;
    transform: translateY(0) scale(1.2); /* 最終状態固定 */
    filter: drop-shadow(0 0 18px rgba(255,255,255,0.35));
}

/* ===============================
   Ninja Landing Bounce
================================ */
@keyframes ninjaLanding {

  0% {
    opacity: 0;
    transform: translateY(-120px) scale(0.6);
  }

  55% {
    opacity: 1;
    transform: translateY(0) scale(1.25); /* 着地 */
  }

  70% {
    transform: translateY(-14px) scale(1.15); /* バウンド上 */
  }

  85% {
    transform: translateY(0) scale(1.2); /* 再着地 */
  }

  100% {
    transform: translateY(0) scale(1.2);
  }
}
