/* カスタムスタイル */
body {
    background-color: #f8f9fa;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.card-header {
    border-radius: 15px 15px 0 0 !important;
    border-bottom: none;
}

.btn {
    border-radius: 25px;
    padding: 8px 20px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
}

.btn-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    border: none;
}

.btn-warning {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border: none;
}

.btn-info {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    border: none;
}

.form-control {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    padding: 10px 15px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.3rem;
}

.table {
    border-radius: 10px;
    overflow: hidden;
}

.table thead th {
    border: none;
    background-color: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

.table td {
    border-color: #f8f9fa;
    vertical-align: middle;
}

.text-success {
    color: #28a745 !important;
}

.text-danger {
    color: #dc3545 !important;
}

.alert {
    border-radius: 15px;
    border: none;
}

.modal-content {
    border-radius: 15px;
    border: none;
}

.modal-header {
    border-bottom: 1px solid #f8f9fa;
    border-radius: 15px 15px 0 0;
}

.modal-footer {
    border-top: 1px solid #f8f9fa;
    border-radius: 0 0 15px 15px;
}

/* グラフエリアのスタイル */
#weightChart {
    border-radius: 10px;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .card {
        margin-bottom: 20px;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .table-responsive {
        font-size: 0.9rem;
    }
    
    /* スマホでの編集・削除ボタンのスタイル調整 */
    .table td .btn-sm {
        width: auto !important;
        margin-bottom: 0 !important;
        padding: 4px 8px;
        font-size: 0.75rem;
        min-width: 32px;
        height: 32px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    /* テーブル内のボタンコンテナ */
    .table td:last-child {
        white-space: nowrap;
        width: 80px;
    }
    
    /* ボタン間のマージン調整 */
    .table td .btn-sm.me-1,
    .table td .btn-sm.me-2 {
        margin-right: 4px !important;
    }
    
    /* アイコンのサイズ調整 */
    .table td .btn-sm i {
        font-size: 0.7rem;
    }
    
    /* フォーム内のボタンスタイル */
    .table td form {
        display: inline-block;
        margin: 0;
    }
    
    /* タッチしやすいボタンのアクティブ状態 */
    .table td .btn-sm:active {
        transform: scale(0.95);
        transition: transform 0.1s ease;
    }
    
    /* ボタンのコントラストを向上 */
    .table td .btn-outline-primary {
        border-width: 1.5px;
        font-weight: 600;
    }
    
    .table td .btn-outline-danger {
        border-width: 1.5px;
        font-weight: 600;
    }
    
    .table td .btn-warning {
        color: #212529;
        font-weight: 600;
    }
    
    .table td .btn-danger {
        font-weight: 600;
    }
    
    /* フォーカス時のアウトライン */
    .table td .btn-sm:focus {
        box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.4);
        outline: none;
    }
}

/* 小さなスマートフォン向けの追加スタイル */
@media (max-width: 480px) {
    /* テーブルのフォントサイズをさらに調整 */
    .table-responsive {
        font-size: 0.8rem;
    }
    
    /* ボタンを縦並びにして見やすくする */
    .table td:last-child {
        width: 60px;
    }
    
    .table td .btn-sm {
        display: block;
        width: 100% !important;
        margin-bottom: 3px !important;
        margin-right: 0 !important;
        padding: 6px;
        min-width: auto;
        height: 28px;
        font-size: 0.7rem;
    }
    
    /* 最後のボタンのマージンを調整 */
    .table td .btn-sm:last-child,
    .table td form:last-child .btn-sm {
        margin-bottom: 0 !important;
    }
    
    /* テーブルのセル内の余白を調整 */
    .table td {
        padding: 8px 4px;
    }
    
    /* 操作列のヘッダーサイズ調整 */
    .table th:last-child {
        width: 60px;
        text-align: center;
    }
}

/* タブレット向けのスタイル */
@media (min-width: 481px) and (max-width: 768px) {
    .table td .btn-sm {
        padding: 5px 10px;
        font-size: 0.8rem;
        min-width: 36px;
        height: 36px;
    }
    
    .table td:last-child {
        width: 90px;
    }
}

/* アニメーション */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeInUp 0.5s ease-out;
}

/* カスタムプログレスバー */
.progress {
    border-radius: 25px;
    height: 10px;
}

.progress-bar {
    border-radius: 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* ローディングスピナー */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* ツールチップスタイル */
.tooltip-inner {
    background-color: #495057;
    border-radius: 10px;
}

/* バッジスタイル */
.badge {
    border-radius: 10px;
    padding: 5px 10px;
}

/* 統計カードスタイル */
.stats-card {
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    border-left: 4px solid #667eea;
}

.stats-number {
    font-size: 2rem;
    font-weight: bold;
    color: #495057;
}

.stats-label {
    color: #6c757d;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
