/* =========================
   共通
========================= */

*{
  box-sizing:border-box;
}

body{

  margin:0;

  min-height:100vh;

  display:flex;

  justify-content:center;

  background:url("../images/aozora.png");

  background-size:cover;

  background-position:center;

  background-attachment:fixed;

  font-family:
    "Zen Old Mincho",
    serif;
}

/* =========================
   レイアウト
========================= */

.container{

  width:420px;

  min-height:100vh;

    padding-left:20px;
  padding-right:20px;
  padding:0px 20px 0;

  padding-bottom:140px;

  background:
    rgba(0,123,220,.18);

  backdrop-filter:
    blur(2px);
}

/* =========================
   投稿フォーム
========================= */

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

.field-label{

  background:#e7f0f4;

  padding:12px 16px;

  margin-bottom:6px;

  font-size:14px;

  letter-spacing:0.05em;
}

textarea,
input,
select{

  width:100%;

  border:none;

  padding:12px;

  font-size:14px;

  font-family:
    "Zen Old Mincho",
    serif;
}

textarea#quote{
  height:180px;
}

#reason{
  height:220px;
}

/* =========================
   ボタン
========================= */

.main-button{

  width:100%;

  height:56px;

  border:none;

  border-radius:999px;

  background:#2f8fe7;

  color:white;

  font-size:18px;

  font-family:
    "Zen Old Mincho",
    serif;

  cursor:pointer;

  transition:.2s;
}

.main-button:hover{
  transform:translateY(-2px);
}

#submitBtn{
  margin-bottom:100px;
}

/* =========================
   一覧
========================= */

#quoteList{

  display:flex;

  flex-direction:column;

  align-items:flex-start;


  margin:40px auto 120px;

  padding:0 20px;

  
}

.quote-link{

  display:block;

  margin-bottom:56px;

  text-decoration:none;

  color:inherit;
}

.speech-bubble{

    text-align:left;

  white-space:pre-wrap;

  position:relative;

  display:inline-block;

  max-width:320px;

  background:rgba(255,255,255,.92);

  padding:10px 18px;

  border-radius:12px;

  line-height:1.6;

  font-size:16px;

  color:#222;

  box-shadow:
    0 5px 20px rgba(0,0,0,.08);

  transition:.2s;
}

.speech-bubble:hover{
  transform:translateY(-3px);
}

.speech-bubble::after{

  content:"";

  position:absolute;

  left:18px;

  bottom:-18px;

  width:0;
  height:0;

  border-top:22px solid rgba(255,255,255,.92);

  border-right:18px solid transparent;
}

/* =========================
   絞り込みボタン
========================= */

.filter-btn{

  display:block;

  width:100%;

  max-width:340px;

  margin:0 auto 120px;

  height:56px;

  border:none;

  border-radius:999px;

  background:#2f8fe7;

  color:white;

  font-size:24px;

  font-family:
    "Zen Old Mincho",
    serif;

  cursor:pointer;
}

/* =========================
   下部ナビ
========================= */

.bottom-nav{

  position:fixed;

  bottom:0;

  left:0;

  width:100%;

  height:60px;

  display:flex;

  background:#2f8fe7;

  z-index:100;
}

.bottom-nav a{

  flex:1;

  display:flex;

  align-items:center;

  justify-content:center;

  color:white;

  text-decoration:none;

  border-right:
    1px solid rgba(255,255,255,.3);

  font-size:20px;
}

.bottom-nav a:last-child{
  border-right:none;
}

/* =========================
   詳細画面
========================= */

.detail-bubble{

    position:relative;

 

 

  background:rgba(255,255,255,.92);

  border-radius:12px;

  padding:10px 20px;

  line-height:1.5;

  font-size:16px;

  color:#222;

  margin-bottom:32px;

  white-space:pre-wrap;
}

.detail-bubble::after{

  content:"";

  position:absolute;

  left:18px;

  bottom:-18px;

  width:0;
  height:0;

  border-top:22px solid rgba(255,255,255,.92);

  border-right:18px solid transparent;
}

.detail-section{
  margin-bottom:24px;
}

.detail-text{

  background:rgba(255,255,255,.75);

  padding:12px 16px;

  line-height:1.8;

  color:#222;

    white-space:pre-wrap;

  height:auto;
    overflow-y:auto;

}

.detail-reason{
  white-space:pre-wrap;
}

.back-button{

  display:flex;

  align-items:center;

  justify-content:center;

  text-decoration:none;

  margin-top:32px;
   margin-bottom:120px;
}

.random-page{

  min-height:calc(100vh - 76px);

  display:flex;

  flex-direction:column;

  min-height:calc(100vh - 76px);

  display:flex;

  flex-direction:column;

  justify-content:center;

  align-items:center;

  padding:40px 20px 130px;

  text-align:center;
}

.floating-quote{

    text-align:left;

  max-width:320px;


  white-space:pre-wrap;

  word-break:break-word;

  font-size:16px;

  line-height:1.8;

  color:white;

  text-shadow:
    0 0 8px rgba(255,255,255,.8),
    0 0 20px rgba(255,255,255,.5);

  cursor:pointer;

  animation:
    fadeIn 1.5s ease;
}

.floating-quote{

  animation:
    fadeIn 1.5s ease,
    floating 4s ease-in-out infinite;
}

@keyframes floating{

  0%{
    transform:
      translateY(0);
  }

  50%{
    transform:
      translateY(-8px);
  }

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

@keyframes fadeIn{

  from{

    opacity:0;

    transform:
      translateY(20px);
  }

  to{

    opacity:1;

    transform:
      translateY(0);
  }
}

#randomLink{

  text-decoration:none;

  color:inherit;
}

.random-button{

  width:280px;

  margin-top:120px;
}

#randomBtn {
  position: fixed;

  bottom: 80px;
  left: 50%;

  transform: translateX(-50%);

  width: 280px;

  z-index: 9999;
}

.filter-area{

  padding:0px 20px 0;

  display:flex;

  flex-direction:row;

  gap:12px;
}

.filter-area select{

  flex:1;

  height:48px;

  border:none;

  background:rgba(255,255,255,.92);

  font-family:"Zen Old Mincho", serif;

  font-size:16px;

  padding:0 14px;

  border-radius:8px;
}

.complete-page{

  min-height:calc(100vh - 60px);

  display:flex;

  flex-direction:column;

  justify-content:center;

  align-items:center;

  padding:20px;
}

.complete-icon{

  width:80px;

  margin-bottom:24px;

  opacity:0;

  animation:
    airplaneFly 0.8s ease-out forwards;
}

@keyframes airplaneFly{

    0%{

    opacity:0;

    transform:
      translate(-50px, 50px)
      rotate(-10deg)
      scale(0.9);

  }

  70%{

    opacity:1;

    transform:
      translate(5px, -3px)
      rotate(2deg)
      scale(1.03);

  }

  100%{

    opacity:1;

    transform:
      translate(0, 0)
      rotate(0deg)
      scale(1);

  }

}

.complete-message{

  color:white;

  font-size:28px;

  margin-bottom:40px;

  opacity:0;

  animation:
    fadeUp .8s ease forwards;

  animation-delay:0.5s;
}

@keyframes fadeUp{

  from{

    opacity:0;

    transform:translateY(15px);

  }

  to{

    opacity:1;

    transform:translateY(0);

  }

}

.complete-button{

  display:flex;

  align-items:center;

  justify-content:center;

  text-decoration:none;

  max-width:320px;
}

.random-button.loading{

  background:white;

  color:#2f8fe7;

  pointer-events:none;

  opacity:.9;
}

@keyframes quoteAppear{

  from{

    opacity:0;

    transform:translateY(10px);

  }

  to{

    opacity:1;

    transform:translateY(0);

  }

}

.site-header{

  display:flex;

  justify-content:center;

  padding:16px 20px;
}

.site-logo{

  width:90%;

  max-width:460px;

  height:auto;

  display:block;

  filter:
    drop-shadow(
      0 4px 12px rgba(0,0,0,.25)
    );
}

.quote-count{

  text-align:right;

  color:white;

  font-size:18px;

  padding:8px 20px 0;
}