/* ======================
   共通スタイル
   ====================== */
   * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Arial', sans-serif;
    min-height: 100vh;

    /* 背景画像を全画面に表示 */
    background-image: url("../img/map.JPG");
    background-size: cover;      /* 画面いっぱいに拡大縮小 */
    background-position: center; /* 中央寄せ */
    background-repeat: no-repeat;
    background-attachment: fixed; /* スクロールしても固定 */

}

.body-insert{
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ======================
   ヘッダー
   ====================== */
.header {
    background: #ffb442; 
    padding: 1rem 0;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between; 
    align-items: center;
  }
  
  .nav-right {
    display: flex;
    gap: 12px;  
  }
  
  .login-button,
.logout-button {
    display: flex;                 
    align-items: center;           
    justify-content: center;       
    height: 38px;                
    padding: 0 16px;                
    font-size: 0.8rem;
    background-color: #ffffff;
    color: rgb(236, 167, 71);
    border: 1px solid #d9b67c;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
}
  
  .login-button:hover,
  .logout-button:hover {
    background-color: #f7e8d0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
  }

.logo {
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* ======================
   メインコンテンツ共通
   ====================== */
.main-container {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.form-card, .content-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);

}

.form-card-insert{
background-color: rgba(255, 255, 255, 0.9);
border-radius: 20px;
padding: 20px 40px; /* ←上下の余白を小さく */
max-width: 600px;
width: 90%;
box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}


/* ======================
   タイトル・サブタイトル
   ====================== */
.page-title, .form-title {
    text-align: center;
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #ffb300, #ffc338);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-subtitle, .form-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

/* ======================
   フォーム（index.php用）
   ====================== */
.main-container.form-page {
    max-width: 600px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #555;
    font-size: 1rem;
}

.form-input, .form-textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
}

.form-input:focus, .form-textarea:focus {
    outline: none;
    border-color: #90c974;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
}

/* ======================
   ボタン
   ====================== */
.submit-btn {
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, hsl(42, 4%, 54%) 0%, #9e9983 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.submit-btn:active {
    transform: translateY(0);
}

/* ======================
   データ表示（select.php用）
   ====================== */
.data-container {
    min-height: 300px;
    background: rgba(248, 249, 250, 0.8);
    border-radius: 15px;
    padding: 2rem;
    border: 2px dashed #e1e5e9;
    transition: all 0.3s ease;
}

.data-container:not(:empty) {
    border: 2px solid #e1e5e9;
    background: white;
}

.empty-state {
    text-align: center;
    color: #666;
    font-size: 1.1rem;
    padding: 3rem 1rem;
}

.empty-icon {
    font-size: 4rem;
    color: #ccc;
    margin-bottom: 1rem;
}

/* ======================
   登録完了メッセージ（insert完了後画面）
   ====================== */
.complete-message {
    text-align: center;
    /* margin-top: px; */
    font-size: 1.8rem;
    color: #ffa557;
    font-weight: bold;
}

.button-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.link-button {
    /* background-color: #ffffff; */
    color: rgb(121, 106, 55);
    padding: 12px 24px;
    text-decoration: none;
    font-size: 16px;
    border-radius: 8px;
    font-weight: bold;
    transition: all 0.3s ease;
    display: inline-block;
    text-align: center;
}


/* ======================
   レスポンシブ対応
   ====================== */
@media (max-width: 768px) {
    .main-container {
        padding: 0 1rem;
        margin: 1rem auto;
    }

    .form-card, .content-card {
        padding: 2rem 1.5rem;
    }

    .nav-container {
        padding: 0 1rem;
    }

    .page-title, .form-title {
        font-size: 1.5rem;
    }

    .data-container {
        padding: 1rem;
    }
}

/* 記録1件を横並びにするラッパー */
.record-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

/* テキスト部分 */
.record-text {
    flex: 1;
    font-size: 1rem;
}

/* 編集・削除ボタンをまとめる */
.record-actions {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
}

/* ボタンを少し小さく */
.record-actions  {
    font-size: 0.9rem;
    padding: 0.4rem 0.8rem;
    white-space: nowrap;
    color: rgb(121, 106, 55);
}


.record-actions :hover {
    background-color: #9e9983;
    color: white; 
    transform: scale(1.05);
    /* box-shadow: 0 0 10px rgba(0,0,0,0.2); */
}

.link-button:hover{

    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(0,0,0,0.2);

}

.form-card {
    position: relative; /* 子要素をabsoluteで配置できるようにする */
  }
  



  .form-title {
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 1rem;
    text-align: center;
    background: linear-gradient(135deg, #ffb300, #ffc338);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}