/* ============================================
   css/ui/mypage.css - マイページ & ログイン画面
   ============================================ */

/* --- 共通レイアウト --- */
.mypage-wrapper,
.login-wrapper {
    position: fixed;
    top: 90px;
    left: 0;
    right: 0;
    bottom: 0;
    background: #e0f7fa;
    z-index: 3000;
    display: none;
    flex-direction: column;
    overflow-y: auto;
}

.mypage-wrapper.active,
.login-wrapper.active {
    display: flex;
}

/* --- ヘッダー --- */
.mypage-header,
.login-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 20px 10px;
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid rgba(0, 188, 212, 0.2);
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(10px);
}

.mypage-back-btn,
.login-back-btn {
    background: none;
    border: 2px solid #00bcd4;
    color: #00bcd4;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.mypage-back-btn:hover,
.login-back-btn:hover {
    background: rgba(0, 188, 212, 0.1);
    transform: scale(1.05);
}

.mypage-title,
.login-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    font-weight: 900;
    color: #00838f;
    letter-spacing: 0.05em;
}

/* ============================================
   タブナビゲーション
   ============================================ */
.mypage-tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.7);
    border-bottom: 1px solid rgba(0, 188, 212, 0.2);
    position: sticky;
    top: 54px;
    /* ヘッダーの高さ(8+32+8)分 */
    z-index: 9;
}

.mypage-tab-btn {
    flex: 1;
    padding: 14px 8px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    color: #90a4ae;
    cursor: pointer;
    transition: all 0.25s;
    text-align: center;
    letter-spacing: 0.02em;
}

.mypage-tab-btn:hover {
    color: #00838f;
    background: rgba(0, 188, 212, 0.05);
}

.mypage-tab-btn.active {
    color: #00838f;
    border-bottom-color: #00bcd4;
    background: rgba(0, 188, 212, 0.08);
}

/* ============================================
   タブコンテンツ
   ============================================ */
.mypage-content {
    flex: 1;
    padding: 20px;
}

.mypage-tab-content {
    display: none;
    animation: mypageFadeIn 0.3s ease;
}

.mypage-tab-content.active {
    display: block;
}

@keyframes mypageFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- プレースホルダーカード --- */
.mypage-placeholder-card {
    background: rgba(255, 255, 255, 0.9);
    border: 1px dashed rgba(0, 188, 212, 0.4);
    border-radius: 12px;
    padding: 40px 25px;
    text-align: center;
    margin-bottom: 20px;
}

.mypage-placeholder-card .placeholder-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.6;
}

.mypage-placeholder-card .placeholder-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    color: #00838f;
    margin-bottom: 10px;
    font-weight: 700;
}

.mypage-placeholder-card .placeholder-desc {
    font-size: 0.9rem;
    color: #78909c;
    line-height: 1.6;
}

/* ============================================
   ログイン画面
   ============================================ */
.login-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
    gap: 25px;
}

.login-form-card {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 188, 212, 0.3);
    border-radius: 16px;
    padding: 35px 30px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.login-form-card h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    color: #00838f;
    text-align: center;
    margin-bottom: 25px;
    letter-spacing: 0.05em;
}

.login-field {
    margin-bottom: 18px;
}

.login-field label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: #546e7a;
    margin-bottom: 6px;
}

.login-field input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid rgba(0, 188, 212, 0.3);
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Noto Sans JP', sans-serif;
    color: #37474f;
    background: #fafafa;
    transition: border-color 0.2s;
    outline: none;
}

.login-field input:focus {
    border-color: #00bcd4;
    background: #fff;
}

.login-submit-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #00bcd4, #0097a7);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 5px;
    font-family: 'Noto Sans JP', sans-serif;
}

.login-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 188, 212, 0.4);
}

.login-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
}

.login-links a {
    font-size: 0.85rem;
    color: #00838f;
    text-decoration: none;
    transition: color 0.2s;
}

.login-links a:hover {
    color: #00bcd4;
    text-decoration: underline;
}

/* --- 機能案内ボタン --- */
.login-info-btn {
    background: none;
    border: 2px solid #00bcd4;
    color: #00bcd4;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Noto Sans JP', sans-serif;
}

.login-info-btn:hover {
    background: rgba(0, 188, 212, 0.1);
}

/* --- 機能案内モーダル --- */
.account-info-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 4000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.account-info-modal-overlay.active {
    display: flex;
}

.account-info-modal {
    background: white;
    border-radius: 16px;
    padding: 30px 25px;
    max-width: 450px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
    animation: mypageFadeIn 0.3s ease;
}

.account-info-modal h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    color: #00838f;
    margin-bottom: 20px;
    text-align: center;
}

.account-feature-list {
    list-style: none;
    padding: 0;
    margin: 0 0 25px;
}

.account-feature-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(0, 188, 212, 0.1);
    font-size: 0.9rem;
    color: #455a64;
    line-height: 1.6;
}

.account-feature-list li:last-child {
    border-bottom: none;
}

.account-feature-list .feature-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.account-info-close-btn {
    width: 100%;
    padding: 12px;
    background: #00bcd4;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Noto Sans JP', sans-serif;
}

.account-info-close-btn:hover {
    background: #0097a7;
}

/* --- ポータル画面のマイページボタン --- */
.portal-mypage-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #00bcd4;
    color: #00838f;
    padding: 10px 24px;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Noto Sans JP', sans-serif;
    text-decoration: none;
}

.portal-mypage-btn:hover {
    background: #00bcd4;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 188, 212, 0.3);
}

/* ============================================
   レスポンシブ対応
   ============================================ */
@media (max-width: 500px) {
    .mypage-tab-btn {
        font-size: 0.75rem;
        padding: 12px 5px;
    }

    .login-form-card {
        padding: 25px 20px;
    }

    .mypage-placeholder-card {
        padding: 30px 15px;
    }
}

/* ============================================
   ⚙️ 設定メニューオーバーレイ (PC版)
   ============================================ */
.settings-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 5000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.settings-menu-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.settings-menu-sheet {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 400px;
    transform: scale(0.9);
    transition: transform 0.25s cubic-bezier(0.1, 0.76, 0.55, 0.94);
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-sizing: border-box;
}

.settings-menu-overlay.active .settings-menu-sheet {
    transform: scale(1);
}

.settings-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1.5px solid rgba(0, 188, 212, 0.2);
    padding-bottom: 8px;
}

.settings-menu-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #00838f;
    display: flex;
    align-items: center;
    gap: 6px;
}

.settings-menu-close {
    border: none;
    background: transparent;
    font-size: 1.5rem;
    color: #90a4ae;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.settings-menu-close:hover {
    color: #00bcd4;
}

.settings-account-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f5f7f8;
    border: 1px solid #eceff1;
    border-radius: 12px;
    padding: 12px;
}

.settings-avatar {
    font-size: 1.8rem;
    background: #fff;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid rgba(0, 188, 212, 0.2);
}

.settings-account-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: left;
}

.settings-account-role {
    font-size: 0.65rem;
    font-weight: bold;
    color: #90a4ae;
    text-transform: uppercase;
}

.settings-user-email {
    font-size: 0.85rem;
    font-weight: 700;
    color: #37474f;
    word-break: break-all;
}

.settings-menu-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.settings-menu-item {
    width: 100%;
    border: none;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 0.85rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Noto Sans JP', sans-serif;
    box-sizing: border-box;
}

.settings-menu-item:hover {
    transform: translateY(-1px);
}

.logout-btn-item {
    background: #ffebee;
    color: #ff1744;
    border: 1px solid rgba(255, 23, 68, 0.15);
}

.logout-btn-item:hover {
    background: #ffcdd2;
}

.delete-account-btn-item {
    background: #fafafa;
    color: #d32f2f;
    border: 1px solid rgba(211, 47, 47, 0.2);
    margin-top: 10px;
}

.delete-account-btn-item:hover {
    background: #ffebee;
    border-color: rgba(211, 47, 47, 0.4);
}

/* 利用規約・プライバシーポリシーモーダル内コンテンツの最適化 (Desktop) */
#terms-privacy-modal-body h1 {
    font-size: 1.5rem !important;
    color: #00838f !important;
    margin-top: 10px !important;
    margin-bottom: 10px !important;
    text-align: center !important;
}
#terms-privacy-modal-body .legal-subtitle {
    text-align: center !important;
    margin-bottom: 25px !important;
}
#terms-privacy-modal-body .legal-effective {
    font-size: 0.75rem !important;
    padding: 8px 12px !important;
    margin-bottom: 25px !important;
}
#terms-privacy-modal-body section {
    background: #f8fcfc !important; /* 薄いミント系背景で視認性を上げる */
    padding: 20px !important;
    margin-bottom: 25px !important;
    border-radius: 12px !important;
    border: 1px solid rgba(0, 188, 212, 0.1) !important;
    backdrop-filter: none !important;
}
#terms-privacy-modal-body h2 {
    font-size: 1.1rem !important;
    margin-bottom: 12px !important;
    border-bottom: 1px solid rgba(0, 188, 212, 0.15) !important;
    padding-bottom: 8px !important;
}
#terms-privacy-modal-body h3 {
    font-size: 0.95rem !important;
    margin: 12px 0 8px !important;
}
#terms-privacy-modal-body li,
#terms-privacy-modal-body p {
    font-size: 0.85rem !important;
    line-height: 1.6 !important;
}