/* =====================================================
   健康支援AIのぞみシステム 基本CSS
   ===================================================== */

/* リセットCSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 62.5%; /* 1rem = 10px */
}

body {
    font-family: 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', 'Meiryo', sans-serif;
    font-size: 1.4rem;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

/* 共通レイアウト */
.wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ヘッダー */
.header {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header_inner {
    width: 100%;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header_left .logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: white;
}

.header_left .logo img {
    height: 4rem;
    margin-right: 1rem;
}

.header_left .logo span {
    font-size: 1.8rem;
    font-weight: bold;
}

.header_right {
    display: flex;
    align-items: center;
    gap: 2rem;
}

/* グローバルナビゲーション */
.global_nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.global_nav a {
    color: white;
    text-decoration: none;
    padding: 0.8rem 1.6rem;
    border-radius: 2rem;
    transition: all 0.3s ease;
    font-weight: 500;
}

.global_nav a:hover,
.global_nav a.active {
    background-color: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

/* ユーザーメニュー */
.user_menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user_name {
    font-size: 1.4rem;
    font-weight: 500;
}

.logout_btn {
    background-color: rgba(255,255,255,0.2);
    color: white;
    text-decoration: none;
    padding: 0.6rem 1.2rem;
    border-radius: 1.5rem;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.logout_btn:hover {
    background-color: rgba(255,255,255,0.3);
    transform: translateY(-1px);
}

/* メインコンテンツ */
.main_content {
    flex: 1;
    width: 100%;
    padding: 2rem;
}

/* ボタン */
.btn_primary {
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
    color: white;
    border: none;
    padding: 0.3rem 2rem;
    border-radius: 0.5rem;
    font-size: 1.4rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn_primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(79,70,229,0.35);
}

.btn_secondary {
    background-color: #f8f9fa;
    color: #6c757d;
    border: 1px solid #dee2e6;
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    font-size: 1.4rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn_secondary:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
}

/* フォーム要素 */
.form_group {
    margin-bottom: 1.5rem;
}

.form_group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #495057;
}

.form_group input,
.form_group select,
.form_group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid #ced4da;
    border-radius: 0.5rem;
    font-size: 1.4rem;
    transition: border-color 0.3s ease;
}

.form_group input:focus,
.form_group select:focus,
.form_group textarea:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

/* モーダル */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal_content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 1rem;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal_header {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    padding: 1.5rem 2rem;
    border-radius: 1rem 1rem 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal_header h3 {
    margin: 0;
    font-size: 1.8rem;
}

.close_modal {
    font-size: 2.4rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close_modal:hover {
    transform: scale(1.2);
}

.modal_body {
    padding: 2rem;
}

.form_actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .header_inner {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .global_nav ul {
        gap: 1rem;
    }
    
    .global_nav a {
        padding: 0.6rem 1.2rem;
        font-size: 1.3rem;
    }
    
    .main_content {
        padding: 1rem;
    }
    
    .modal_content {
        width: 95%;
        margin: 10% auto;
    }
    
    .form_actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .header_left .logo span {
        font-size: 1.6rem;
    }
    
    .global_nav ul {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .user_menu {
        flex-direction: column;
        gap: 0.5rem;
    }
}
