﻿/* 【変更内容】2025-12-07 ユーザー依頼
   ・グラスモーフィズム × アニメーション背景デザインへ全面リニューアル
   ・2カラム構成（左ブランド / 右フォーム）→ 中央1カードレイアウトへ変更
   ・背景に動くグラデーションアニメーション追加
   ・ガラス質感のカード（backdrop-filter使用）
   ・ロゴをカード内上部に配置（透過PNG前提）
   ・ボタンホバー時の浮遊アニメーション追加
*/

/* ========================================
   カラートークン（微調整用）
   ======================================== */
:root {
    --gm-bg-color-1: #d5eaf3; /* （背景色はそのまま） */
    --gm-bg-color-2: #e8f6fa;
    --gm-bg-color-3: #e0f4ff;
    --gm-bg-color-4: #ecfbf4;
    --gm-card-bg: rgba(255, 255, 255, 0.15);
    --gm-card-border: rgba(255, 255, 255, 0.25);
    --gm-card-shadow: 0 24px 48px rgba(31, 38, 135, 0.37);
    --gm-input-bg: rgba(255, 255, 255, 0.25);
    --gm-input-border: rgba(255, 255, 255, 0.4);
    --gm-input-focus: rgba(255, 255, 255, 0.6);
    --gm-button-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gm-button-shadow: 0 15px 35px rgba(102, 126, 234, 0.6);
    /* 【ここから変更】テキストカラー */
    --gm-text-white: #2d3748; /* 濃いグレー */
    --gm-text-light: #4a5568; /* 少し薄めのグレー */
    --gm-text-error: #e53e3e; /* 濃い赤 */
    /* 【追加】入力欄用の色 */
    --gm-input-text: #1a202c; /* 入力テキスト（最も濃い） */
    --gm-input-placeholder: #a0aec0; /* プレースホルダー */
    --gm-input-icon-color: #718096; /* アイコン */

    --gm-radius-card: 24px;
    --gm-radius-input: 12px;
    --gm-radius-button: 999px;
    --gm-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   画面全体のベース設定
   ======================================== */
body {
    min-height: 100vh;
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--gm-text-white);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden; /* アニメーション背景がはみ出さないように */
    /* 動くグラデーション背景 */
    background: linear-gradient(-45deg, var(--gm-bg-color-1), var(--gm-bg-color-2), var(--gm-bg-color-3), var(--gm-bg-color-4) );
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

/* 背景グラデーションのアニメーション */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* ========================================
   メインカードコンテナ
   ======================================== */
.gm-login-container {
    width: 100%;
    max-width: 480px;
    padding: 1.5rem;
    animation: fadeInUp 0.8s ease-out;
}

/* カード登場アニメーション */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ガラスカード本体 */
.gm-glass-card {
    background: var(--gm-card-bg);
    border: 1px solid var(--gm-card-border);
    border-radius: var(--gm-radius-card);
    padding: 2.5rem 2rem;
    /* ガラス質感（ぼかし効果） */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--gm-card-shadow);
    /* ホバー時に少し浮く */
    transition: var(--gm-transition);
}

    .gm-glass-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 28px 56px rgba(31, 38, 135, 0.45);
    }

/* ========================================
   カードヘッダー（ロゴ + タイトル）
   ======================================== */
.gm-card-header {
    text-align: center;
    margin-bottom: 2rem;
}

/* ロゴ画像表示部分 */
.gm-logo {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
}

    .gm-logo img {
        width: 160px;
        height: auto;
        object-fit: contain;
        /* 【変更】中間グレー（#718096相当） */
        filter: brightness(0) saturate(100%) invert(51%) sepia(8%) saturate(526%) hue-rotate(179deg) brightness(95%) contrast(87%) drop-shadow(0 8px 16px rgba(0, 0, 0, 0.12));
        animation: float 3s ease-in-out infinite;
    }

/* ロゴの浮遊アニメーション */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* システム名 */
.gm-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: var(--gm-text-white);
    letter-spacing: 0.05em;
}

/* サブタイトル */
.gm-subtitle {
    font-size: 0.95rem;
    color: var(--gm-text-light);
    margin: 0;
}

/* ========================================
   フォーム部分
   ======================================== */
.gm-card-body {
    margin-top: 1rem;
}

    /* ラベル */
    .gm-card-body .form-label {
        font-size: 0.9rem;
        font-weight: 500;
        margin-bottom: 0.4rem;
        color: var(--gm-text-white);
        display: block;
    }

/* 入力行（アイコン + テキスト） */
.gm-input-group {
    display: flex;
    align-items: center;
    background: var(--gm-input-bg);
    border: 1px solid var(--gm-input-border);
    border-radius: var(--gm-radius-input);
    padding: 0;
    transition: var(--gm-transition);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

    .gm-input-group:focus-within {
        background: var(--gm-input-focus);
        border-color: var(--gm-text-white);
        box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
    }

/* アイコン部分 */
.gm-input-icon {
    padding: 0 1rem;
    display: flex;
    align-items: center;
    color: var(--gm-text-light);
    font-size: 1.1rem;
}

/* 入力欄本体 */
.gm-input-control {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    padding: 0.85rem 1rem;
    font-size: 0.95rem;
    color: var(--gm-text-white);
}

    .gm-input-control::placeholder {
        color: rgba(255, 255, 255, 0.6);
    }

    /* オートコンプリート無効化（ブラウザ既定スタイル上書き） */
    .gm-input-control:-webkit-autofill {
        -webkit-text-fill-color: var(--gm-text-white);
        -webkit-box-shadow: 0 0 0 1000px rgba(255, 255, 255, 0.1) inset;
        transition: background-color 5000s ease-in-out 0s;
    }

/* エラーメッセージ */
.error-message {
    background: rgba(255, 107, 107, 0.2);
    border: 1px solid rgba(255, 107, 107, 0.4);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    color: var(--gm-text-error);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.text-danger {
    color: var(--gm-text-error);
    font-size: 0.85rem;
    margin-top: 0.3rem;
    display: block;
}

/* ========================================
   ログインボタン
   ======================================== */
.gm-login-button {
    width: 100%;
    border: none;
    border-radius: var(--gm-radius-button);
    padding: 0.9rem 1.5rem;
    background: var(--gm-button-bg);
    color: var(--gm-text-white);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: var(--gm-button-shadow);
    transition: var(--gm-transition);
}

    /* ホバー時：浮き上がる */
    .gm-login-button:hover {
        transform: translateY(-2px);
        box-shadow: 0 20px 45px rgba(102, 126, 234, 0.7);
    }

    /* クリック時：少し沈む */
    .gm-login-button:active {
        transform: translateY(0);
        box-shadow: var(--gm-button-shadow);
    }

/* ========================================
   カードフッター
   ======================================== */
.gm-card-footer {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.8rem;
    color: var(--gm-text-light);
    text-align: center;
}

    .gm-card-footer div {
        margin-bottom: 0.3rem;
    }

    .gm-card-footer i {
        margin-right: 0.3rem;
    }

/* ========================================
   レスポンシブ対応（スマホ・タブレット）
   ======================================== */
@media (max-width: 576px) {
    .gm-login-container {
        max-width: 95%;
        padding: 1rem;
    }

    .gm-glass-card {
        padding: 2rem 1.5rem;
        border-radius: 20px;
    }

    .gm-title {
        font-size: 1.6rem;
    }

    .gm-subtitle {
        font-size: 0.85rem;
    }

    .gm-logo img {
        width: 130px;
    }

    .gm-input-control {
        font-size: 0.9rem;
    }

    .gm-login-button {
        font-size: 0.95rem;
        padding: 0.85rem 1.2rem;
    }
}

/* iPad等のタブレット向け */
@media (min-width: 577px) and (max-width: 768px) {
    .gm-login-container {
        max-width: 500px;
    }
}
