/* ============================================================
   LOGIN — ログイン画面
   ・ティール→グリーンのグラデ背景に、白い半透明のフォームを重ねる
   ・背景では四角い泡がゆっくり上昇する（CSS アニメーションのみ）
   ・ロゴの1文字ずつ巻き上げと各要素のフェードインは GSAP（assets/js/login.js）
============================================================ */

.login-page {
    margin: 0;
    min-height: 100vh;
    background-color: #000000;
    color: #ffffff;
    font-family: "Source Sans Pro", "Noto Sans JP", sans-serif;
    font-weight: 300;
}
.login-page * { box-sizing: border-box; }

/* ---- 背景 ---- */
.login {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(to bottom right, #50a3a2 0%, #53e3a6 100%);
}

.login__inner {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 40px 20px;
    text-align: center;
}

/* ---- ロゴ ---- */
.login__logo {
    margin: 0 0 20px;
    font-size: 40px;
    font-weight: 200;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    /* 送信成功時に下へ逃がす演出（.login.is-success で効く） */
    transition: transform 1s ease-in-out;
}
.login.is-success .login__logo { transform: translateY(85px); }

/* GSAP が1文字ずつ差し込む要素。白い板が右へ引いて文字が現れる */
.login__logo .word {
    display: inline-block;
    position: relative;
    overflow: hidden;
    line-height: 1.4;
    vertical-align: bottom;
}
.login__logo .word .rect {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    background-color: #ffffff;
}
.login__logo .word .label { display: inline-block; position: relative; z-index: 1; }

.login__subtitle { margin: 0 0 32px; font-size: 16px; color: #ffffff; }

/* ---- フォーム ---- */
.login__form {
    position: relative;
    z-index: 2;
    padding: 24px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: opacity 500ms ease;
}

.login__field {
    appearance: none;
    display: block;
    width: 250px;
    margin: 0 auto 10px;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 3px;
    background-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-family: inherit;
    font-size: 18px;
    font-weight: 300;
    text-align: center;
    outline: 0;
    transition-duration: 0.25s;
}
.login__field:hover { background-color: rgba(255, 255, 255, 0.4); }
.login__field:focus {
    width: 300px;
    background-color: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.1);
}
.login__field::placeholder { color: #ffffff; opacity: 1; font-weight: 300; }
.login__field--last { margin-bottom: 24px; }

.login__actions { width: 100%; margin: 8px 0 0; display: flex; flex-direction: column; align-items: center; }

.login__remember {
    margin: 0 0 24px;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    transition: opacity 0.2s;
}
.login__remember:hover { opacity: 0.85; }
.login__remember input[type="checkbox"] {
    width: 16px;
    height: 16px;
    border: none;
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.2);
    accent-color: #53e3a6;
    cursor: pointer;
}
.login__remember-label { margin: 0 0 0 8px; font-size: 14px; color: #ffffff; }

.login__submit {
    appearance: none;
    width: 250px;
    padding: 12px 24px;
    border: 0;
    border-radius: 4px;
    background-color: #ffffff;
    color: #53e3a6;
    font-family: inherit;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    outline: 0;
    transition-duration: 0.25s;
}
.login__submit:hover:not(:disabled) { background-color: rgb(245, 247, 249); }
.login__submit:disabled { opacity: 0.7; cursor: default; }

/* ---- 背景の浮遊バブル ---- */
.login__bubbles {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}
.login__bubbles li {
    position: absolute;
    display: block;
    bottom: -160px;
    width: 40px;
    height: 40px;
    list-style: none;
    background-color: rgba(255, 255, 255, 0.15);
    animation: loginBubble 25s infinite;
    transition-timing-function: linear;
}
.login__bubbles li:nth-child(1)  { left: 10%; animation-delay: 0s; }
.login__bubbles li:nth-child(2)  { left: 20%; width: 80px;  height: 80px;  animation-delay: 0.1s; animation-duration: 17s; }
.login__bubbles li:nth-child(3)  { left: 25%; animation-delay: 0.2s; }
.login__bubbles li:nth-child(4)  { left: 40%; width: 60px;  height: 60px;  animation-delay: 0s;   animation-duration: 22s; background-color: rgba(255, 255, 255, 0.25); }
.login__bubbles li:nth-child(5)  { left: 70%; animation-delay: 0.3s; }
.login__bubbles li:nth-child(6)  { left: 80%; width: 120px; height: 120px; animation-delay: 0.1s; background-color: rgba(255, 255, 255, 0.2); }
.login__bubbles li:nth-child(7)  { left: 32%; width: 160px; height: 160px; animation-delay: 0.4s; }
.login__bubbles li:nth-child(8)  { left: 55%; width: 20px;  height: 20px;  animation-delay: 0.6s; animation-duration: 40s; }
.login__bubbles li:nth-child(9)  { left: 25%; width: 10px;  height: 10px;  animation-delay: 0.2s; animation-duration: 40s; background-color: rgba(255, 255, 255, 0.3); }
.login__bubbles li:nth-child(10) { left: 90%; width: 160px; height: 160px; animation-delay: 0.5s; }

@keyframes loginBubble {
    0%   { transform: translateY(0); opacity: 0; }
    5%   { opacity: 1; }
    90%  { opacity: 1; }
    100% { transform: translateY(-1000px) rotate(600deg); opacity: 0; }
}

/* ---- 結果のトースト ---- */
.login__toasts {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    width: min(92vw, 480px);
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}
.login-toast {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 12px 24px;
    border: 1px solid transparent;
    border-radius: 9999px;
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.18);
    backdrop-filter: blur(12px);
    font-size: 14px;
    line-height: 1.6;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 280ms ease, transform 280ms ease;
}
.login-toast.is-visible { opacity: 1; transform: translateY(0); }
.login-toast--error   { background: rgba(127, 29, 29, 0.92); border-color: rgba(254, 202, 202, 0.32); color: #fef2f2; }
.login-toast--success { background: rgba(6, 95, 70, 0.92);   border-color: rgba(167, 243, 208, 0.34); color: #ecfdf5; }

@media (min-width: 768px) {
    .login__logo { font-size: 64px; font-weight: 700; margin: 0 0 32px; }
    .login__subtitle { font-size: 24px; margin: 0 0 40px; }
    .login__form { padding: 40px 0; }
}
@media (max-width: 767px) {
    .login__logo { font-size: 40px; font-weight: 700; margin: 0 0 24px; }
    .login__subtitle { font-size: 18px; }
}
