/* リセットとベーススタイル */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    padding: 20px;
  }
  
  #app {
    max-width: 1200px;
    margin: 0 auto;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 30px;
  }
  
  /* ヘッダー */
  header {
    margin-bottom: 30px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 20px;
  }
  
  header h1 {
    font-size: 24px;
    color: #1976d2;
    margin-bottom: 5px;
  }
  
  .subtitle {
    font-size: 13px;
    color: #666;
  }
  
  /* セクション */
  section {
    margin-bottom: 30px;
  }
  
  /* ファイル入力 */
  .file-input-container {
    margin-bottom: 15px;
  }
  
  .file-label {
    display: inline-block;
    cursor: pointer;
  }
  
  .file-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #1976d2;
    color: white;
    border-radius: 4px;
    transition: background-color 0.2s;
  }
  
  .file-button:hover {
    background-color: #1565c0;
  }
  
  .file-name {
    display: inline-block;
    margin-left: 15px;
    color: #666;
  }
  
  .file-info {
    padding: 10px;
    background-color: #e3f2fd;
    border-left: 4px solid #1976d2;
    border-radius: 4px;
    font-weight: 600;
  }
  
  /* 操作ボタン */
  #actions-section {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
  }
  
  .primary-btn {
    padding: 10px 20px;
    background-color: #1976d2;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.2s;
  }
  
  .primary-btn:hover {
    background-color: #1565c0;
  }
  
  .secondary-btn {
    padding: 10px 20px;
    background-color: #f5f5f5;
    color: #333;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.2s;
  }
  
  .secondary-btn:hover {
    background-color: #e0e0e0;
  }
  
  .danger-btn {
    padding: 10px 20px;
    background-color: #d32f2f;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.2s;
  }
  
  .danger-btn:hover {
    background-color: #c62828;
  }
  
  .small-btn {
    padding: 5px 10px;
    background-color: #f5f5f5;
    color: #333;
    border: 1px solid #ccc;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.2s;
  }
  
  .small-btn:hover {
    background-color: #e0e0e0;
  }
  
  /* 検索 */
  .search-container {
    flex: 1;
    min-width: 200px;
  }
  
  .search-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
  }
  
  .search-input:focus {
    outline: none;
    border-color: #1976d2;
  }
  
  /* テーブル */
  .table-container {
    overflow-x: auto;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
  }
  
  #data-table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
  }
  
  #data-table thead {
    background-color: #f5f5f5;
  }
  
  #data-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #e0e0e0;
    white-space: nowrap;
  }
  
  #data-table td {
    padding: 12px;
    border-bottom: 1px solid #e0e0e0;
  }
  
  #data-table tbody tr:hover {
    background-color: #f9f9f9;
  }
  
  .country-tag {
    display: inline-block;
    padding: 2px 8px;
    margin: 2px;
    background-color: #e3f2fd;
    border-radius: 3px;
    font-size: 12px;
  }
  
  .uncertain-badge {
    display: inline-block;
    padding: 2px 6px;
    background-color: #fff3e0;
    color: #f57c00;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 5px;
  }
  
  .action-buttons {
    display: flex;
    gap: 5px;
  }
  
  .edit-btn, .delete-btn {
    padding: 5px 10px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.2s;
  }
  
  .edit-btn {
    background-color: #e3f2fd;
    color: #1976d2;
  }
  
  .edit-btn:hover {
    background-color: #bbdefb;
  }
  
  .delete-btn {
    background-color: #ffebee;
    color: #d32f2f;
  }
  
  .delete-btn:hover {
    background-color: #ffcdd2;
  }
  
  /* モーダル */
  .modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
  }
  
  .modal-content {
    background-color: white;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  }
  
  .modal-small {
    max-width: 400px;
  }
  
  .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
  }
  
  .modal-header h2 {
    font-size: 20px;
    color: #333;
  }
  
  .modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
  }
  
  .modal-close:hover {
    color: #333;
  }
  
  .modal-body {
    padding: 20px;
  }
  
  /* フォーム */
  .form-group {
    margin-bottom: 20px;
  }
  
  .form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
  }
  
  .required {
    color: #d32f2f;
  }
  
  .form-group input[type="text"],
  .form-group input[type="date"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
  }
  
  .form-group input:focus {
    outline: none;
    border-color: #1976d2;
  }
  
  .checkbox-inline {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 10px;
    cursor: pointer;
    user-select: none;
  }
  
  .checkbox-inline input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
  }
  
  /* 国の管理 */
  .countries-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
    min-height: 40px;
    padding: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background-color: #f9f9f9;
  }
  
  .country-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
    background-color: #e3f2fd;
    border-radius: 4px;
    font-size: 13px;
  }
  
  .country-remove {
    background: none;
    border: none;
    color: #1976d2;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    transition: color 0.2s;
  }
  
  .country-remove:hover {
    color: #d32f2f;
  }
  
  .country-input-group {
    display: flex;
    gap: 10px;
  }
  
  .country-input-group input {
    flex: 1;
  }
  
  /* フォームアクション */
  .form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
  }
  
  /* 警告テキスト */
  .warning-text {
    color: #d32f2f;
    font-size: 13px;
    margin-top: 10px;
  }
  
  /* レスポンシブ対応 */
  @media screen and (max-width: 768px) {
    #app {
      padding: 15px;
    }
  
    .modal-content {
      width: 95%;
    }
  
    #actions-section {
      flex-direction: column;
      align-items: stretch;
    }
  
    .search-container {
      width: 100%;
    }
  
    #data-table th,
    #data-table td {
      padding: 8px;
      font-size: 12px;
    }
  }